Skip to Content

BODS exec() function and the Flags parameter

Does anybody have experience using the exec() function in BODS to execute commands like 'move', 'delete', and 'copy'? I am curious about what the flags parameter refers to (in bold below):

Syntax:
exec( [in] FileName As varchar, [in] Arguments As varchar, [in] Flags As int ) As varchar

The way I am using the command is as follows, I just don't know what I should use for the flag parameter:

exec('cmd','del [$GV_OUTBOUND_DIR]\\[$RAY_SALES_FILE])', ???)

I believe it is supposed to be an integer between 0 and 8, I'm just not sure what the different flags do. Any ideas?

Thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Apr 01, 2015 at 10:58 PM

    Thanks everybody. I found the answer in the DS Reference Guide:

    I went with 8 for the flag in the script I was writing.


    exec flags.JPG (69.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 29, 2015 at 05:48 PM

    Use 8 as flag. Also encapsulate exec in print() to print return from command in trace log.

    print ( exec( 'del', '[$GV_OUTBOUND_DIR]\\[$RAY_SALES_FILE]' , 8)) ;

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 30, 2015 at 06:06 AM

    HI Anthony,

    The exec() function sends a command to OS and returns a message back with a Flag. Usually we give 8 as the Flag but you can also try other options. Please refer to DS reference guide

    Regards

    Arun Sasi


    pastedImage_0.png (18.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.