Search

Sunday, September 30, 2012

JCL TO ALTER or DEFINE Queues


Code snippets for defining or altering Message Queues through JCL

Here I am changing INITQ for Local Queue PK01.

//PRODSTEP EXEC PGM=CSQUTIL,PARM='QueueManger Name'              
//SYSPRINT DD SYSOUT=*                                                 
//STEPLIB DD DSN=MQM.SCSQLOAD,DISP=SHR                                
//SYSIN DD *      
                                                     
COMMAND DDNAME(CMDGET)                                                 
/*                                                                     
//CMDGET DD *                                                          
ALTER QLOCAL(PK01) INITQ(CICS1.INITQ)                                 


In below JCL I have altered INITQ, PROCESS, Trigger Depth and Trigger Type for Local PK01. Same way for PK02 I am changing Inititiation Queue and Process for Queue PK02.

//PRODSTEP EXEC PGM=CSQUTIL,PARM='QueueManager Name'         
//SYSPRINT DD SYSOUT=*                                                 
//STEPLIB DD  DSN=MQM.SCSQLOAD,DISP=SHR                                
//SYSIN DD *                                                           
COMMAND DDNAME(CMDGET)                                                 
COMMAND DDNAME(CM1GET)                                                 
/*                                                                     
//CMDGET DD *                                                           
ALTER QLOCAL(PK01) INITQ(CICSI2.INITQ) PROCESS(PK01) TRIGDPTH(10) TRIGTYPE(FIRST)                      
//CM1GET DD *                                                          
ALTER QLOCAL(PK02) INITQ(CICSI2.INITQ) PROCESS(PK02)                    

JCL to LOAD the Data into MQ(Message Quee) channels from a sequential data set.

 Here data from INFILE file will be loaded to PK01 Queue.

//MQLOAD1  JOB (ABCDEFGH),'ABCDEFG',
//         MSGCLASS=T,SCHENV=DB2DBJB,
//         NOTIFY=&SYSUID,TIME=90
//*
//MKCMDS   EXEC PGM=CSQUTIL,PARM='Queue Manger Name'
//STEPLIB   DD DSN=MQM.M***.SCSQAUTH,DISP=SHR
//INFILE   DD DISP=SHR,DSN=CBS.RSS.XCI05000.WESTERN.STRGTEST.INPUT
//SYSPRINT DD SYSOUT=*
//CSQUOUT  DD SYSOUT=*
//SYSIN    DD *
LOAD QUEUE ( PK01) DDNAME(INFILE)
/*
//
//INFILE   DD DSN=DATA1.ABC.SYS.UNLOAD.D120912A,DISP=SHR

No comments:

Post a Comment