Data type and parameter restrictions

These tables show the valid combinations of parameters according to the parameter type.

An X indicates that the combination is valid, a number refers to a restriction noted at the bottom of the table.

  LEN RTNVAL CONSTANT RSTD DFT VALUES REL RANGE SPCVAL SNGVAL
*DEC X 2 X X X X X X 3 1
*LGL X 2 X X X X     3 1
*CHAR X 2 X X X X X X 3 1
*NAME X   X X X X X X 3 1
*SNAME X   X X X X X X 3 1
*CNAME X   X X X X X X 3 1
*PNAME X 2 X X X X X X 3 1
*GENERIC X   X X X X X X 3 1
*DATE     X X X X X X 3 1
*TIME     X X X X X X 3 1
*HEX X   X X X X X X 3 1
*ZEROELEM
*INT2   2 X X X X X X 3 1
*INT4   2 X X X X X X 3 1
*UINT2   2 X   X   X X 3 1
*UINT4   2 X   X   X X 3 1
*CMDSTR X   X   X          
*NULL X                  
STMT LABEL     X   X         X
Notes:
  1. Valid only if the value for MAX is greater than 1. Also, To-values are ignored when CPP is a REXX procedure. Values passed as REXX procedure parameters are the values typed or the defaults for each parameter.
  2. Not valid when the command CPP is a REXX procedure.
  3. To-values are ignored when CPP is a REXX procedure. Values passed as REXX procedure parameters are the values typed or the default values for each parameter.
  MIN MAX ALWUNPRT ALWVAR PGM DTAARA FILE FULL EXPR VARY
*DEC X X   X   X        
*LGL X X   X   X X 1    
*CHAR X X X X X X X X X 1
*NAME X X   X X X X X X 1
*SNAME X X   X X X X X X 1
*CNAME X X   X X X X X X 1
*PNAME X X X X X X X X X 1
*GENERIC X X   X X X X X X 1
*DATE X X   X   X        
*TIME X X   X         X  
*HEX X X   X       X X  
*ZEROELEM X X                
*INT2 X X   X         X  
*INT4 X X   X         X  
*UINT2 X X   X         X  
*UINT4 X X   X         X  
*CMDSTR 2 3   4           1
*NULL 2 3                
STMT LABEL X X     X          
Notes:
  1. Parameter is ignored when CPP is a REXX procedure.
  2. The value for MIN cannot exceed 1 for TYPE(*NULL).
  3. The value for MAX cannot exceed 1 for TYPE(*NULL) or TYPE(*CMDSTR).
  4. The ALWVAR value is ignored for this type of parameter. CL variables are not allowed when the parameter type is *CMDSTR.
  PASSATR PASSVAL CASE LISTDSPL DSPINPUT
*DEC 1 X   X X
*LGL 1 X   X X
*CHAR 1 X 3 X X
*NAME 1 X   X X
*SNAME 1 X   X X
*CNAME 1 X   X X
*PNAME 1 X 3 X X
*GENERIC 1 X   X X
*DATE 1 X   X X
*TIME 1 X   X X
*HEX 1 X   X X
*ZEROELEM          
*INT2 1 X   X X
*INT4 1 X   X X
*UINT2 1 X   X X
*UINT4 1 X   X X
*CMDSTR 1     X X
*NULL          
STMT LABEL   2      
  CHOICE CHOICEPGM PMTCTL PMTCTLPGM PROMPT INLPMTLEN
*DEC X X X X X  
*LGL X X X X X  
*CHAR X X X X X 4
*NAME X X X X X 4
*SNAME X X X X X 4
*CNAME X X X X X 4
*PNAME X X X X X 4
*GENERIC X X X X X 4
*DATE X X X X X  
*TIME X X X X X  
*HEX X X X X X 4
*ZEROELEM            
*INT2 X X X X X  
*INT4 X X X X X  
*UINT2 X X X X X  
*UINT4 X X X X X  
*CMDSTR X X X X X 4
*NULL            
STMT LABEL X X X X X X
Notes:
  1. Parameter is ignored when CPP is a REXX procedure.
  2. PASSVAL passes a keyword with no blanks or other characters between parentheses when CPP is a REXX procedure.
  3. Case (*MIXED) is allowed only with type *CHAR and *PNAME.
  4. You can use INLPMTLEN(*PWD) only with types *CHAR, *NAME, *SNAME, *CNAME, and *PNAME.

The next table shows the valid parameter combinations and restrictions for the PARM, ELEM, and QUAL statements. For example, the intersection of the row for LEN and the column for DFT are blank; therefore, there are no restrictions and combination of LEN(XX) and DFT(XX) is valid. However, the intersection of the row for DFT and the column for CONSTANT contains a 4, which refers to a note that describes the restriction at the bottom of the table.

  LEN RTNVAL CONSTANT RSTD DFT VALUES REL RANGE SPCVAL SNGVAL
LEN                    
RTNVAL     1 1 1 1 1 1 1 1
CONSTANT   1     4         16
RSTD   1       7 9 9 7 7
DFT   1 4              
VALUES   1   7            
REL   1   9       9    
RANGE   1   9     9      
SPCVAL   1   7            
SNGVAL   1 21 7            
MIN         8          
MAX   2 2             10
ALWUNPRT                    
ALWVAR   12                
PGM   1                
DTAARA   1                
FILE   1                
FULL   1                
EXPR   1 5              
VARY   3                
PASSATR   3                
PASSVAL   13           11    
CASE                    
LISTDSPL                    
CHOICE     14              
CHOICEPGM                    
PMTCTL     15              
PMTCTLPGM     15              
PROMPT     6              
INLPMTLEN   17 17 17            
Notes:
  1. The RTNVAL parameter cannot be used with any of the following parameters: CONSTANT, RSTD, DFT, VALUES, REL, RANGE, SPCVAL, SNGVAL, PGM, DTAARA, FILE, FULL, or EXPR. The RTNVAL parameter cannot be used on any command using a REXX procedure as a CPP.
  2. A MAX value greater than 1 is not allowed.
  3. If RTNVAL(*YES) and PASSATR(*YES) are specified, VARY(*YES) must also be specified. If RTNVAL(*YES) and VARY(*YES) are specified, you must use either *INT2 or *INT4. Combinations of *INT2 and *INT4 are not valid.
  4. The CONSTANT and DFT parameters are mutually exclusive.
  5. The EXPR(*YES) and CONSTANT parameters are mutually exclusive.
  6. The PROMPT parameter is not allowed.
  7. If the RSTD parameter is specified, one of the following parameters must also be specified: VALUES, SPCVAL, or SNGVAL.
  8. The MIN value must be 0.
  9. The REL, RANGE, and RSTD(*YES) parameters are mutually exclusive.
  10. Either the MAX value must be greater than 1 or the parameter type must be a statement label, or both.
  11. The parameter may not refer to a parameter defined with the parameter PASSVAL(*NULL). A range between parameters is not valid on a PARM statement defined with PASSVAL(*NULL).
  12. If RTNVAL(*YES) is specified, ALWVAR(*NO) cannot be specified.
  13. PASSVAL(*NULL) is not allowed with RTNVAL(*YES) or a value greater than 0 for MIN.
  14. The CHOICE and CONSTANT parameters are mutually exclusive.
  15. CONSTANT is mutually exclusive with the PMTCTL and PMTCTLPGM parameters.
  16. The CONSTANT parameter cannot be defined on the ELEM/QUAL statement if a SNGVAL parameter is defined on the PARM statement.
  17. You cannot use the INLPMTLEN parameter with CONSTANT. You must specify INLPMTLEN(*CALC) or use it as the default if you have specified FULL(*YES), RTNVAL(*YES), or RSTD(*YES).
  MIN MAX ALWUNPRT ALWVAR PGM DTAARA FILE FULL EXPR VARY
LEN                    
RTNVAL   2   8 1 1 1 1 1 3
CONSTANT   2             4  
RSTD                    
DFT 5                  
VALUES                    
REL                    
RANGE                    
SPCVAL                    
SNGVAL   7                
MIN   6                
MAX 6                  
ALWUNPRT                    
ALWVAR                    
PGM           9 9      
DTAARA         9   9      
FILE           9 9      
FULL                    
EXPR                    
VARY                    
PASSATR                   3
PASSVAL 10                  
CASE                    
LISTDSPL                    
CHOICE                    
CHOICEPGM                    
PMTCTL 11                  
PMTCTLPGM                    
PROMPT                    
INLPMTLEN               12    
Notes:
  1. The RTNVAL parameter cannot be used with any of the following parameters: CONSTANT, RSTD, DFT, VALUES, REL, RANGE, SPCVAL, SNGVAL, PGM, DTAARA, FILE, FULL, or EXPR. The RTNVAL parameter cannot be used on any command using a REXX procedure as a CPP.
  2. A MAX value greater than 1 is not allowed.
  3. If RTNVAL(*YES) and PASSATR(*YES) are specified, VARY(*YES) must also be specified. If RTNVAL(*YES) and VARY(*YES) are specified, you must use either *INT2 or *INT4. Combinations of *INT2 and *INT4 are not valid.
  4. The EXPR(*YES) and CONSTANT parameters are mutually exclusive.
  5. The MIN value must be 0.
  6. The value specified for the MIN parameter must not exceed the value specified for the MAX parameter.
  7. Either the MAX value must be greater than 1 or the parameter type must be a statement label, or both.
  8. If RTNVAL(*YES) is specified, ALWVAR(*NO) cannot be specified.
  9. PGM(*YES), DTAARA(*YES), and a value other than *NO for the FILE parameters are mutually exclusive.
  10. PASSVAL(*NULL) is not allowed with RTNVAL(*YES) or a value greater than 0 for MIN.
  11. PMTCTL is not allowed with a value greater than 0 for MIN.
  12. You must specify INLPMTLEN(*CALC) or use it as the default if you specified FULL(*YES), RTNVAL(*YES), or RSTD(*YES).
  PASSATR PASSVAL CASE LISTDSPL DSPINPUT
LEN          
RTNVAL 1 4      
CONSTANT       9 5
RSTD          
DFT          
VALUES          
REL          
RANGE   3      
SPCVAL          
SNGVAL          
MIN   4      
MAX          
ALWUNPRT          
ALWVAR          
PGM          
DTAARA          
FILE          
FULL          
EXPR          
VARY 1        
PASSATR          
PASSVAL          
CASE     10    
LISTDSPL       11  
CHOICE          
CHOICEPGM          
PMTCTL          
PMTCTLPGM          
PROMPT          
INLPMTLEN          
  CHOICE CHOICEPGM PMTCTL PMTCTLPGM PROMPT INLPMTLEN
LEN            
RTNVAL           12
CONSTANT     7 7 2 12
RSTD           12
DFT            
VALUES            
REL            
RANGE            
SPCVAL            
SNGVAL            
MIN     8      
MAX            
ALWUNPRT            
ALWVAR            
PGM            
DTAARA            
FILE            
FULL           12
EXPR            
VARY            
PASSATR            
PASSVAL            
CASE            
LISTDSPL            
CHOICE   6        
CHOICEPGM 6          
PMTCTL            
PMTCTLPGM            
PROMPT            
INLPMTLEN            
Notes:
  1. If RTNVAL(*YES) and PASSATR(*YES) are specified, VARY(*YES) must also be specified. If RTNVAL(*YES) and VARY(*YES) are specified, you must use either *INT2 or *INT4. Combinations of *INT2 and *INT4 are not valid.
  2. The PROMPT parameter is not allowed.
  3. The parameter may not refer to a parameter defined with the parameter PASSVAL(*NULL). A range between parameters is not valid on a PARM statement defined with PASSVAL(*NULL).
  4. PASSVAL(*NULL) is not allowed with RTNVAL(*YES) or a value greater than 0 for MIN.
  5. The CHOICE and CONSTANT parameters are mutually exclusive.
  6. CHOICE(*PGM) requires a name for CHOICEPGM.
  7. CONSTANT is mutually exclusive with the PMTCTL and PMTCTLPGM parameters.
  8. PMTCTL is not allowed with a value greater than 0 for MIN.
  9. CONSTANT is mutually exclusive with DSPINPUT(*NO) and DSPINPUT(*PROMPT).
  10. The CASE parameter is valid only on PARM and ELEM statements. CASE is not valid on the QUAL statement.
  11. The LISTDSPL parameter is valid only on the PARM statement.
  12. You cannot use the INLPMTLEN parameter with CONSTANT. You must specify INLPMTLEN(*CALC) or use it as the default if you specified FULL(*YES), RTNVAL(*YES), or RSTD(*YES).