Product Site

6.12. The SYSCARGS Array (.SYSCARGS)

The .SysCArgs object is an Array of all command-line arguments supplied to the program. Normally all command-line arguments are combined into a single string and passed to the Rexx program as an argument retrievable via the ARG (Argument) built-in function. .SYSCARGS is a direct collection of the individual C arguments passed to the program.

Example:
Example 6.2. SysCArgs Array
say .SysCArgs~items "SysCArgs" .SysCArgs~makeString(, ",")
say arg() "ARGs" arg(1, "A")~makeString(, ",")

/* when called with command line parameters 1 "2 3" 4, displays:
3 SysCArgs 1,2 3,4
1 ARGs 1 "2 3" 4
*/

Note

.SysCArgs may not be available in all situations, e. g. in program code that gets run via "rexx -e".