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 » Show and Tell - my MQ JCL Generator

Post new topic  Reply to topic
 Show and Tell - my MQ JCL Generator « View previous topic :: View next topic » 
Author Message
cicsprog
PostPosted: Fri Sep 21, 2012 6:33 am    Post subject: Show and Tell - my MQ JCL Generator Reply with quote

Partisan

Joined: 27 Jan 2002
Posts: 347

Things are slow at the moment. So, I thought I'd show my ZOS MQ JCL generator for MQ Administration type tasks.

Main menu

Code:

USERID - V107964  ----- MVS MQSeries Utilities/JCL Generator ---- STE      ----
COMMAND ===>                                                                   
                                                                               
 MVS MQSeries Options                                                         
                                                                               
  0 - MQSeries Site Environment                                               
                                                                               
  1 - MQSeries Object Maintenance                                             
                                                                               
  2 - MQSeries Queue Utilities                                                 
                                                                               
  3 - MQSeries Queue Manager Utilities                                         
                                                                               
                                                                               
  Depress PF1 for Extended Help and Setup Information                         


Option 3 screen shot

Code:

USERID - V107964  --------- MQM MVS/ESA MQM Utilties ------------ STE      ----
OPTION  ===>                                                                   
                                                                               
                                                                               
 Dialogs for Administrators                                                   
                                                                               
   1  - Issue MQM System Commands (Foreground) *IBM Dialog                     
   2  - Issue MQM System Commands Batch                                       
   3  - Create/Recover/Expand MQSeries Queue Manager Datasets                 
   4  - CSQUTIL EMPTY,LOAD,COPY,FORMAT,COPYPAGE,RESETPAGE Utilities           
   5  - MQSeries Queue Manager Reports                                         
   6  - MQSeries Installation Verification Program (IVP) MQM ===>  MQC1       
   7  - MQSeries Client CHANNEL STOP Utility                                   
   8  - MQSeries CLUSTER Utilities                                             
   9  - Send DOC to IBM                                                       
  10  - Send DOC to ASG                                                       



This is a screen shot of Option 3.3.


Code:

USERID - V107964  ---------- MQSeries Dataset Utilities --------- STE      ----
COMMAND ===>                                                                   
                                                                               
MQSeries Queue Manager ===>      ( MQL0 MQL1 MQL2 MQC2 MQC1 MQN1)             
Dataset Option         ===>                                                   
 Create Dataset Options                                                       
  1 - PAGESET Num    ===>     -  Create/Expand/Dynamic PAGESET Dataset         
                     ===>        (Create=C Expand=E Dynamic=D)                 
  2 - BOOTSTRAP               -  Create BOOTSTRAP Datasets 1 and 2             
      Log Type       ===>        (Dual Log D-Dual S-Single)                   
  3 - Active Log Num ===>     -  Create Active Log Datset                     
      Log Type       ===>        (Dual Log D-Dual S-Single)                   
      Dynamic        ===> N      (Dynamic Y=Yes N=No)                         
  4 - BSDS Management         -  NEWLOG and DELETE via CSQJU003               
 Recover Dataset Options                                                       
  5 - BSDS Report(CSQJU004)   -  Print log map utility for Recovery           
      Log Type       ===>        (Dual Log D-Dual S-Single)                   
  6 - Log Print  (CSQ1LOGP)   -  Print logs (BSDS,Active,Archive)             
      Logs From      ===>        (Log type B=BSDS A=Active R=Archive)         
  7 - PAGESET Num    ===>     -  Recover PAGESET Dataset                       
  8 - BOOTSTRAP               -  Recover BOOTSTRAP Datasets 1 and 2           
 Expand Dataset Options                                                       
  9 - Active Log Expand       -  Expand Active Log Datasets                   


As an example, here is option 1 where I generate JCL to dynamically add a PAGESET.
Code:

//MQL0DSN JOB (T,JUPT,JKSD0103),'MQ JCL',                           
//        MSGLEVEL=(1,1),MSGCLASS=T,NOTIFY=&SYSUID                   
//*                                                                 
//*                                                                 
/*JBS BIND MQL0MSTR.BIND                                             
//******************************************************************
//* DYNAMICLLY ADD PSID77 TO RUNNING MQM                             
//*    (Resolve all parameters with a ?)                             
//*    1) Adjust PAGESET allocation (???? ????)                     
//*    2) Change ?????? on the VOLUMES parameter                     
//*    3) Define new PAGESET 77 to existing BUFFERPOOL ??           
//*    4) SUBMIT Job                                                 
//* Note:                                                           
//* To ensure the page set remains available when you restart       
//* your queue manager:                                             
//* a. Add the new page set to the started task procedure for       
//*  your queue manager.                                             
//* b. Add a definition for the new page set to your CSQINP1         
//* initialization data set.                                         
//* c. Add your new PAGESET to your backups.                         
//******************************************************************
//*  ALLOCATE A NEW PSID77                                           
//******************************************************************
//NEWPAGE   EXEC PGM=IDCAMS,REGION=4M                               
//SYSPRINT  DD SYSOUT=*                                             
//SYSIN     DD *                                                     
   DEFINE CLUSTER                            -                       
          (NAME(MQSERIES.MQL0.PSID77) -                             
           CYL(???? ????)                    -                       
           VOLUMES(??????)                   -                       
           LINEAR                            -                       
           STORCLAS(SYSSUB)                  -                       
           SHAREOPTIONS(2 3) )               -                       
       DATA                                  -                       
          (NAME(MQSERIES.MQL0.PSID77.DATA) )                         
/*                                                                   
//******************************************************************
//* FORMAT PSID77                                                   
//******************************************************************
//FORMPAGE EXEC PGM=CSQUTIL,REGION=4M,COND=(0,LT,NEWPAGE)           
//STEPLIB  DD DSN=SYS1.SCSQANLE,DISP=SHR                             
//         DD DSN=SYS1.SCSQAUTH,DISP=SHR                             
//         DD DSN=SYS1.SCSQLOAD,DISP=SHR                             
//CSQP0077 DD DISP=OLD,DSN=MQSERIES.MQL0.PSID77                     
//SYSPRINT DD SYSOUT=*                                               
//SYSIN    DD *                                                     
FORMAT                                                               
/*                                                                   
//******************************************************************
//* DYNAMIC ADDTION TO MQL0                                         
//******************************************************************
//MQMCMDS EXEC PGM=CSQUTIL,REGION=4M,                               
//        COND=((0,LT,NEWPAGE),(0,LT,FORMPAGE)),                     
//        PARM='MQL0'                                               
//STEPLIB  DD DSN=SYS1.SCSQANLE,DISP=SHR                             
//         DD DSN=SYS1.SCSQAUTH,DISP=SHR         
//         DD DSN=SYS1.SCSQLOAD,DISP=SHR         
//SYSPRINT DD SYSOUT=*                           
//SYSIN    DD *                                 
 COMMAND DDNAME(CMDINP)                         
/*                                               
//CMDINP  DD *                                   
* Define the new PAGESET 77                     
DEFINE PSID(77)                +                 
 BUFFPOOL(??)                       +           
 DSN('MQSERIES.MQL0.PSID77') +                   
 EXPAND(USER)                                   
* Define a default STGCLASS                     
DEFINE NOREPLACE                    +           
 STGCLASS('PSID77')            +                 
 PSID(77)                      +                 
 QSGDISP(QMGR)                      +           
 DESCR('PSID77 ADDED DYNAMICALLY')               
/*                                               


Its pretty useful so you always get the correct JCL to perform the task at hand. Also speeds up debugging and problem resolution.

Feel free to comment, ask questions, ask me to show other options.
Code:
Back to top
View user's profile Send private message
cicsprog
PostPosted: Fri Sep 21, 2012 8:02 am    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2002
Posts: 347

Here's one of the dialogs under option 2 Queue Utilties where I incorporated Supportpacs MA01 MO03.

Code:

USERID - V107964  ------ MQM MVS/ESA QUEUE Utilities ------------ STE      ----
OPTION  ===> 10                                                               
                                                                               
 Dialogs for Developers                                                       
                                                                               
   1  - Send a Text Message to a Queue (Local, Remote, CLUSTER Q's Possible)   
   2  - MQSeries Queue PUT/GET or Trigger On/Off Attribute Manipulation       
   3  - Copy Queue Data to Sequential File                                     
   4  - Browse an MQM Queue Elements(Browse,Delete,Forward Msgs)*IBM Dialog   
   5  - Delete MQM Queue Data by Message Range                                 
   6  - Browse MQM Queue Data (Browse Msgs)*IBM Dialog                         
   7  - Administer an MQM Dead Letter Queue on MQM ===>  MQL2 *IBM Dialog     
   8  - Dead Letter Queue Report                                               
   9  - IBM DLQ Handler Utility                                               
   10 - Misc Queue Utilities (SupportPacs MA01 MO03)                           
                                                                               
 Dialogs for Administrators                                                   
                                                                               
   11 - CSQUTIL EMPTY,LOAD,COPY,FORMAT,COPYPAGE,RESETPAGE Utilities           


We use this quite a bit to assit applications having message problems and for looking at message detail.

Code:

USERID - V107964  ------- MQSeries Queue Utilities  ------------ STE      ----
COMMAND ===>                                                                 
                                                                             
MVS MQSeries Queue Manager    ===> NONE ( MQL0 MQL1 MQL2 MQC2 MQC1 MQN1)     
                                                                             
 These utilities work with OPEN I and O PROCs (Q must be SHARE).             
                                                                             
Utility Select ===>    ( C = Copy msgs for Q1 to Q2 OPEN IPROC or OPROC       
                         M = Move msgs for Q1 to Q2 OPEN IPROC or OPROC       
                         D = Delete msgs with OPEN IPROC or OPROC             
                         U = Unload Queue to Flatfile for Editing *           
                         L = Load Queue from Flatfile *                       
                         F = Load Queue from any Flatfile                     
                         P = Print Queue to SYSOUT                           
                         H = For extended HELP on these utilities)           
  *Note File formats must be maintained with utilities denoted with *         
                                                                             
  From Queue  (for C, D, M, P and U options only):                           
  ===> NONE                                                                   
  Destination Queue  (for C, M and L options only):                           
  ===> NONE                                                                   
  Number Messages to copy or delete  (for C, D, and M option only):           
  ===> 10000                                                                 


Here's JCL generated to print the DLQ:
Code:

EDIT       V107964.ISP22921.SC3.SPFTEMP1.CNTL              Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 //MQL0UTL JOB (T,JUPT,JKSD0103),'MQ JCL',                               
000002 //        MSGLEVEL=(1,1),MSGCLASS=T,NOTIFY=&SYSUID                     
000003 //*                                                                     
000004 //*                                                                     
000005 /*JBS BIND MQL0MSTR.BIND                                               
000006 //*************************************************************         
000007 //*** IBM Supportpac MO03                                               
000008 //*** Print Q to SYSOUT (non-destructive MQGET)                         
000009 //*************************************************************         
000010 //MQUTIL  PROC MQM='????',                                             
000011 //      QUE1='??????'                                                   
000012 //*                                                                     
000013 //QTOF  EXEC PGM=QLOAD,                                                 
000014 // PARM=('-m &MQM -i "&QUE1" -f"//DD:OFILE" -da')                       
000015 //STEPLIB  DD DISP=SHR,DSN=MQSERIES.ISPLLIB.STE                         
000016 //SYSOUT   DD SYSOUT=*                                                 
000017 //SYSPRINT DD SYSOUT=*                                                 
000018 //      PEND                                                           
000019 //*************************************************************         
000020 //STEP1 EXEC MQUTIL,                                                   
000021 //      MQM='MQL0',                                                     
000022 //      QUE1='MQL0.DEAD.QUEUE'                                         
000023 //QTOF.OFILE DD SYSOUT=*                                               
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Sep 21, 2012 9:13 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.



I wish I had spare time...
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
cicsprog
PostPosted: Fri Sep 21, 2012 9:58 am    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2002
Posts: 347

bruce2359 wrote:


I wish I had spare time...


Ya..its feast or famine sometimes. I was on a bridge call almost all last Saturday for a new replacement Solaris server that wouldn't allow previous MQ channels to connect with it and they were trying to blame the mainframe was at issue.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Sep 21, 2012 10:05 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

cicsprog wrote:
bruce2359 wrote:


I wish I had spare time...


Ya..its feast or famine sometimes. I was on a bridge call almost all last Saturday for a new replacement Solaris server that wouldn't allow previous MQ channels to connect with it and they were trying to blame the mainframe was at issue.

Mainframes: spawn of the Devil.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Sep 21, 2012 12:20 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bruce2359 wrote:
Mainframes: spawn of the Devil.


Repent your blasphemy! Repent! Repent!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
shality
PostPosted: Fri Dec 21, 2012 10:54 pm    Post subject: Reply with quote

Newbie

Joined: 21 May 2011
Posts: 2

Where is the code for this generator ? do you share it to 'public' ?
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 » Show and Tell - my MQ JCL Generator
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.