View previous topic :: View next topic
|
Author |
Message |
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
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 |
|
|
siva102
New User
Joined: 28 Nov 2007 Posts: 63 Location: Chennai
|
|
|
|
And the above data definition is in Working storage section |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
what instruction is receiving the SOC4? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I would also put 01 MQ-BUFFER-RECORD. as the last entry in working-storage. |
|
Back to top |
|
|
|