Posted: Wed Apr 01, 2015 7:41 pm Post subject: ma01 - input record truncated
Novice
Joined: 27 May 2003 Posts: 11 Location: Phoenix, Arizona
I am using ma01 on z/OS to create MQ messages from fixed-length records in an existing file. The input record size is fixed at 5078 bytes, but some records have a number of spaces at the end. Consequently, some MQ messages are created with a message length of 5078 bytes, and some are created with a message length somewhat less. I can't seem to find anything in the ma01 doc that indicates how to avoid this truncation. Is there a way for me to do this? Thanks in advance.
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
MA01 knows nothing of record I/O. MA01 reads files using C stream I/O using something like fgets(). So, if you are going to get this to work I suspect you are looking for a setting in the C runtime on z/OS to cope with the various z/OS record formats. Generally speaking I think it works best when you are using VB rather than FB records. The C programming language itself doesn't understand file records.
If all you want to do is read a FB file and issue an MQPUT for each line it finds then this would be a trivial program to write. You could probably modify AMQSPUT0.C without much difficulty. This might be a better approach in the long run.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com
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