ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » MVS COBOL MQSeries - RFH2 header

Post new topic  Reply to topic
 MVS COBOL MQSeries - RFH2 header « View previous topic :: View next topic » 
Author Message
totof
PostPosted: Wed Jun 06, 2007 1:19 pm    Post subject: MVS COBOL MQSeries - RFH2 header Reply with quote

Newbie

Joined: 06 Jun 2007
Posts: 4

Hi all (excuse my poor english, I'm a french guy ...),

Is there anyone who could help me in my difficult quest.
Il'd like to code a RFH2 header with COBOL.

An existing topic explain about it on mqseries.net. It has been very helpful

If I have all understood, the composition of the body the message should resemble to : http://www.mqseries.net/phpBB2/viewtopic.php?t=24875&sid=2d1a5d6a89a687d7dadd8cfb8e2f05d1

RFH2 header (constructs with RFH2 structure) (36 bytes)
+ Length of <MCD> data (4 bytes)
+ <MCD> data (n1 bytes where n1 is multiple of 4)
+ Length of <JMS> data (4 bytes)
+ <JMS> data (n2 bytes where n2 is multiple of 4)
+ Length of <USR> data (4 bytes)
+ <USR> data (n3 bytes where n3 is multiple of 4)
+ data body

I don't understand because the length of each following block is correctly set in my message.

- MQRFH2-VERSION is correctly set to '2' => '00 00 00 02' in hexa
- MQRFH2-ENCODING is correctly set to '273' => '00 00 01 11' in hexa
- MQRFH2-FLAGS is correctly set to '0' => '00 00 01 11' in hexa

But all the other numeric values are not correctly set in hexa :

For example :

- MQRFH2-NAMEVALUECCSID should be 1208, or '00 00 04 B8' in hexa however I have '00 00 95 95'

- <JMS> length should be 112 bytes long, or '00 00 00 20' in hex, however I have '00 00 00 95'

- <USR> length should be 68 bytes long, or '00 00 00 44' in hex, however I have '00 00 00 90'

For information :

- Transmitter entity : OS/390 - MVS - COBOL
- Receiver entity : UNIX - JMS

Any help would be appreciated,
Thanks a lot,
Totof
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jun 06, 2007 2:09 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

What is the rationale behind creating the RFH in COBOL?
Is this a must?
If yes would the C support pack for XMS be acceptable?? is it available for zOS???
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
totof
PostPosted: Wed Jun 06, 2007 10:27 pm    Post subject: Reply with quote

Newbie

Joined: 06 Jun 2007
Posts: 4

I have unfortunately no other choice

The Unix recipient architecture force to use a mutualised channel. Today, more than 30 entities (which are not ZOS ... but Unix platform ...) communicate with.

So, in order to know how to react according to the sender, JMS has been set up. However, never, a MVS system tried to communicate with them in real time yet.

I juste made the experience ...

This is why I have to force this $#@%*# RFH2 header ... but I'm not directly concerned by the development task. I'm just driving this project (from the MVS side)

Concerning the C, I was interesting in and I verified. But this solution is not "thinkable", even if any jobs are actually running on MVS. No guy has the C knowledge in the developpers team (only COBOL).

Precisely, about C, the developpers are actually using an ASM module which runs an other module wrote with C.
(This job is not maintained no more... )
It performs a transcribing (EBCDIC => ASCII) directly in the body of the message, after it has been build.

All the bytes are well translated, except the examples I gave higher ... I'm assuming, a "bug" happens with this c job ... But I don't understand why ...

Do you see any other way to force the bytes translation ?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jun 07, 2007 2:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The JMS program can easily read a message that does not have an RFH2 header on it.

Unless the writer of that application has incorrectly designed it to rely on information that can only be stored in an RHF2 header.

In which case, you're in for a fun time. Building an RFH2 header in cobol is *hard*, it's a variable length structure. It also has to only be in certain specific code pages. It may be easiest to capture a valid RHF2 header in a dataset or something, and then treat it like a piece of text and substitute your specific values in known places. That is, treat it like a form letter, and replace pieces with variable data.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
totof
PostPosted: Thu Jun 07, 2007 1:22 pm    Post subject: Reply with quote

Newbie

Joined: 06 Jun 2007
Posts: 4

Thank you for your advices.

Otherwise, would you know I could do the following in COBOL ?

I'ld like to replace any bytes in a String.

Example :

The string 'Hello world' is in a file. I'ld like to have this :

'Hell....rld' where '....' is, in hexa, for example, '00 00 04 B8' => 1208 in decimal

What I'm trying to do is to insert BINARY code in string message in a file.

Is this possible ? If yes, I would manage to finalize my quest

Thanx again
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 07, 2007 2:27 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
So, in order to know how to react according to the sender, JMS has been set up. However, never, a MVS system tried to communicate with them in real time yet.

Can you be more specific?
Even without sending an RFH2 header the JMS receiver should be able to determine the JMSReplyTo Destination and a number of other stuff like application name etc... providing it got put into the MQMD at sending time...

If the distributed qmgr is V6 you can use the default of the qcf for targetClientMatching which strips the RFH if there was none on the request...

Finally (en derniere mesure) it might be easier/faster to create an app on the distributed qmgr to supply the missing RFH header ...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
totof
PostPosted: Thu Jun 07, 2007 3:03 pm    Post subject: Reply with quote

Newbie

Joined: 06 Jun 2007
Posts: 4

Fjb_saper, you're right ... but they don't want to change their parameter setting ... cause they are not sure of the result ... They mean it's too risked.

It's why I'ld like to proceed to this binary/string handling described higher in COBOL ...

It would be great if it was possible.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 07, 2007 3:26 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

totof wrote:
Fjb_saper, you're right ... but they don't want to change their parameter setting ... cause they are not sure of the result ... They mean it's too risked.

It's why I'ld like to proceed to this binary/string handling described higher in COBOL ...

It would be great if it was possible.


What parameter setting ?
If it is JMS there is no parameter setting difference between receiving a message with and RFH or without.

The only difference is that the properties housed in the user folder of the RFH will not be available...

Has anybody run a test (prototype) without the RFH header and what was the missing info??

------------------------------
(La France parle aux francais (moitie du paquet de goldos))
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MVS COBOL MQSeries - RFH2 header
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.