crtmqcvx (data conversion)
Purpose
Use the crtmqcvx command to create a fragment of code that performs data conversion on data type structures. The command generates a C function that can be used in an exit to convert C structures.
The command reads an input file containing structures to be converted, and writes an output file containing code fragments to convert those structures.
For information about using this command, see the WebSphere MQ Application Programming Guide.
Syntax
>>-crtmqcvx--SourceFile--TargetFile----------------------------><
Required parameters
- SourceFile
- The input file containing the C structures to convert.
- TargetFile
- The output file containing the code fragments generated to convert the structures.
Return codes
0 Command completed normally 10 Command completed with unexpected results 20 An error occurred during processing
Examples
The following example shows the results of using the data conversion command against a source C structure. The command issued is:
crtmqcvx source.tmp target.cThe input file, source.tmp looks like this:
/* This is a test C structure which can be converted by the */ /* crtmqcvx utility */ struct my_structure { int code; MQLONG value; };The output file, target.c, produced by the command is shown below. You can use these code fragments in your applications to convert data structures. However, if you do so, the fragment uses macros supplied in the header file amqsvmha.h.
MQLONG Convertmy_structure( PMQBYTE *in_cursor, PMQBYTE *out_cursor, PMQBYTE in_lastbyte, PMQBYTE out_lastbyte, MQHCONN hConn, MQLONG opts, MQLONG MsgEncoding, MQLONG ReqEncoding, MQLONG MsgCCSID, MQLONG ReqCCSID, MQLONG CompCode, MQLONG Reason) { MQLONG ReturnCode = MQRC_NONE; ConvertLong(1); /* code */ AlignLong(); ConvertLong(1); /* value */ Fail: return(ReturnCode); }
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.