cancel
Showing results for 
Search instead for 
Did you mean: 

BODS exec() function and the Flags parameter

0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

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

former_member187605
Active Contributor
0 Kudos

That's where it so often is .

Answers (2)

Answers (2)

former_member198401
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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)) ;