Length of parameter value

You can specify a length for parameter values using the LEN parameter.

For parameter types of date or time, date is always 7 characters long and time is always 6 characters long. The following shows the maximum length for each parameter type and the default length for each parameter type for which you can specify a length.

Data Type Maximum Length Default Length
*DEC 24 (9 decimal positions) 15 (5 decimal positions)
*LGL 1 1
*CHAR 5000 32
*NAME 256 10
*SNAME 256 10
*CNAME 256 10
*GENERIC 256 10
*HEX 256 1
*X (256 24 9) (1 15 5)
*VARNAME 11 11
*CMDSTR 20K 256
*PNAME 5000 32

The maximum length that is shown here is the maximum allowed length for these parameter types when the command runs. However, the maximum length that is allowed for character constants in the command definition statements is 32 characters. This restriction applies to the CONSTANT, DFT, VALUES, REL, RANGE, SPCVAL, and SNGVAL parameters. There are specific lengths for input fields available when prompting for a CL command. The input field lengths are 1 through 12 characters and 17, 25, 32, 50, 80, 132, 256, and 512 characters. If a particular parameter has a length that is not allowed,the input field displays with the next larger field length. The prompter displays a 512–character input field for parameters that can be longer than 512 characters.

Related tasks
CALL command