+

Search Tips | Advanced Search

Utility for creating conversion-exit code

Use this information to learn more about creating conversion-exit code.

The commands for creating conversion-exit code are:

    IBM i
    CVTMQMDTA (Convert IBM MQ Data Type)

    Windows, UNIX and Linux systems
    crtmqcvx (Create IBM MQ conversion-exit)

    z/OS
    CSQUCVX

The command for the platform produces a fragment of code that performs data conversion on data type structures, for use in your data-conversion exit program. The command takes a file containing one or more C language structure definitions. On z/OS, it then generates a data set containing assembler code fragments and conversion functions. On other platforms, it generates a file with a C function to convert each structure definition. On z/OS, the utility requires access to the LE/370 runtime library SCEERUN.


Invoking the CSQUCVX utility on z/OS

Figure 1 shows an example of the JCL used to invoke the CSQUCVX utility.
Figure 1. Sample JCL used to invoke the CSQUCVX utility
//CVX    EXEC PGM=CSQUCVX
//STEPLIB  DD DISP=SHR,DSN=thlqual.SCSQANLE
//         DD DISP=SHR,DSN=thlqual.SCSQLOAD
//         DD DISP=SHR,DSN=le370qual.SCEERUN
//SYSPRINT DD SYSOUT=*
//CSQUINP  DD DISP=SHR,DSN=MY.MQSERIES.FORMATS(MSG1)
//CSQUOUT  DD DISP=OLD,DSN=MY.MQSERIES.EXITS(MSG1)


z/OS data definition statements

The CSQUCVX utility requires DD statements with the following DD names shown in Table 1:

DD statement Description
SYSPRINT Specifies a data set or print spool class for reports and error messages.
CSQUINP Specifies the partitioned data set containing the definitions of the data structures to be converted.
CSQUOUT Specifies the partitioned data set where the conversion code fragments are to be written. The logical record length (LRECL) must be 80 and the record format (RECFM) must be FB.


Error messages in Windows, UNIX and Linux systems

The crtmqcvx command returns messages in the range AMQ7953 through AMQ7970.

These messages are listed in Reason codes .

There are two main types of error:

  • Major errors, such as syntax errors, when processing cannot continue.

    A message is displayed on the screen giving the line number of the error in the input file. The output file might have been partially created.

  • Other errors when a message is displayed stating that a problem has been found but that parsing of the structure can continue.

    The output file has been created and contains error information about the problems that have occurred. This error information is prefixed by #error so that the code produced is not accepted by any compiler without intervention to rectify the problems.

Parent topic: Data-conversion exit reference

Last updated: 2020-10-04