MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading Local Queue in Mainframe : Junk values

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Thu May 31, 2007 6:20 am    Post subject: Reading Local Queue in Mainframe : Junk values Reply with quote

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
View user's profile Send private message AIM Address
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Thu May 31, 2007 6:33 am    Post subject: Reply with quote

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
View user's profile Send private message
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Thu May 31, 2007 6:36 am    Post subject: Reply with quote

the complete data is junk.
pls elaborate what is wrong code page translation ?
Back to top
View user's profile Send private message AIM Address
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Thu May 31, 2007 6:38 am    Post subject: Reply with quote

ie. say if i'm passing "Welcome to MQ" as a message then i'm getting " >
Back to top
View user's profile Send private message AIM Address
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Thu May 31, 2007 7:02 am    Post subject: Reply with quote

deepeshk79 wrote:
ie. say if i'm passing "Welcome to MQ" as a message then i'm getting " >
Back to top
View user's profile Send private message
deepeshk79
Beginner


Joined: 20 Jun 2003
Posts: 112
Topics: 48
Location: Bangalore

PostPosted: Thu May 31, 2007 8:59 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group