YEXCMDLLST (Execute a Model Object List) Command

This command allows a user to perform some action with each of the entries contained in a model object list.
ca2e87
This command allows a user to perform some action with each of the entries contained in a model object list.
Substitution variables are provided to include object related data from a particular list entry in the command to be executed. For a list of supported values, see details relating to the CMD parameter.
Contents
Required
YEXCMDLLST-Required YEXCMDLLST-Required YEXCMDLLST-Required YEXCMDLLST-Required YEXCMDLLST-Required YEXCMDLLST-Required YEXCMDLLST-Required YEXCMDLLST-Required YEXCMDLLST-Required
Parameters
The following are parameters for the YEXCMDLLST command.
CMD
The command string containing the details of the command that is executed for each entry in the model object list.
 For convenience, this parameter is a command string (*CMDSTR). This allows the command that is to be executed to be prompted and syntax- checked prior to execution. In some instances this prevents substitution variables from being defined for a given parameter, such as making it impossible to specify the object type (&YT) in a parameter that has a fixed set of allowed values. When this happens you must use the RQSDTA parameter to specify the command to be executed.
 
The following substitution variables are supported:
  • &YN
    -- Object name, 25 character string.
  • -- Object surrogate, 7 decimal.
  • &YT
    -- Object type, 3 character (FIL, FUN, ACP, etc).
  • &YA
    -- Object attribute, 3 character (RPG, INF, STS, RTV, etc).
  • &YO
    -- Object owner name, 25 character string.
  • &YW
    -- Object owner surrogate, 7 decimal.
  • &YY
    -- Object owner type, 3 character string.
  • &YR
    -- Object group surrogate, 7 decimal.
  • &YM
    -- Model list name, 10 character string.
  • &YI
    -- Object implementation name, 10 character string.
  • &YP
    -- Object promotion type, 3 character (ADD, CHG, GEN, etc).
  • &YS
    -- Object SEU type, 10 character (RPG, DSPF, PRTF, etc).
  • &YU
    -- User name, 10 character.
  • &YL
    -- Model library name, 10 character.
  • &YC
    -- User option text. The text is retrieved from the specified user options member.
  • &YG
    -- Object change type, 8 character (*PRIVATE, *PUBLIC, etc).
  • &YF
    -- Function type, 10 character (EXCEXTFUN, EDTRCD, etc).
  • &YZ
    -- Assimilated file, a 1-character string set to Y or N. Indicates whether the FIL or owning FIL object is an assimilated file from an external database.
  • &Y6
    -- DBFGEN value (LGL ACP only), 1 character string (D or S)
  • &Y7
    -- DBFACC value (LGL ACP only), 1 character string (G or T)
  • &Y8
    -- MNTSTS value (LGL ACP only), 1 character string (I, D or R)
  • &Y9
    -- UNQKEY value (LGL ACP only), 1 character string (U, F, L, C or blank)
MDLLST
The qualified name of the model object list that is executed. Values for these parameters are as follows:
  • *MDLPRF
    -- (default) Special value meaning that the model object list name is retrieved from the user profile extension record for the current user in the specified model library. The change list value is retrieved.
  • *USER
    -- Special value meaning that the user profile name of the current user is used as the list name for the target of the command.
  • *SELECT
    -- Special value indicating that the model object list is selected using an interactive display function.
  • list name
    -- The model object list name must be entered.
  • *MDLLIB
    -- (default) Special value meaning that the first model library found in the user's current library list is used as the model library for the list.
  • library name
    -- The model library name for the list can be entered.
ERRLVL
The number of errors tolerated by the command can be specified. Values for these parameters are as follows:
  • *NONE
    -- (default) No errors allowed. The command will stop at the first error encountered.
  • *NOMAX
    -- There is no limit to the number of errors.
  • number of errors
    -- The number of errors can be specified.
UPDLST
List update option. Values for these parameters are as follows:
  • *NONE
    -- (default) The list entries are not updated.
  • *FLAGERR
    -- If an error occurs during processing of a list entry, the entry is flagged. The value to use is specified by the OUTFLAGVAL parameter. This value may be the subject of a later filtering operation.
  • *FLAGOK
    -- If an error does not occur during processing of a list entry, the entry is flagged. The value to use is specified by the OUTFLAGVAL parameter. This value may be the subject of a later filtering operation.
  • *RMVERR
    -- If an error occurs during processing of a list entry, the entry is removed from the list.
  • *RMVOK
    -- If the processing of a list entry completes without error, the entry is removed from the list.
RQSDTA
The request data command string containing the details of the command that is executed for each entry in the model object list. For a list of supported substitution variables, see details relating to the CMD parameter. Values for these parameters are as follows:
  • *CMD
    -- (default) The command string parameter contains the request to be executed.
  • *USROPT
    -- The request data command string is retrieved from the user options file/member specified using the user option parameters.
INCAUX
This parameter lets you choose whether or not to include object auxiliaries, such as the display and help members for an interactive function, in the processing. Values for these parameters are as follows:
  • *NO
    -- (default) Auxiliaries are not included in processing.
  • *YES
    -- Auxiliaries are included in processing.
  • *GEN
    -- Auxiliaries are only included in processing if they are currently generatable as part of the normal generation of the access path or function.
  • Note: For functions that have help text, which auxiliaries are included in processing when INCAUX is set to *GEN is affected by the setting of the YGENHLP model value (or the corresponding GENHLP function option). The YGENHLP model value specifies whether the function only (*NO), the help text only (*ONLY), or both (*YES) are to be generated.
  • If YGENHLP IS *NO, the help auxiliary is excluded from YEXCMDLLST processing.
  • If YGENHLP is *ONLY, only the help auxiliary is included in processing.
  • If YGENHLP is *YES, all generatable auxiliaries are included. YGENHLP has no effect on functions that do not have help text.
USROPT
Two character user-defined option identifying a record in the specified user-defined options file. This option contains user option text for substitution in the RQSDTA command string. The value for this parameter is as follows:
  • *NONE
    -- (default) No user-defined option text is used.
OPTFIL
Qualified name of the file containing the user-defined option text. The value for this parameter is as follows:
  • *MDLPRF
    -- (default) Single value meaning that the value for the user option file is retrieved from the model profile details for the current user.
OPTMBR
Name of the member containing the user-defined option text. Values for these parameters are as follows:
  • *MDLPRF
    -- (default) Single value meaning that the value for the user option file is retrieved from the model profile details for the current user.
  • *FILE
    -- The member has the same name as the file.
FLAGVAL
This parameter allows list entries to be selected for execution. Values for these parameters are as follows:
  • *ANY
    -- (default) Execute all list entries.
  • *ERROR
    -- Only entries flagged in *ERROR are executed.
  • *SELECTED
    -- Only *SELECTED entries are executed.
Notes
The MDLLST must exist prior to running the command.
A value other than *MDLLIB for MDLLST may result in the library list being changed. If the user is currently editing a model, the switching of the library list will not occur and the command will fail. If changed during processing, the library list is changed back after execution.
If *USROPT is specified for parameter RQSDTA, then the USROPT parameter cannot be *NONE.
Substitution variables are available to insert details relating to a particular model object list entry into the command string. The substitution prefix & or @ can be used and an alternative character can be defined in the Synon/1E data area YPEXCHA (note that the Synon/1E Edit Data Area command (YEDTDTAARA) may be used to change this value).
Note that object owner name will be returned as *Arrays for Array objects, *Messages for Message objects, the object name for model file objects and *NONE for objects that do not have an owner, such as FLD objects.
When you to try to execute a model list using YCRTJOBLE command, and the model list has one or more *DDL-based access paths in it, and the access path has either of the four DDL limitations, the entry is not added to the job list. The access path source is not generated.
The current implementation of the DDL generation mode is not valid for the following cases:
  • Access paths that have virtual fields
  • SPN access path
  • QRY access path
  • Multi-member files
Workaround for Virtual Fields, SPN, and QRY Access Paths:
If the earlier generation mode is *DDS, revert to it and regenerate the access path. You need not regenerate the functions that use this access path. If you want to have an SQL type database, regenerate the access path using *SQL generation mode. The functions using this access path must be regenerated.
Workaround for Multi-Member Files:
If you want to have more than one member for the access paths, revert to *DDS generation mode.
Note:
If you want to change an access path, which is previously defined as *DDS with a MAXMBR compiler override, to *DDL, you must revert to *DDS generation mode and must remove the compiler override, and then change back to *DDL generation mode.
Example
To print each function by executing model object list IM0033 from the model contained in the current library list with the Document Model Functions command (YDOCMDLFUN):
YEXCMDLLST CMD( YDOCMDLFUN + MDLFILE(&YO) MDLFUN(&YN) ) MDLLST + (*MDLLIB/IM0033 )