This statement displays a list.
This statement has the following format:
&CONTROL SHRVARS=($LH)
-EXEC $CACALL OPT=ACTION
ACTION=DISPLAY
CLASS=LIST
NAME=‘APPL=application id
[TYPE={PUBLIC | PRIVATE}]
[USER=userid]
NAME=list name’
[PARMS=‘[FORMAT={ACTION | MSELECT |
SSELECT | NUMBERED}]
[CRITERIA=criteria]
[MAXSEL={9999 | nnnn}]
[AUTOSEL={YES | NO}]’]
A required parameter giving the application identifier of the list.
An optional parameter giving the type of list. Valid values are as follows:
Public list—available for general use
Private list—owned by a specific user ID
Note: If you do not specify TYPE or USER, the function attempts to find a PRIVATE list owned by the invoking user ID first. If unsuccessful, the function uses a PUBLIC list.
An optional parameter (if TYPE is not PUBLIC) giving the user ID of the user owning the list. Default is the user ID of the user invoking the function.
A required parameter giving the name of the list.
An optional parameter indicating the format in which the list is to be displayed. Valid values are as follows:
Action list
Multiple selection list
Single selection list
Numbered list
The default is ACTION.
A criteria statement used to select items to go in the list. The format must conform to that required by the service procedure specified in the list definition. If specified, this criteria overrides any criteria specified in the list definition, and no &$LHCRITnnnn variables can be set.
The maximum number of items that can be chosen from a list in format MSELECT (multiple selection list). The default is 9999, and the range is 1 through 9999.
Determines whether an entry in a list is automatically selected if it is the only entry in the list. The default is NO.
This statement contains the following input variables:
Criteria variables (up to 9999 variables can be given). Cannot be specified if the CRITERIA operand is specified. The format must conform to that required by the service procedure specified in the list definition.
This statement contains the following return variables:
The total number of entries selected (up to 9999).
The IDs of the list entries selected.
System message. Contains the error message (for return code 8).
If a return code of 8 is set, then additional information is available as one of the following feedback codes, set in &$CAFDBK:
Definition not found
No data found
Canceled by exit
Canceled by user
Processing error
Return requested
Nesting level exceeded
Definition not eligible for processing
The following statements display action list ZPRPRALL in the application identified by the ID ZPR. A private list is displayed in preference to a public list.
&CONTROL SHRVARS=($LH) -EXEC $CACALL OPT=ACTION + ACTION=DISPLAY + CLASS=LIST + NAME=‘?APPL=ZPR + NAME=ZPRPRALL’ + PARMS=‘FORMAT=ACTION’
| Copyright © 2008 CA. All rights reserved. |
|