Data type errors using the CALL command

This details the types of data type errors that may occur when using the Call (CALL) command.

The total length of the command string includes the command name, spaces, parameter names, parentheses, contents of variables and apostrophes used. For most commands, the command string initiates the command processing program as expected. However, for some commands some variables may not be passed as expected.

When the CALL command is used with the CMD parameter on the Submit Job (SBMJOB) command, unexpected results may occur. Syntactically, the CALL command appears the same when used with the CMD parameter as it does when used as the compiler directive for the CALL command. When used with the CMD parameter, the Call (CALL) command is converted to a command string that is run at a later time when the batch subsystem initiates it. When the Call (CALL) command is used by itself, the CL compiler generates code to perform the call.

Common problems with decimal constants and character variables often occur. In the following cases, the command string is not constructed as needed:

The contents of the character variable is passed as described previously, usually as a quoted character constant with the trailing blanks removed. As a result, the called program may not be passed enough data.

The following methods can be used to correct errors in constructing command strings:

Related tasks
Use variables
Related information
Call (CALL) command
Submit Job (SBMJOB) command
CL command finder