|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
CSQUTIL: MQMOD and MQMD structure with COPY command |
« View previous topic :: View next topic » |
Author |
Message
|
Cogito-Ergo-Sum |
Posted: Mon Mar 06, 2006 8:19 am Post subject: CSQUTIL: MQMOD and MQMD structure with COPY command |
|
|
 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 |
|
 |
EddieA |
Posted: Mon Mar 06, 2006 11:03 am Post subject: |
|
|
 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 |
|
 |
Cogito-Ergo-Sum |
Posted: Mon Mar 06, 2006 6:07 pm Post subject: |
|
|
 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 |
|
 |
EddieA |
Posted: Mon Mar 06, 2006 11:35 pm Post subject: |
|
|
 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 |
|
 |
Cogito-Ergo-Sum |
Posted: Tue Mar 07, 2006 12:16 am Post subject: |
|
|
 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 |
|
 |
Mr Butcher |
Posted: Tue Mar 07, 2006 12:38 am Post subject: |
|
|
 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 |
|
 |
Cogito-Ergo-Sum |
Posted: Tue Mar 07, 2006 1:36 am Post subject: |
|
|
 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 |
|
 |
bob_buxton |
Posted: Tue Mar 07, 2006 4:21 am Post subject: |
|
|
 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 |
|
 |
haqshaik |
Posted: Thu Mar 23, 2006 7:49 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|