MDCRTOBJ - Create Object in Dev Library command
MDCMS is delivered with a command-based API that provides external tools or applications the ability to create an object in the Developer Library for currently checked out source.
When invoked, MDCMS uses either the current library list or the library list defined for the job description of the request's Application and Level.
Optionally, the developer library itself can be included at the top of the library list when depending on other checked out objects that have already been created.
The creation process uses the pre-compile and compile commands defined for the Object or Attribute so that the developer is certain that the result mirrors what would occur during the actual submission of the request in an RFP.
In the case of SQL Constraints or SQL Triggers, the pre-compile and post-install commands are used to create the entity, since these types use Post-Install commands rather than Compile commands.
The MDCMS command is named MDCRTOBJ and is located in library MDCMS. It is not necessary to have the MD libraries in the library list prior to using this command. If you are unable to invoke a command from your tool, you can also directly call program MDLCRTO in library MDCMS. In this case, be certain that the parameter order and formats sent to the program exactly match the parameters in command MDCRTOBJ.
All MDCRTOBJ API transactions are logged to file MDCMS/MDDCRTO.
To find the object request, the APPL, LVL, OBJT, ATTR, OBJN and USER values must be identical. The RFP, RFPD or REQN parameters can be used to uniquely identify the request in case multiple requests for the same object name and type could exist.
MDCRTOBJ Parameter Table
| Name | Type | Length | Description |
|---|---|---|---|
| KEYWORD | Description | Type | Length |
| APPL | Application | CHAR | 6 |
| LVL | Level | INTEGER | 3 |
| OBJT | Object Type | CHAR | 7 |
| ATTR | MDCMS Attribute | CHAR | 10 |
| OBJN | Object Name | CHAR | 128 |
| USER | Programmer | CHAR | 10 |
| LIBL | Library List | CHAR | 8 |
| INCL | Include Dev Lib in LIBL | CHAR | 4 |
| REPL | Replace existing Object | CHAR | 4 |
| RFP | RFP Number | INTEGER | 7 |
| RFPD | RFP Description | CHAR | 160 |
| REQN | Object Request Number | INTEGER | 11 |
| ENV | MDCMS Environment ID | CHAR | 4 |
| VREF | Vendor Reference ID | CHAR | 20 |
| EMSG | Exception Message | CHAR | 7 |
Detailed Description of MDCRTOBJ Parameters
Application (APPL)
The target MDCMS Application code for the request
This is a required parameter.
Level (LVL)
The target MDCMS Promotion Level for the request that allows check-outs
This is a required parameter.
Object Type (OBJT)
The System or MDCMS Object Type code for the Object. For example: *PGM for a program or *IFS for an IFS file.
This is a required parameter.
MDCMS Attribute (ATTR)
The MDCMS Attribute code that identifies the behaviour and target locations for the requested object.
This is a required parameter.
Object Name (OBJN)
The name of the requested Object.
This is a required parameter.
Programmer (USER)
Specifies the user profile assigned to the existing request.
*USER - the current user profile of the job invoking this command is the user
Library List (LIBL)
Specifies the library list to use during the creation process.
*JOBD - the library list of the job description for the Application Level will be used
*CURRENT - the current library list for the job will be used
Include Dev Lib in LIBL (INCL)
Specifies if the developer library should be placed at the top of the library list to use any objects it is dependent on that have already been created.
*YES - the compile-time library list will include the developer library at the top.
*NO - the developer library won't be added to the top of the list
Replace Existing Object (REPL)
Specifies if the prior version of the object should be replaced, if it already exists.
*YES - an existing object will be replaced
*NO - MDCMS will not replace the object if it exists, and will generate an exception message.
Existing RFP Number (RFP)
Specifies the RFP assigned to the Request.
This is optional and is only used to help uniquely identify the object request
RFP Description (RFPD)
The description used for the RFP assigned to the object request.
This is optional and is only used to help uniquely identify the object request
Object Request Number (REQN)
The internal request number of the object request, which can be retrieved from the MDDAREQ log, if MDADDREQ was used to add the request.
This is optional and is only used to help uniquely identify the object request
Environment ID (ENV)
Specifies the MDCMS environment that should be used to place the Request. The ID correlates to the suffix of the MDCMS library name. For example, TEST correlates to library MDCMSTEST.
*DFT - The default environment will be used. This correlates to library MDCMS.
*CUR - The environment currently in the library list will be used
Vendor Reference ID (VREF)
Specifies the Vendor Generated Identifier in order for an external process to easily identify the transaction record in the MDDCRTO table. Any value up to 20 characters in length can be used.
Exception Message Returned (EMSG)
Specifies if and to what extent an exception message should be returned to the calling program. An exception message occurs when an input parameter value is invalid, causing the addition of the request to fail.
*DIAG - A diagnostic message will be placed in the calling program's message queue in the following format:
MDCRTOBJ Exception. Object=
If the Vendor Reference isn't passed to MDCRTOBJ, it won't be included in the diagnostic message.
*ESCAPE - The full diagnostic message as described above will be placed in the calling program's message queue and then followed by escape message CPF0001 for which the calling program can monitor.
*NONE - An exception message will not be returned to the calling program's message queue.