# GET_COMMAND

Intrinsic Subroutine: Returns the entire command that was used to invoke the program.

CALL GET_COMMAND ([command, length, status, errmsg])

command | (Output; optional) Must be a scalar of type default character. If specified, its value is the entire command that was used to invoke the program. If the command cannot be determined, its value is all blanks.
length | (Output; optional) Must be a scalar of type integer. If specified, its value is the significant length of the command that was used to invoke the program. This length includes trailing blanks, but it does not include any truncation or padding used in the command. If the command length cannot be determined, its value is zero.
status | (Output; optional) Must be a scalar of type integer. If specified, its value is -1 if the command argument is present and has a length less than the significant length of the command. If the command cannot be retrieved, its value is positive; otherwise, it is assigned the value zero.
errmsg | (Input; output; optional) Must be a scalar of type default character. If an error occurs, it is assigned a processor-dependent explanatory message; otherwise, it is unchanged.

## Example

See the example in COMMAND_ARGUMENT_COUNT.

Parent topic: G

## See Also

GETARG
NARGS
IARGC
COMMAND_ARGUMENT_COUNT
GET_COMMAND_ARGUMENT