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 » Mainframe, CICS, TXSeries » CSQUTIL: MQMOD and MQMD structure with COPY command

Post new topic  Reply to topic
 CSQUTIL: MQMOD and MQMD structure with COPY command « View previous topic :: View next topic » 
Author Message
Cogito-Ergo-Sum
PostPosted: Mon Mar 06, 2006 8:19 am    Post subject: CSQUTIL: MQMOD and MQMD structure with COPY command Reply with quote

Master

Joined: 07 Feb 2006
Posts: 293
Location: Bengaluru, India

Hi,
I am using the following step to unload a queue to a dataset and then convert it to RECFM=FB so that ISPF allows me to view the contents.

Code:

//STEP001  EXEC PGM=IEFBR14                                             
//OT01     DD DSN=XXXXXX.YYYYY.Q00013.UNLOAD,                           
//            DISP=(MOD,DELETE,DELETE),                                 
//            UNIT=SYSDA,                                               
//            SPACE=(TRK,0)                                             
//*                                                                     
//STEP002  EXEC PGM=CSQUTIL,                                           
//            PARM='QMGR',                                             
//            COND=(0,LT)                                               
//STEPLIB  DD DSN=SYS1.SCSQANLE,DISP=SHR                               
//         DD DSN=SYS1.SCSQAUTH,DISP=SHR                               
//SYSIN    DD *                                                         
 COPY QUEUE(XXXXXX.YYYYY.Q00013) DDNAME(QOUT)                           
/*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//QOUT     DD DSN=XXXXXX.YYYYY.Q00013.UNLOAD,                           
//            DISP=(,CATLG,DELETE),                                     
//            UNIT=SYSDA,                                               
//            SPACE=(CYL,1),                                           
//            DCB=(RECFM=FB,LRECL=32,DSORG=PS)                         
//*                                                                     
//STEP003  EXEC PGM=IEFBR14                                             
//OT01     DD DSN=XXXXXX.YYYYY.Q00013.UNLOAD.FB,                       
//            DISP=(MOD,DELETE,DELETE),                                 
//            UNIT=SYSDA,                                               
//            SPACE=(TRK,0)                                             
//*                                                                     
//STEP004  EXEC PGM=SORT,                                               
//            COND=(0,LT)                                               
//SYSIN    DD *                                                         
  OPTION COPY                                                           
  OUTFIL VTOF,                     Convert VBS to FB                   
         OUTREC=(1:5,336)          Take the message                     
*                                                                       
/*                                                                     
//SORTIN   DD DSN=XXXXXX.YYYYY.Q00013.UNLOAD,                           
//            DISP=SHR,                                                 
//            DCB=(LRECL=32760)                                         
//SORTOUT  DD DSN=XXXXXX.YYYYY.Q00013.UNLOAD.FB,                       
//            DISP=(,CATLG,DELETE),                                     
//            UNIT=SYSDA,                                               
//            SPACE=(CYL,1),                                           
//            DCB=(RECFM=FB)                                           
//SYSOUT   DD SYSOUT=*                                                 


I am unable to understand the leading 8 bytes of data for every MQMD and the MQOD in the SORTOUT dataset. The first 4 bytes are having alphanumeric data and the next four is having 1 stored in binary.

Can anyone explain the leading eight bytes ?

The reason, I am asking this question is, I want to prepare a dataset that is similar to the unloaded one so that I am able to load the queue using CSQUTIL. I prepared the MQOD and MQMD using FileAid but the LOAD step would fail with a message, 'CSQU062E Incorrect format data record'.
_________________
ALL opinions are welcome.
-----------------------------
Debugging tip:When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
---Sherlock Holmes
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Mar 06, 2006 11:03 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

The Application Programmers Reference gives you the layout of all the MQ Control Structures.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
PostPosted: Mon Mar 06, 2006 6:07 pm    Post subject: Reply with quote

Master

Joined: 07 Feb 2006
Posts: 293
Location: Bengaluru, India

Yes, it does. And, it begins with the four character MQMD-STRUCID. But, my unloaded dataset has 8 more leading bytes to it.

What are these 8 leading bytes ?
_________________
ALL opinions are welcome.
-----------------------------
Debugging tip:When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
---Sherlock Holmes
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Mar 06, 2006 11:35 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Maybe if you posted some actual data, instead of just saying:
Quote:
The first 4 bytes are having alphanumeric data and the next four is having 1 stored in binary

Then someone might recognise what the data really is, as your description could match any MQ control structure.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
PostPosted: Tue Mar 07, 2006 12:16 am    Post subject: Reply with quote

Master

Joined: 07 Feb 2006
Posts: 293
Location: Bengaluru, India

The OD:
Code:

UQH     
EDC40000
48800001


(The bottom two lines are the equivalent hex notations)

The MD:
Code:

UMH     
EDC40000
44800001


(The bottom two lines are the equivalent hex notations)

Rest of the record (in case of OD and MD) map correctly with the OD and MD structures.
_________________
ALL opinions are welcome.
-----------------------------
Debugging tip:When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
---Sherlock Holmes
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Tue Mar 07, 2006 12:38 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

i assume these are special headers or markers created by csqutil when unloading the queue (both markers UQH and UMH can be found when browsing the csqutil programm).
the format which is used by csqutil to store unloaded messages is not described anywhere. its an internal format. for more "readable" unloads i always used own copy or move programs to unload / load queues to files, with or without headers (and so does the application developement for testing purposes). those programs are not very hard to write, in most cases the samples with a little modification will do the job. maybe the "q" programm or other supportpacs will do what you need, and there should be some more of those programs around that copy or move between queues and files.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
PostPosted: Tue Mar 07, 2006 1:36 am    Post subject: Reply with quote

Master

Joined: 07 Feb 2006
Posts: 293
Location: Bengaluru, India

I do not have elaborate experience in MQSeries. Looking at CSQUTIL, I got an impression that, it would be similar to DNUPROC (in case of DB2 table loading). I have a need to load the messages into a queue from a dataset that is created by unloading a table. Yes, I can write a program to do so. I was just curious to know that, if I can do this in batch using a batch job not having application program.

Thank you, Mr Butcher and all.
_________________
ALL opinions are welcome.
-----------------------------
Debugging tip:When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
---Sherlock Holmes
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Tue Mar 07, 2006 4:21 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

The UMQ and UMH are simply a header to identify the type of data in the record and a version number.
Note there is also a message length after the MQMD (version 1).
As pointed out before these formats haven't been formally documented so could be subject to change.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
haqshaik
PostPosted: Thu Mar 23, 2006 7:49 am    Post subject: Reply with quote

Novice

Joined: 08 Sep 2005
Posts: 13

Cogito,
The CSQUITL can be compared to some extent as DSNUPROC. When you are loading the data in the queue using the CSQUTIL, the data should be in VBS format , the record length of the file would be 32768 bytes and the message should have the MQMD or the control information already assigned to the message. You can use CSQUTIl utility to unload the message from the queue and reload them into the queue. But it's not possible to load the messages from a falt file(which will not have control information) to a QUEUE with out using the MQ infterface calls. In one instance I have the same requirement to load the messages into a Procduction queue.
The approcah is
write a program to load the messages in Batch to a queue.
Unload the messages to a file from the queue.
The move the file into production.
Upload the production queue using CSQUTIL.
By no means, You can create a VBS file with LRECL 32,768, so that u can use the file for loading the queue. With DFSORT you can created a VBS file wiht LRECL of 32,767.
Hope this will help..

Thanks,
Salauddin
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 » Mainframe, CICS, TXSeries » CSQUTIL: MQMOD and MQMD structure with COPY command
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.