Invoking the message compiler

The message compiler is an executable program. You can use JCL, a TSO/E CLIST, or a REXX EXEC to invoke the message compiler. The syntax for each type of invocation follows. The meaning of the variables (shown in lowercase in the examples) follows the examples.
Figure 1. Using JCL to Invoke the Compiler with a single PDS as input
  //COMPILE  EXEC  PGM=CNLCCPLR,
  //               PARM=(lang,dbcs)
  //SYSUT1   DD    DSN=msg_pds,DISP=SHR
  //SYSUT2   DD    DSN=msg_div_obj,DISP=(OLD,KEEP,KEEP)
  //SYSPRINT DD    SYSOUT=*
 
Figure 2. Using JCL to Invoke the Compiler with a concatenation of partitioned Data Sets as input
  //COMPILE  EXEC  PGM=CNLCCPLR,
  //               PARM=(lang,dbcs)
  //SYSUT1   DD    DSN=msg_pds1,DISP=SHR
  //         DD    DSN=msg_pds2,DISP=SHR
             :
             :
  //         DD    DSN=msg_pdsn,DISP=SHR
  //SYSUT2   DD    DSN=msg_div_obj,DISP=(OLD,KEEP,KEEP)
  //SYSPRINT DD    SYSOUT=*
 
Figure 3. Using a TSO/E CLIST to Invoke the Compiler with a single PDS input
  PROC 0
  FREE DD(SYSUT1,SYSUT2,SYSPRINT)             /* FREE DD'S           */
  ALLOC DD(SYSUT1) DSN('msg_pds') SHR         /* ALLOC INPUT FILE    */
  ALLOC DD(SYSUT2) DSN('msg_div_obj') OLD     /* ALLOC OUTPUT FILE   */
  ALLOC DD(SYSPRINT) DSN(*)                   /* ALLOC SYSPRINT      */
  CALL 'SYS1.LINKLIB(CNLCCPLR)' 'lang,dbcs'
                                            /* CALL MESSAGE COMPILER */
  SET &RCODE = &LASTCC                        /* SET RETURN CODE     */
  FREE DD(SYSUT1,SYSUT2,SYSPRINT)             /* FREE FILES          */
  EXIT CODE(&RCODE)                           /* EXIT                */
 
Figure 4. Using a TSO/E CLIST to Invoke the Compiler with a concatenation of partitioned Data Set as input
  PROC 0
  FREE DD(SYSUT1,SYSUT2,SYSPRINT)             /* FREE DD'S           */
  ALLOC DD(SYSUT1) DSN('msg_pds1' +            /* ALLOC INPUT FILE   */
  ALLOC DD(SYSUT1) DSN 'msg_pds1' +            /* ALLOC INPUT FILE   */
                          :
                          :
  ALLOC DD(SYSUT1) DSN 'msg_pdsn') SHR         /* ALLOC INPUT FILE   */
  ALLOC DD(SYSUT2) DSN('msg_div_obj') OLD     /* ALLOC OUTPUT FILE   */
  ALLOC DD(SYSPRINT) DSN(*)                   /* ALLOC SYSPRINT      */
  CALL 'SYS1.LINKLIB(CNLCCPLR)' 'lang,dbcs'
                                            /* CALL MESSAGE COMPILER */
  SET &RCODE = &LASTCC                        /* SET
  RETURN CODE     */
  FREE DD(SYSUT1,SYSUT2,SYSPRINT)             /* FREE FILES          */
  EXIT CODE(&RCODE)                           /* EXIT                */
 
 
Figure 5. Using a REXX exec to Invoke the Compiler with a single PDS as input
/* MESSAGE COMPILER INVOCATION EXEC */

MSGCMPLR:

"FREE DD(SYSUT1,SYSUT2,SYSPRINT)"

"ALLOC DD(SYSUT1) DSN('"msg_pds"') SHR"
"ALLOC DD(SYSUT2) DSN('"msg_div_obj"') OLD"
"ALLOC DD(SYSPRINT) DSN(*)"

"CALL 'SYS1.LINKLIB(CNLCCPLR)' 'lang,dbcs'"

compiler_rc=rc

"FREE DD(SYSUT1,SYSUT2,SYSPRINT)"

return(compiler_rc)
 
 
Figure 6. Using a REXX exec to Invoke the Compiler with a concatenation of partitioned Data Sets as input
/* MESSAGE COMPILER INVOCATION EXEC */

MSGCMPLR:

"FREE DD(SYSUT1,SYSUT2,SYSPRINT)"

"ALLOC DD(SYSUT1) DSN('msg_pds1',",
                      "'msg_pds2',",
                            :
                            :
                      "'msg_pdsn') SHR"

"ALLOC DD(SYSUT2) DSN('"msg_div_obj"') OLD"
"ALLOC DD(SYSPRINT) DSN(*)"

"CALL 'SYS1.LINKLIB(CNLCCPLR)' 'lang,dbcs'"

compiler_rc=rc

"FREE DD(MSGIN,MSGOUT,SYSPRINT)"

return(compiler_rc)
 

The lowercase variables used in the preceding examples are defined as follows:

msg_pds
is the name of the install message file containing all the application's message skeletons for a specific language. msg_pds must be a partitioned data set.
msg_pds1
is the name of the install message file containing the the first application's message skeletons for a specific language. msg_pds1 must be a partitioned data set.
msg_pds2
is the name of the install message file containing the the second application's message skeletons for a specific language. msg_pds2 must be a partitioned data set.
msg_pdsn
is the name of the install message file containing the the last application's message skeletons, in the message skeleton PDS concatenation, for a specific language. msg_pdsn must be a partitioned data set.
Note: When you specify a concatenation of partitioned data set as input to the MVS™ message service (MMS) compiler, all members within the partitioned data set will be processed. The MMS compiler will process all members within the concatenation of partitioned data sets without regard to uniqueness of member names. If two partitioned data sets specified in the concatenation have members with the same name, both members will be processed by the MMS compiler.
msg_div_obj
specifies the name of the run-time message file that is to contain the compiled message skeletons for the language. msg_div_obj must be a linear VSAM data set suitable for use as a data-in-virtual object.
lang,dbcs
specifies two parameters. lang is the 3-character language code of the messages contained in the install message file. dbcs indicates whether this language contains double-byte characters. The values for dbcs are y for yes and n for no.
After creating run-time message files by compiling the install message file, determine the amount of storage the run-time message files used. This calculation is necessary when compiling these messages in the system's run-time message files. The following JCL example shows you how to run a report showing the storage used.
//LISTCAT   JOB MSGLEVEL=(1,1)
//MCAT      EXEC PGM=IDCAMS,REGION=4096K
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
  LISTCAT   LEVEL(msg_div_obj) ALL
/*