IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SOC4 Abend while getting message from a MQ


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
siva102

New User


Joined: 28 Nov 2007
Posts: 63
Location: Chennai

PostPosted: Thu Jul 29, 2010 7:20 pm
Reply with quote

hi,

when I tried to get a message from a queue, I am getting SOC4. How ever I could get the message successfully into the Buffer area, when the MQ-BUFFER-LENGTH is 32800 bytes instead of 2000000 bytes.

Can any one help me on this. The maximum message lenght i expect from the queueu is 2000000 bytes.

The queue specifications are as follows:
MQ-CURRENT-Q-DEPTH :000000057
MQ-MAX-MSG-LENGTH :004194304
MQ-MAX-Q-DEPTH :000010000



Code:

     MOVE  2000000                    TO MQ-BUFFER-LENGTH.       
                                                                 
     MOVE MQMI-NONE                   TO MQMD-MSGID.             
     MOVE MQCI-NONE                   TO MQMD-CORRELID.         
                                                                 
*****WAIT FOR UNLIMITED TIME BEFORE SUCCESSFUL CALL             
     MOVE MQWI-UNLIMITED              TO MQGMO-WAITINTERVAL     
     COMPUTE MQGMO-OPTIONS = MQGMO-WAIT + MQGMO-SYNCPOINT       
                                        + MQGMO-CONVERT.         
                                                                 
     MOVE SPACES                      TO MQ-BUFFER-RECORD       
                                             
                                                                 
     CALL MQBATCHGET  USING MQ-HCONN                             
                            MQ-HOBJO-AJD-CLMLD                   
                            MQMD                                 
                            MQGMO                               
                            MQ-BUFFER-LENGTH                     
                            MQ-BUFFER-RECORD                     
                            MQ-DATA-LENGTH                       
                            MQ-COMPCODE                         
                            MQ-REASON.                           
                                                                 
     IF MQ-REASON = MQRC-NO-MSG-AVAILABLE                       
                             
        DISPLAY 'ALL MESSAGES ARE PROCESSED'                   
        SET EOD-MSG                   TO TRUE                   
     END-IF.                                                     
     IF (MQ-COMPCODE NOT = MQCC-OK)                             
             
        PERFORM ABORT-RTN                   
     END-IF.                                                     


Thanks in Advance.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 7:28 pm
Reply with quote

first, this is a waste of time:
Code:

MOVE SPACES                      TO MQ-BUFFER-RECORD

you receive a data length from the getmsg,
moving spaces is just a waste of time.

two:
provide us with the data definition of MQ-BUFFER-RECORD.
is it in linkage, working-storage or local storage?
cut&paste, please no paraphrasing.
Back to top
View user's profile Send private message
siva102

New User


Joined: 28 Nov 2007
Posts: 63
Location: Chennai

PostPosted: Thu Jul 29, 2010 7:56 pm
Reply with quote

Code:
 ***** MESSAGE BLOCK HANDLES                                       
  01 MQ-MQM                          PIC X(48) VALUE SPACES.       
  01 MQ-OBJECTNAME                   PIC X(48) VALUE SPACES.       
  01 MQ-BUFFER-RECORD.                                             
     05 MQ-BUFFER-BYTES              PIC X(01) OCCURS 0 TO 2000000
                      TIMES DEPENDING ON MQ-BUFFER-LENGTH.         
  01 MQ-BUFFER-LENGTH                PIC S9(9) BINARY.             
  01 MQ-OPTIONS                      PIC S9(9) BINARY.             
  01 MQ-HOBJ                         PIC S9(9) BINARY.             
  01 MQ-DATA-LENGTH                  PIC S9(9) BINARY.             
  01 MQ-COMPCODE                     PIC S9(9) BINARY.             
  01 MQ-REASON                       PIC S9(9) BINARY.             
Back to top
View user's profile Send private message
siva102

New User


Joined: 28 Nov 2007
Posts: 63
Location: Chennai

PostPosted: Thu Jul 29, 2010 8:02 pm
Reply with quote

And the above data definition is in Working storage section
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 8:38 pm
Reply with quote

what instruction is receiving the SOC4?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 9:17 pm
Reply with quote

I would also put 01 MQ-BUFFER-RECORD. as the last entry in working-storage.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts ISAM and abend S03B JCL & VSAM 10
This topic is locked: you cannot edit posts or make replies. how can I proof that message was post... Java & MQSeries 1
No new posts IMS Message : DFS3577A IMS DB/DC 4
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
Search our Forums:

Back to Top