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

MQ Load utility - CSQUTIL


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

New User


Joined: 26 Mar 2009
Posts: 9
Location: India

PostPosted: Thu May 28, 2009 7:05 pm
Reply with quote

I am trying to load MQ from a dataset using utility CSQUTIL. I used the following JCL
//COPY EXEC PGM=CSQUTIL,PARM='<Q_MGR>'
//STEPLIB DD DISP=SHR,DSN=thlqual.SCSQANLE
// DD DISP=SHR,DSN=thlqual.SCSQAUTH
//OUTPUTA DD DSN=<INPUT DSN of RECFM=FB>,
// DISP=SHR,DCB=(EROPT=ACC)
//CSQUOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LOAD QUEUE(<Q_NAME>) -
DDNAME(OUTPUTA)
/*

If I do not specify "DISP=SHR,DCB=(EROPT=ACC)", the job abends with error "DCB EROPT=ABE OR AN INVALID CODE".
If I specify "DISP=SHR,DCB=(EROPT=ACC)", the job abends with RC=8 ("LOAD statement failed").

What can be done to overcome this problem ?
Back to top
View user's profile Send private message
dineshchaudhry

New User


Joined: 26 Mar 2009
Posts: 9
Location: India

PostPosted: Thu May 28, 2009 7:08 pm
Reply with quote

continuing on the same question...

I tried copying the FB dataset into VBS dataset and used the VBS dataset for load, still the job is failing with error "CSQU062E Incorrect format data record".
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu May 28, 2009 7:38 pm
Reply with quote

This Thread should answer your question.
Back to top
View user's profile Send private message
dineshchaudhry

New User


Joined: 26 Mar 2009
Posts: 9
Location: India

PostPosted: Fri May 29, 2009 10:09 am
Reply with quote

What is meant by "CSQUTIL is intended to LOAD records that were output of a COPY. To load your own flat file, you need a program to do MQPUTs."
Does this mean that we cannot load from a dataset to MQ using CSQUTIL?

I am copying the data from FB to VBS and using the copied dataset for load into MQ. Still the job is failing with "CSQU062E Incorrect format data record".
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: Fri May 29, 2009 4:39 pm
Reply with quote

If you did not use CSQUTIL with a COPY to create the file, you cannot use LOAD to move data from that dataset to MQ. It seems pretty simple to me, and I do not use MQ.
Back to top
View user's profile Send private message
dineshchaudhry

New User


Joined: 26 Mar 2009
Posts: 9
Location: India

PostPosted: Fri May 29, 2009 5:01 pm
Reply with quote

Is it possible to use copy in the same step of CSQUTIL ?

I tried wherein the same JCL copies FB data into VBS data as first step, followed by the step to load the copied VBS data into MQ (JCL given below).

Below is the SQL I used.

//COPYFILE EXEC PGM=IDCAMS
//INFIL DD DSN=<INPUT FB DATASET>,DISP=SHR
//OUTFIL DD DSN=<OUTPUT VBS DATASET>,
// DCB=(RECFM=VBS,LRECL=600,BLKSIZE=200),
// SPACE=(TRK,(10,10)),DISP=(NEW,CATLG,DELETE)
//SYSPRINT DD SYSOUT=*
//SYSABEND DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(INFIL) OUTFILE(OUTFIL) REPLACE
//*
//LOADMQ EXEC PGM=CSQUTIL,PARM='QM01'
//STEPLIB DD DSN=MQM.SCSQLOAD,DISP=SHR
// DD DSN=MQM.SCSQAUTH,DISP=SHR
// DD DSN=MQM.SCSQANLE,DISP=SHR
//OUTFIL DD DSN=<OUTPUTDATASET OF PREV STEP>,DISP=SHR
//*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LOAD QUEUE(Q.TEST.IN) DDNAME(OUTFIL)
/*
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: Fri May 29, 2009 5:06 pm
Reply with quote

Question: in your JCL, do you see an execution of CSQUTIL with the control statement "COPY"?

If the answer to that question is "NO", then your CSQUTIL execution with the control statement "LOAD" in not valid. Period. End of story. It doesn't matter what you do otherwise, it ain't gonna work. Why are you having trouble understanding that?

WRITE THE PROGRAM TO DO THE LOAD!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri May 29, 2009 5:10 pm
Reply with quote

I believe the 'copy' referred to in
Quote:
If you did not use CSQUTIL with a COPY to create the file

means a COPY created by CSQUTIL, maybe from an UNLOAD QUEUE???????
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: Fri May 29, 2009 5:13 pm
Reply with quote

Dick, ya think maybe? icon_smile.gif
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

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts How to load to DB2 with column level ... DB2 6
No new posts REASON 00D70014 in load utility DB2 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts DB2 Load - Sort Or order BY DB2 1
Search our Forums:

Back to Top