YEDTMDL (Edit Model) Command
Calls an interactive program to enter and edit the first model in your library list.
Calls an interactive program to enter and edit the first
CA 2Emodel in your library list.
The following are parameters for the YEDTMDL command.
Type of user. Values for these parameters are as follows:
- *DSNR-- (default) A designer can change any aspect of the model, including the database.
- *PGMR-- A programmer can add or change any functions that are in the model, but cannot alter the relations, files or fields.
- *USER-- A user can view all aspects of the model but cannot change any design objects. This class of user is useful to allow the data model to be examined without the possibility of change.
This parameter specifies the data model that is edited. Values for these parameters are as follows:
- *MDLLIB-- (default) The model to be edited is the first one found in the current job's library list.
- model name-- The model library name.
Qualified name of job list that contains the names of source members to be generated and/or compiled. If the nominated job list does not already exist, it will be created. Values for these parameters are as follows:
- *MDLPRF-- (default) Retrieve the job list name from the model profile details of the current user.
- *USER-- The job list name is the same name as the current user.
- *WORKSTN-- Use device name of current work station as list name.
- *SELECT-- Display a list of existing job lists, one of which may be selected. The name of the job list can be entered.
- *MDLLIB/-- The job list library is to be the first model library found in the library list.
- *GENLIB/-- Use the generation library specified in the first model found in the library list.
- *SRCLIB/-- Use the source library specified on the model profile of the current user.
- *LIBL/-- The job list library is the first model found in the library list.
- *CURLIB/-- The model library is found in the current library for the current job.
The job list library can be entered.
This parameter provides the user with multiple entry points to the specified model. Values for these parameters are as follows:
- *EDTDBREL-- (default) The first panel to be accessed is the Edit Database Relations panel.
- *EDTMDLLST-- The mode of entry to the model is via the Edit Model List panel. If this value is specified, the MDLLST parameter specifies the model list that is edited.
- *SERVICES-- The services menu is the first panel accessed.
- *NONE-- This option can be used to establish a model environment but without any particular entry to the model. In this case the model environment is started and the developer is presented with the Command Entry panel. Numerous commands require the model environment to be active and will check to ensure that it is active when invoked. These commands will adopt an already active environment. Thus, if a series of commands are run, it will be more efficient to use this option before executing such commands. Another advantage of this option is that the lock applied to the model will be established for the entire session, preventing interference by another developer.
This parameter specifies the session list to use while editing the model. Values for these parameters are as follows:
- *MDLPRF-- (default) The session list is retrieved from the model profile details for the current user.
- *USER-- The session list has the same name as the current user.
- *SELECT-- An interactive display is used to select a model object list to be used as the session list.
The name of the list can be entered.
For more information on the purpose of SSNLST, refer to the Change Model Profile command (YCHGMDLPRF).
This parameter enables the current user to override to *NO (if authorized) the Open Access model value. The intention with this parameter is to provide a *DSNR with the opportunity to gain exclusive access to the data model. Values for these parameters are as follows:
- *MDLVAL-- (default) Access to the model is controlled by the current model value for Open Access.
- *NO-- This value can be used to set the Open Access model value to exclude any concurrent *DSNR activity in the model and to exclude users of any other class.
For more information on Open Access, see the Change Model Value command (YCHGMDLVAL).
The qualified name of the model object list that is edited. Values for these parameters are as follows:
- *USER-- The list to be edited has the same name as the current user.
- *ALLOBJ-- The all objects list is to be edited.
- *SELECT-- Special value indicating that the model object list is selected using an interactive display function.
The model can either be set up to allow concurrent *DSNRs and *PGMRs/*USERs into the model by setting the model value YOPNACC to *YES, or the model value can be left as *NO where either a single *DNSR or multiple *PGMRs/*USERs can be in the model concurrently.
- To add and remove permanent locks, or to change the Open Access (YOPNACC) model value, you must have all rights to the data model. (Designer with locks capability).
- To edit a model as a user of type *DSNR, you must have at least all rights except for existence to the model. Generally the most convenient way to arrange this is to grant all rights to all the objects in the model library (the default), and then to control access to the model by granting or revoking rights to use the data area YMDLLIBRFA in the model library. The YEDTMDL command checks the user's authority to this data area before allowing entry to the model.
- For example, to revoke all rights to user profile IVAN to edit or view a model MYMDL:
RVKOBJAUT OBJ(MYMDL/YMDLLIBRFA) + OBJTYPE(*DTAARA) USER (IVAN) AUT(*ALL)
- Or to grant user profile IVAN rights to an edit model MYMDL as designer with lock capability:
GRTOBJAUT OBJ(MYMDL/YMDLLIBRFA) + OBJTYPE(*DTAARA) USER(IVAN) AUT(*ALL)
- To override the model value YOPNACC (represented in the command by OPNACC) by specifying *NO, you must have all rights to the data area YOPNACCRFA. Access rights to YOPNACCRFA can be assigned or revoked in the same way as above. Should you wish to change the YOPNACC value temporarily just for the duration of the session, you must synchronize the model on exit.
To edit a model as a designer:
To edit a model as a programmer, using a list named after the current device name:
YEDTMDL USER(*PGMR) JOBLST(*WORKSTN)