IBM Books

Migrating to VisualAge Generator


Appendix F. Using the Message File Conversion Utility

The message file conversion utility enables you to create an external source format message file from an existing message file. Once the message file has been converted to external source format, the file can be imported into VisualAge Generator to create the message table with its table contents. You can transfer message tables using the external source format import and export. Refer to the online help system provided with VisualAge Generator Developer for more information about the import and export facility. Depending on your migration needs and the execution environments you choose, you can use either of the following two utilities to perform a message file conversion:


Using CSP/AE 3.3 Message File Conversion Utility

The MSGUTIL utility contains two CSP applications, MSGUTIL and MSGMPR. MSGUTIL and MSGMPR are shipped as an ESF file format (MSGUTIL ESF). You have to move these applications to CSP/AD 3.3 and generate into an ALF.

Before running the MSGUTIL utility from CSP/AE 3.3, make sure you have the following datasets allocated and prepared:

For VM users:

  1. Allocate file MSGFILE to an existing VSAM message file.

  2. Allocate file MSGTBLE to a CMS file to receive the external source format. The file must have 80-byte fixed-length records.

  3. Allocate file MSGOPTS to a CMS file to include the conversion parameter statement. The file must have 80-byte fixed-length records. Figure 11 shows the syntax of the conversion parameter statements.

  4. Start the message utility MSGUTIL from CSP/AE 3.3.

For MVS users:

  1. Allocate file MSGFILE to an existing VSAM message file.

  2. Allocate file MSGTBLE to a QSAM file to receive the external source format. The file must have 80-byte fixed-length records.

  3. Allocate file MSGOPTS to a QSAM file to include the conversion parameter statement. The file must have 80-byte fixed-length records. Figure 11 shows the syntax of the conversion parameter statements.

  4. Start the message utility MSGUTIL from CSP/AE 3.3 as a MVS batch job. Figure 12 shows the sample JCL.

For VSE users:

  1. Allocate file MSGFILE to an existing VSAM message file.

  2. Allocate file MSGTBLE to a VSAM ESDS file to receive the external source format. The file must have 80-byte fixed-length records.

  3. Allocate file MSGOPTS to a VSAM ESDS file to include the conversion parameter statement. The file must have 80-byte fixed-length records. Figure 11 shows the syntax of the conversion parameter statements.

  4. Start the message utility MSGUTIL from CSP/AE 3.3 as a VSE batch job. Figure 13 shows the sample JCL.

  5. Use VSE/ESA Interactive Interface Utility to transfer the message tables in VSAM ESDS created from step 4 to the workstation.

Refer to the VSE/ESA Programming and Workstation Guide for detailed instructions on how to move VSAM files from VSE to the workstation.

Figure 11. Message Table Conversion Parameters

>>-NAME=table name---+-------------------+---------------------->
                     |         .-YES--.  |
                     '-PREFIX=-+-NO---+--'
 
>-----+---------------------------+----------------------------->
      '-APPLCHAR=prefix character-'
 
>-----+-------------------------------+------------------------><
      |           .-9999-----------.  |
      '-HIGHMSGN=-+-highest number-+--'
 

NAME
Specifies the name of the table member to be created for VisualAge Generator Developer.

This keyword is required. The name can be 6 or 7 characters long, starting with an alphabetic character (A-Z). The remaining characters can be any combination of alphanumeric characters (A-Z, 0-9). The format of the name is vvvvccc, where vvvv is the value of the message table field specified in the application specifications, and ccc is a language code.

Valid language codes areas follows:

ENU
U.S. English
ENP
Uppercase English
CHS
Simplified Chinese
DEU
German
DES
Swiss German
ESP
Spanish
JPN
Japanese (Kanji)
KOR
Korean
PTB
Brazilian Portuguese

PREFIX
Specifies whether the prefix should be included in the message text.
YES
Specifies that the prefix should be included in the message text. The default is YES.
NO
Specifies that the prefix should not be included in the message text.

APPLCHAR
Specifies the character that is to be inserted before the message number. If a character is not specified, the prefix is created with a blank before the message number. In message files, this character corresponds to the fourth character in the Message File field of the application specifications, or if there are less than 4 characters in this field, a blank.

HIGHMSGN
Specifies the highest message number to be converted. Valid values are 1 through 9999. The default is 9999. If the highest number is not known or you do not specify this parameter, the utility converts all messages in the message file.

The message conversion utility returns the following codes:

0
Message file conversion was successful

8
Error occurred during message conversion.

The return code is passed in register 15 through EZERCODE. This code can be checked for conditional execution of later steps in a job.

Figure 12. Sample JCL on Running MSGUTIL for MVS Batch

//MSGUTIL JOB                                                                  
//*----------------------                                                      
//*                                                                            
//*       SAMPLE JCL FOR RUNNING THE MSGUTIL UTILITY                           
//*                                                                            
//*----------------------                                                      
//ONE EXEC PGM=DCGBINIT                                                        
//*----------------------                                                      
//*       CSP/AE FILES - LOADLIB AND MESSAGE FILE                              
//*----------------------                                                      
//STEPLIB  DD DSN=CSP.V3R3M0.AELOAD,DISP=SHR                                   
//DCADZGD  DD DSN=CSP.V3R3M0.DZGMSG,DISP=SHR                                   
//*----------------------                                                      
//*  User's ALF which contains MSGUTIL utility.                                
//*----------------------                                                      
//UMSGALF  DD DSN=SSHIEH.FZERSAM,DISP=SHR                                      
//*----------------------                                                      
//*        PRINT FILES                                                         
//*----------------------                                                      
//EZEPRINT   DD SYSOUT=A,DCB=(RECFM=VBA,LRECL=654,BLKSIZE=658)                 
//SYSPRINT DD SYSOUT=A                                                         
//*----------------------                                                      
//*       EXECUTION PARMS                                                      
//*----------------------                                                      
//DCAPARM  DD *                                                                
A=UMSGALF.MSGUTIL                                                              
/*                                                                             
//SYSOUT     DD SYSOUT=A,DCB=(RECFM=FB,BLKSIZE=133)                            
//SYSPRINT   DD SYSOUT=A                                                       
//* MSGFILE  - VSAM INPUT FILE DD STATEMENT                                    
//MSGFILE    DD DSN=xxxxx.MSGFILE.RRDS,DISP=SHR                                
//* MSGTBLE  - QSAM OUTPUT FILE DD STATEMENT                                   
//MSGTBLE    DD DSN=SSHIEH.MSGTBLE,DISP=SHR                                    
//MSGOPTS DD *                                                                 
NAME=MSGENU  PREFIX=YES APPLCHAR=A HIGHMSGN=9999                               
/*                                                                             
//                                                                             

Figure 13. Sample JCL on Running MSGUTIL for VSE Batch

* $$ JOB JNM=MSGCRUN,CLASS=6,DISP=D,NTFY=(CARVM3,SSHIEH)                       
* $$ LST CLASS=A,DEST=(CARVM3,SSHIEH)                                          
* $$ PUN CLASS=A,DEST=(CARVM3,SSHIEH)                                          
* Message file conversion utility                                              
// JOB  MSGCRUN 410 DELETE MISC                                                
// ASSGN SYS005,SYSLST                                                         
// OPTION PARTDUMP                                                             
// DLBL SHVSAMU,'SHVSAMU',,VSAM                                                
// DLBL CS2VSMU,'CS2VSMU',,VSAM                                                
* -------------------------------------------------------------------          
*  Existing message file - Replace with your dataset name                      
* -------------------------------------------------------------------          
// DLBL MSGFILE,'CSP.V3R3M0.EZEMSG.C',,VSAM,CAT=SHVSAMU                        
* -------------------------------------------------------------------          
*  File to receive definition in external source format                        
* -------------------------------------------------------------------          
// DLBL MSGTBLE,'SSHIEH.MSGTBLE',,VSAM,CAT=CS2VSMU                             
* -------------------------------------------------------------------          
*       Option file                                                            
*       Valid options are:                                                     
*       name =      Represents names of the table member                       
*       prefix =    Whether or not a message prefix is desired                 
*       applchar=   Application specific character for insert                  
*       highmsgn=   Highest message number to convert                          
*                                                                              
* -------------------------------------------------------------------          
// DLBL MSGOPTS,'SSHIEH.MSGOPTS',,VSAM,CAT=CS2VSMU                             
* -------------------------------------------------------------------          
* Run the Message Conversion Utility CSP/AE application (MSGUTIL)              
* -------------------------------------------------------------------          
// DLBL UMSGALF, 'SSHIEH.UMSGALF',,VSAM,CAT=CS2VSMU                            
// DLBL DCADZGD, 'CSP.V3R3M0.DZGMSG.C',,VSAM,CAT=SHVSAMU                       
// LIBDEF PHASE,SEARCH=(PRD3.CSP330M,PRD3.CSP330A,PRD3.CSPCOMM)                
// EXEC PGM=DCBYINIT,SIZE=64K                                                  
A=UMSGALF.MSGUTIL U=SSHIEH                                                     
F=EZEPRINT S=005                                                               
;;                                                                             
/*                                                                             
/&                                                                             
* $$ EOJ                                                                       


Using VisualAge Generator Message File Conversion Utility

The DZGMSGC utility is shipped with VisualGen Host Services on MVS, VSE, and VM. Use this utility if you have installed VisualGen Host Services on these environments.

Converting a Message File to an External Source Format Table

Perform the following procedures to convert an existing message file into an external source format table:

  1. Allocate file MSGFILE to an existing message file.

  2. Allocate file MSGTBLE to a sequential file to receive the external source format. The file must have 80-byte fixed-length records.

  3. Include the conversion parameter statement in your job stream. Figure 11 shows the syntax of the conversion parameter statement.

  4. Start the message utility, DZGMSGC.

For a sample execution JCL, refer to the appropriate VisualAge Generator running document for your environment.


Sample JCL for the Message File Conversion Utility

Figure 14. Sample JCL for Message Conversion Utility

//DZGMSGC JOB
//*--------------
//*
//*    SAMPLE JCL FOR RUNNING THE MESSAGE FILE CONVERSION UTILITY
//*
//*--------------
//*
//*--------------
//*    ONE OF THE THREE CHARACTER NLS CODES CAN BE SPECIFIED
//*    AS A PARM.  IF NO NLS CODE IS SPECIFIED, THE
//*    INSTALLATION DEFAULT IS USED
//*--------------
//ONE EXEC PGM=DZGMSGC,PARM='ENU'
//*
//*--------------
//*    LOAD LIBRARIES
//*--------------
//STEPLIB DD DSN=FIX.SELALMD,DISP=SHR
//        DD DSN=COB2.COBLIB,DISP=SHR
//*
//*--------------
//*    PRINT FILES
//*--------------
//SYSOUT   DD SYSOUT=A
//SYSOUT   DD SYSOUT=A,DCB=(RECFM=FB,BLKSIZE=133)
//EZEPRINT DD SYSOUT=A,DCB=(RECFM=VBA,LRECL=654,BLKSIZE=658)
//SYSPRINT DD SYSOUT=A
//*--------------
//*    EXISTING MESSAGE FILE - REPLACE WITH YOUR DATASET NAME
//*--------------
//MSGFILE  DD DSN=USER1.MSGFILE,DISP=SHR
//*--------------
//*    FILE TO RECEIVE DEFINITION IN EXTERNAL SOURCE FORMAT.
//*    IF NOT ALLOCATED, YOU SHOULD CREATE IT FIRST
//*--------------
//MSGTBLE DD DSN=USER1.MSGTBLE,DISP=MOD
//*--------------
//*    OPTIONS FILE
//*    VALID OPTIONS ARE:
//*    NAME=     REPRESENTS NAME OF THE TABLE MEMBER
//*    PREFIX=   WHETHER OR NOT A MESSAGE PREFIX IS DESIRED
//*    APPLCHAR= APPLICATION SPECIFIC CHARACTER FOR INSERT
//*    HIGHMSGN= HIGHEST MESSAGE NUMBER TO CONVERT
//*--------------
//MSGOPTS DD *
NAME=MSGENU  PREFIX=YES APPLCHAR=A HIGHMSGN=9999
/*
//


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]