Search

Thursday, February 14, 2013

Submit JCL through REXX

The following REXX tool explains how JCL can be submitted through REXX.

Step 1: To get inputs from the user


/*REXX*/
/* TRACE I */
USERID = SYSVAR('SYSUID')
 "EXEC 'SYS2.CMDPROC(CLRSCRN)' CLIST"
ARG  ID FILEDT SQLINR
SAY  ID
SAY  FILEDT
SAY  SQLINR
IF ID = ' ' THEN
    DO
      SAY 'ENTER ID REQUIRED FOR INQUIRY'
      PULL IDID
    END
IF FILEDT = ' ' THEN
    DO
      SAY 'ENTER FILE DT REQUIRED FOR INQUIRY IN MM/DD/YYYY FORMAT '
      PULL FILEDT
    END
IF SQLINR = ' ' THEN
    DO
      SAY 'ENTER THE REGION FROM WHERE ID IS REQUIRED'
      PULL SQLINR
    END
IF IDID = 'END' | FILEDT = 'END' | SQLINR = 'END' THEN
    DO
      SAY 'COMMAND ENDED. THANK YOU'
      EXIT
    END
   INTLL  = LEFT(USERID(),3)
/* */

Step: 2: To allocate file where JCL will be returned with the user id automatically appended 


  "ALLOC FI(JCLFILE) DA('"USERID()".PABCB.N.TEMP.ABCD') OLD CATALOG  REUSE",
      "SPACE(1,1) TRACKS LRECL(80) BLKSIZE(3120) RECFM(F,B)"

Step 3: To create JCL


   IF ID <> "END" THEN DO
      JCL.1   = "//#ABC"INTLL"C JOB (00011100000"USERID()"),'X',"
      JCL.2   = "//             CLASS=X,"
      JCL.3   = "//             MSGCLASS=0,"
      JCL.4   = "//             REGION=4M,"
      JCL.5   = "//             NOTIFY="USERID()
      JCL.6   = "/*JOBPARM S="ABCV
      JCL.7   = "//*"
      JCL.8   = "//STEP01S  EXEC PGM=IKJEFT01"
      JCL.9   = "//STEPLIB   DD  DSN=DB2E.PSYSB.P.ABCD.SDSNLOAD,DISP=SHR"
      JCL.10  = "//SYSTSPRT  DD  SYSOUT=*"
      JCL.11  = "//DETAILS   DD  SYSOUT=*"
      JCL.12  = "//FREELST   DD  SYSOUT=*"
      JCL.13  = "//SYSTSIN   DD  *"
 JCL.14 = " EXEC 'ISPS.PABCB.P.ABC.EXEC(PVDREQR)' '"ID" "FILEDT" "SQLINR"'"
    END
      "EXECIO * DISKW JCLFILE (STEM JCL. FINIS)"
      "FREE FI(JCLFILE)"

Step 4: To submit JCL


      "SUBMIT '"USERID()".PABCB.N.TEMP.ABCD'"

After this, you can see the JCL in spool by checking the jobname #ABC*






Tuesday, February 12, 2013

Options of CICS DB2 connections

Options of CICS DB2 connections 

There are three main types of threads that can  be used for DB2 CICS connection:

TYPE=COMD
TYPE=POOL
TYPE=ENTRY

COMD is DB2 command thread it is used for only processing DB2 commands through DSNC transaction.  It is not used for CICS attachment facility.

POOL is Pool threads are used for all transactions and commands not using an entry type or a DB2 command type. Pool threads are normally used for: 

  1. Low volume transactions
  2. Overflow transactions  from both COMD and ENTRY type threads 
  3. It is terminated immediately when it is unused

ENTRY is ENtry type thread which is used for: 

  1. High volume transactions 
  2. High priority transactions 
  3. Controlled transactions 

ENTRY type can be defined as protected as well as unprotected.The MVS subtask for an entry thread is not terminated, even if the entry thread is terminated. This is true for both protected and unprotected entry threads. 
Requests for an entry thread can be transferred to the pool, if an entry thread is not available.

Sunday, January 20, 2013

CEDC Command to check MQconnection


CEDC Commands that can be used to check MQ connection 

If any user wants to know INITQ or any MQ manager or any other MQ parameter here is the command:

CEDC V MQ

It will give option as below. If you dont know give * for both the options and then press enter:

OBJECT CHARACTERISTICS
   CEDC View MQconn(         )
     MQconn         ==>      
*

     Group            ==>       *

It will display all the MQConn for all the sysplex region as below.

ENTER COMMANDS
NAME            TYPE            GROUP                       LAST CHANGE 
MQ1A            MQCONN      CICSAB1             25/04/11   11:11:11
MQ1A             MQCONN     CICSAB2   v        25/04/11   11:11:11   
      
Give View in front of group you want to view as I gave above in red and press enter.

Sunday, January 13, 2013

Introduction to most useful SYSIBM DB2 tables - PART 1


Here are most commonly used SYSIBM tables


SYSIBM.SYSTABLES : Any table or view or alias defined for your application will be present in this table with all the information.

Here I have got great links for tables where you can get details for each column of  SYSIBM tables. For each table there is separate link I have put them all together for quick reference.


SYSIBM.SYSCOLUMNS: All the details about columns for any table along with characteristics of each column is defined here.