View previous topic :: View next topic |
Author |
Message |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Thu May 31, 2007 6:20 am Post subject: Reading Local Queue in Mainframe : Junk values |
|
|
Hi,
I have some data in my Local Queue in Mainframe and I'm trying to read it through a batch program. After I read successfully the local queue, i'm displaying the data in spool. But in spool the display statement is showing some junk values.... I'm sure that the Local Queue that I'm reading has some valid text coming from MQ in Windows.
If I try to write into the Local Queue some data with a batch pgm in MF and then read it with another batch pgm in MF, I'm able to get the messages properly but why is it that the message coming from MQ in windows cannot be read properly...
Thanks,
Deepesh |
|
Back to top |
|
|
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Thu May 31, 2007 6:33 am Post subject: |
|
|
Just some of the data is junk? The bulk of the data is good?
Could this be a case of a wrong code page translation? |
|
Back to top |
|
|
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Thu May 31, 2007 6:36 am Post subject: |
|
|
the complete data is junk.
pls elaborate what is wrong code page translation ? |
|
Back to top |
|
|
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Thu May 31, 2007 6:38 am Post subject: |
|
|
ie. say if i'm passing "Welcome to MQ" as a message then i'm getting " > |
|
Back to top |
|
|
CICS Guy Intermediate
Joined: 30 Apr 2007 Posts: 292 Topics: 3
|
Posted: Thu May 31, 2007 7:02 am Post subject: |
|
|
deepeshk79 wrote: | ie. say if i'm passing "Welcome to MQ" as a message then i'm getting " > |
|
Back to top |
|
|
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Thu May 31, 2007 8:59 am Post subject: |
|
|
I got the solution for this problem... the reason is I didnt use MQGMO-CONVERT in the MQGMO-OPTIONS in my MQGET.
MQGMO-CONVERT helps us to convert the CCSID that we get from Windows to the CCSID in Mainframe. Until this conversion happens or the two CCSIDs are in sync we cannot get the proper data flow. Thus I modified my call as below
Code: |
COMPUTE MQGMO-OPTIONS = MQGMO-NO-WAIT +
MQGMO-ACCEPT-TRUNCATED-MSG +
MQGMO-CONVERT.
CALL 'MQGET' USING GET-CON-HANDLE,
GET-Q-HANDLE,
MQM-MESSAGE-DESCRIPTOR,
MQM-GET-MESSAGE-OPTIONS,
GET-BUFFER-LENGTH,
I-MSG,
GET-DATA-LENGTH,
GET-COMP-CODE,
GET-REASON-CODE.
|
And this worked.
Thanks,
Deepesh |
|
Back to top |
|
|
|
|
|
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
|
|