|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
RFH2 header in OS390 program |
« View previous topic :: View next topic » |
Author |
Message
|
miron |
Posted: Thu Dec 19, 2002 6:53 am Post subject: RFH2 header in OS390 program |
|
|
Apprentice
Joined: 27 Jun 2002 Posts: 39 Location: New York
|
Hi,
I am trying to use RFH2 header NameValueData to pass some information from MVS PL/1 to my WMQI flow.
Has anybody did something similar? It looks like my RFH2 header is not populated by my MVS program however MQMD format is showing as MQHRF2.
I would appreciate some help if anybody's done this.
Thanks.
Miron |
|
Back to top |
|
 |
pgorak |
Posted: Fri Dec 20, 2002 1:52 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
I did not experience any problems with MQRFH2 on MVS (using programs written in C). Could you provide some details on your program logic?
Piotr |
|
Back to top |
|
 |
miron |
Posted: Fri Dec 20, 2002 7:29 am Post subject: RFH2 |
|
|
Apprentice
Joined: 27 Jun 2002 Posts: 39 Location: New York
|
Hi Piotr,
Basically my code looks like this:
DCL
1 MQRFH2,
3 STRUCID CHAR(4) INIT('RFH '),
3 VERSION FIXED BIN(31) INIT(2),
3 STRUCLENGTH FIXED BIN(31) INIT(60),
3 ENCODING FIXED BIN(31) INIT(785),
3 CODEDCHARSETID FIXED BIN(31) INIT(-2),
3 FORMAT CHAR(8) INIT(' '),
3 FLAGS FIXED BIN(31) INIT(0),
3 NAMEVALUECCSID FIXED BIN(31) INIT(1208),
3 NAMEVALUELENGTH FIXED BIN(31) INIT(20),
3 NAMEVALUEDATA CHAR(20) INIT(' ');
WS_MQMD.MSGTYPE = MQMT_DATAGRAM;
WS_MQMD.MSGID = MQMI_NONE;
WS_MQMD.FORMAT = MQFMT_RF_HEADER_2;
MQRFH2.NAMEVALUEDATA = '<RFH2>TEST</RFH2> ';
WS_MQPMO.OPTIONS = MQPMO_SYNCPOINT +
MQPMO_FAIL_IF_QUIESCING;
INVOICELEN =0;
INVOICELEN = CSTG(INVOICE_OUT);
CALL MQPUT (WS_HCONN,
WS_HOBJ_TO_WMQI,
WS_MQMD,
WS_MQPMO,
INVOICELEN,
INVOICE_OUT,
WS_COMPCODE,
WS_REASON);
IF WS_COMPCODE = MQCC_OK
THEN DO; ......
When I write a message to the queue I can browse it using rfhutil and it shows as MQFRH2 in MQMD format but RFH2 header is not there. It is similar when using Candle to view the message.
Do I have to convert NameValueData to ASCII (UTF-8) ? or I can just assign my xml string data like that?
Miron |
|
Back to top |
|
 |
pgorak |
Posted: Mon Jan 06, 2003 12:06 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
Hi Miron,
First of all, do you set NameValueLength and StructLength fields in your MQRFH2 header? I can't see them in your code. If you set these fields, remember that the length of each RFH2 folder should be the a multiple of four, so you'll probably need to apply some padding (see the description of MQRFH2 structure).
Do you set MQRFH2.Format and MQRFH2.CodedCharSetId fields? Note that the possible values of the latter field are:
1200 UCS-2 open-ended
13488 UCS-2 2.0 subset
17584 UCS-2 2.1 subset (includes the Euro symbol)
1208 UTF-8
I convert folder data manually (EBCDIC to UTF8) and I don't know whether there is any other way to set NameValueData field on OS/390.
Piotr |
|
Back to top |
|
 |
miron |
Posted: Wed Jan 08, 2003 9:45 am Post subject: |
|
|
Apprentice
Joined: 27 Jun 2002 Posts: 39 Location: New York
|
Hello,
Thank you for your answers.
Finally I was able to create RFH2 header.
I have to convert NameValueData into ASCII format.
The problem was that I was trying to browse the message with RFHUTILC v3.0 which i think had some bug in it and was not displaying my header data. After I downloaded newest v3.2 it worked and my header was there.
Thanks again.
Miron |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|