ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Spaces at the end of record while MQPUT

Post new topic  Reply to topic
 Spaces at the end of record while MQPUT « View previous topic :: View next topic » 
Author Message
rgappan
PostPosted: Tue Oct 24, 2006 4:54 pm    Post subject: Spaces at the end of record while MQPUT Reply with quote

Newbie

Joined: 24 Oct 2006
Posts: 2

Hi,
Can anyone help.We use a cobol code to put the data to MQ.when we put the data we put the whole data in fixed record length of 80 bytes as each record .what happens is the last record is sometimes less than 80 for example 60 but we are putting 80 in mqput and the last 20 bytes is going as hex '40' for which the receiving party is facing problems with the spaces.

Is their an option to eliminate this while MQPUT.I am new to this form.I did not search the old topics pls excuse if already avaliable it was urgent so I posted it.
The MQPUT option we use are

CALL 'MQPUT' USING W03-HCONN
W03-HOBJ
MQMD
MQPMO
MSGLENGTH
MSGBUFFER
W03-COMPCODE
W03-REASON.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 24, 2006 7:21 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

In your message set you can tell the broker to treat spaces as null values.
I believe it is on the third or forth (last) screen when you import the copybook.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Oct 24, 2006 11:41 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

What is MSGLENGTH set to on the put? The length of the message (60 bytes) or the length of the buffer (80 bytes)?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Wed Oct 25, 2006 4:30 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Quote:
what happens is the last record is sometimes less than 80 for example 60 but we are putting 80 in mqput


Then set the message length in the MQPUT to the ACTUAL message length and not the length of the buffer.

This stuff is pretty well covered in the Application Programming Reference if you need details.
Back to top
View user's profile Send private message
rgappan
PostPosted: Wed Oct 25, 2006 5:16 am    Post subject: Reply with quote

Newbie

Joined: 24 Oct 2006
Posts: 2

Thank you for respoinding

01 MSGBUFFER.
02 DOC-DATA OCCURS 45000 TIMES PIC X(80).

But while writing we are writing with respect msglength

MOVE END-OF-MSG TO MSGLENGTH.
MOVE MQPER-PERSISTENT TO MQMD-PERSISTENCE.
MOVE MQMI-NONE TO MQMD-MSGID.
MOVE MQCI-NONE TO MQMD-CORRELID.

Not as a block .

appreciate your help.

Itried pasting the data here but it is cmming zig zag
Assming each record to be 80 bytes it looks as below

111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
when the data is recieved at the customer end it goes as spaces padded at the end of last record till 80 byte
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 25, 2006 5:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Alright, let me rephrase my question - is END-OF-MSG the actual value of bytes written or 45000*80? It sounds like the latter to me!

As kevinf2349 correctly points out and I alluded to, it should be set to the actual value of the data as per the Application Programming Reference. What you're sending is the full buffer which I imagine is initialised to spaces elsewhere in your code.

Functioning as desiged - RTFM
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Spaces at the end of record while MQPUT
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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.