The Custom:executeForNumber Method

This method executes a command and parses the output as a number which is then returned as both an integer and a double value. The integer value of a true double truncates the remainder.

The command returns information by sending a number to stdout. If the executed command returns more than one number, an error occurs.

On the OS/400 platform, the supported commands are:
  • commands that start with the system (when using a CL command)
  • commands that run on the Qshell (qsh) utility. Use the -c option when using the qsh command.
    For example:
    qsh -c ls
    system DSPDTAARA DTAARA (<LibName>/<Data Area Name>)

Type

Synchronous, IMPACT_ACTION_INFO

Arguments

Name Type Description
command String The command to execute.

External and internal variables can be used in the command string.

Returns

Name Type Description
returnInteger Integer The integer value of the output.
returnDouble Double The double value of the output.