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

2079 (081F) (RC2079): MQRC_TRUNCATED_MSG_ACCEPTED


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

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Wed Mar 04, 2015 10:10 am
Reply with quote

Hello Everyone

Details of the issue

One of the application program abended with issue mentioned in subject line.
On an MQGET call, the message length was too large to fit into the supplied buffer. Message length was too long for program to handle.

My requirement is to increase the bufferlength for a queue at application (program) level. I am not aware how parameter buffer length is handled in program.

Can anyone please advice how can we increase the buffer length in program.
Back to top
View user's profile Send private message
puneetvirmani143

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Thu Mar 05, 2015 11:20 am
Reply with quote

Hello Everyone

Can anyone help me out to resolve on this. Would be really appreciated
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 05, 2015 5:20 pm
Reply with quote

The replies on this forum are by volunteers -- people who answer IF they have the knowledge, and the time, to post a reply. If you are not getting replies, it may be that nobody has the knowledge -- or time -- to respond to your post. Or it could mean that nobody wants to try to take the time to figure out what you mean by "bufferlength". You have not posted very much to help us -- no code, no exact error message (just your paraphrased interpretation). You don't even show us the MQGET code so we could see what you've put in it.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Mar 05, 2015 6:41 pm
Reply with quote

if instead of soliciting/waiting lazily for a forum reply You had googled
with ( for example ) MQGET CALL PARAMETERS

the first link returned
Quote:
MQGET – MQGET call with syntax, parameters, usage notes ...
www-01.ibm.com/support/knowledgecenter/SSFKSJ.../fr17190_.htm
The MQGET call retrieves a message from a local queue that has been opened using the MQOPEN call.


would have taken You to the relevant documentation
www-01.ibm.com/support/knowledgecenter/#!/SSFKSJ_7.1.0/com.ibm.mq.doc/fr17190_.htm

Quote:
MQGET (Hconn, Hobj, MsgDesc, GetMsgOpts, BufferLength, Buffer, DataLength, CompCode, Reason)


Quote:
If BufferLength is less than the message length, MsgDesc is filled by the queue manager, whether MQGMO_ACCEPT_TRUNCATED_MSG is specified on the GetMsgOpts parameter (see MQGMO - Options field).
Back to top
View user's profile Send private message
puneetvirmani143

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Sun Mar 08, 2015 7:05 pm
Reply with quote

Hi Robert

First time I am using MQseries in mainframes so I want to learn it from experts like you icon_smile.gif

I would explain the issue whatever I know

In one of our application, cobol program abended with below reason
2079 (081F) (RC2079): MQRC_TRUNCATED_MSG_ACCEPTED
2004 (07D4) (RC2004): MQRC_BUFFER_ERROR

While MQGET call ,The message length was too large for the application program to handle.
However I am not sure then how message was placed into message queue. Probably the message got truncated and then placed on Message queue.
But while MQPUT call the cobol program was not able to handle the length of message on queue.

Screen shot for MQGET call

MOVE MQCI-NONE TO MQMD-CORRELID.

COMPUTE MQGMO-OPTIONS = MQGMO-WAIT
+ MQGMO-ACCEPT-TRUNCATED-MSG
+ MQGMO-FAIL-IF-QUIESCING
+ MQGMO-CONVERT.

MOVE LENGTH OF W-MSGBUFFER OF W-INN-MSG TO W-MSGLENGTH.
COMPUTE W-HOBJ = W-HOBJ-APPL.

MOVE 'MQGET' TO W-MQ-KALL.

EXEC SQL
SET :W-MQWAIT-START = CURRENT TIMESTAMP
END-EXEC.

CALL 'MQGET' USING W-HCONN
W-HOBJ
MQMD
MQGMO
W-MSGLENGTH
W-INN-MSG
W-DATALENGTH
W-COMPCODE
W-REASON.
------------------------------------------------------------------ --> MQPUT call

COMPUTE W-MSGLENGTH =
LENGTH OF W-JLOG-HEADER + W-DATALENGTH.
COMPUTE W-HOBJ = W-HOBJ-JURLOGG.

MOVE 'MQPUT' TO W-MQ-KALL.

CALL 'MQPUT' USING W-HCONN
W-HOBJ
MQMD
MQPMO
W-MSGLENGTH
W-JLOG-MSG
W-COMPCODE
W-REASON.

COMPUTE W-COMPCODE-DISP = W-COMPCODE.
COMPUTE W-REASON-DISP = W-REASON.


I am not sure changing what parameter in program will resolve the issue.
It was my assumption that changing bufferlength can do this.

Please suggest how it can be fixed. Your suggestion would be really apprecisated.
Back to top
View user's profile Send private message
karthick1990

New User


Joined: 12 Jun 2014
Posts: 4
Location: India

PostPosted: Mon Mar 09, 2015 12:16 am
Reply with quote

Also post how W-MSGLENGTH is declared. Is it S9(09) Comp ? . If not change it and try.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Mar 09, 2015 6:45 pm
Reply with quote

puneetvirmani143 wrote:
...
MOVE LENGTH OF W-MSGBUFFER OF W-INN-MSG TO W-MSGLENGTH.
...
CALL 'MQGET' USING W-HCONN
W-HOBJ
MQMD
MQGMO
W-MSGLENGTH
W-INN-MSG
W-DATALENGTH
W-COMPCODE
W-REASON.
...
COMPUTE W-MSGLENGTH =
LENGTH OF W-JLOG-HEADER + W-DATALENGTH.
...
CALL 'MQPUT' USING W-HCONN
W-HOBJ
MQMD
MQPMO
W-MSGLENGTH
W-JLOG-MSG
W-COMPCODE
W-REASON.


To prevent code 2079, you have to increase the size of W-MSGBUFFER.
You received code 2004 certainly because W-DATALENGTH contains a too large value (it contains the untruncated message length).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Mar 09, 2015 8:24 pm
Reply with quote

you can determine the max msg length established by the mq manager parms with an mqinq (i think, you have to look it up). that will tell you, among other things, the max msg length supported by the particular queue upon which you run the inq.

as several people have already stated,
your buffer size is set by the program executing the mget. this is working storage allocated by the program (or another addressed via linkage section).

so after determining the max size allowable by the queue manager for this queue, allocate the working storage buffer to the same length.

SIDE NOTE:
why people think they are clever and write programs allocating a length for their current project msg size, instead of allocating the max size???
the days of 16k memory are long gone......
Back to top
View user's profile Send private message
puneetvirmani143

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Tue Mar 10, 2015 11:31 am
Reply with quote

Thanks everyone for your suggestion.

I checked for the max msg length for the queue and below is the statitics


Maximum queue depth . . . . : 10000000 0 - 999999999
Maximum message length . . : 4194304 0 - 104857600

And below is the declaration of working storage variables in program

01 W-MSGLENGTH PIC S9(9) BINARY VALUE 0.

01 W-MSGLENGTH-MAX PIC S9(9) BINARY VALUE 4194304.
01 W-INPUTLENGTH PIC S9(9) BINARY VALUE 0.

05 W-MSGBUFFER.
10 W-MSGBUFFER-ARRAY PIC X(1) OCCURS 32767 TIMES.
10 W-MSGBUFFER-ARRAY PIC X(1) OCCURS 32647 TIMES.


Max message length (4194304) can come max upto 7 bytes and W-MSGLENGTH can hold value upto 9 bytes.

I am not sure why then pgm abended with 2079 and 2004 MQRC issue. Any suggestions
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

 


Search our Forums:

Back to Top