|
|||||||||||
|
Chicago-Soft
|
Use ISPF Macros to Generate Skeleton JCL by Dave Stanowick ISPF macros are powerful commands that are used for a variety of purposes. Although there are many complex uses for them I have found some simple ways of using them for some commonly needed routines. In a typical day there are many times when a TSO user needs to put together some JCL to run a batch job. Often that person just copies JCL from another member within a library and customizes it for the specific need. Some people simply have a member set aside that contains some sample JCL that's frequently needed. When required, they copy that member into a new member and customize it. While those methods work quite well, I have found a method that uses the ISPF EDIT macro to create the sample JCL. This edit macro also identifies the dataset and member name by placing that information within commented JCL statements placed in the JCL. This is helpful to identify the member when running several versions of a program. The neat thing about using the MACRO is that all you need to do is type in the macro name on the command line and the JCL is automatically created. Although this example may not be the most efficient method of accomplishing this task, it shows a way that works and is fairly easy to understand. You can use the following example to create your own version of this utility. You can read about ISPF Macros in the IBM publication number SC34-4253 ISPF/PDF Edit and Edit Macros. The following is the result if invoking the "JC" command: EDIT -- AB990.CSNT.CNTL(SAMPLE) - 01.00 ------ COLUMNS 001 072 COMMAND ===> SCROLL ===> CSR *************************** TOP OF DATA ********************** 000001 //CST0AB990 JOB 4920,AB990,CLASS=D, MSGCLASS=R,MSGLEVEL=(0,0), 000002 // NOTIFY=AB99 000003 //***************************************************** 000004 //* CREATED: 92/11/16 16:24 ON AB990.CSNT.CNTL(SAMPLE) BY AB990 000005 //* 000006 //* 000007 //***************************************************** 000008 //STEP1 EXEC PGM-IEFBR14 000009 //*DD1 DD DISP=SHR,DSN=XX.XX.XXX ************************** BOTTOM OF DATA ******************** Download this macro in text format (USE-ISPF.TXT)
BROWSE - TSO.CMDPROC(JC) - 01.00 -----------LINE 00000000 COL
001 080
COMMAND ===>
SCROLL ===> CSR
************************* TOP OF DATA *************************
ISREDIT MACRO
ISPEXEC VGET ZDATE
ISPEXEC VGET ZTIME
ISREDIT (XDSN)=DATASET
ISREDIT (XMEM)=MEMBER
SET &J0 = &STR(//CSTO)
SET &J1=&STR( JOB 4920,)
SET &J1A=&STR(,CLASS=D,MSGCLASS=R,MSGLEVEL=(0,0), )
SET &J2=&STR(// NOTIFY=)
SET &J3-&STR(//STEP1 EXEC PGM=IEFBR14 )
SET &J4=&STR(//*DD1 DD DISP=SHR, DSN=XX.XX.XXX )
SET &J5=&STR(//* CREATED: &ZDATE &ZTIME ON &SDSN(&XMEM) BY &SYSUID)
SET &J6=&STR(//*************************************************)
SET &J7=&STR(//* )
ISREDIT LINE_AFTER 0 = &STR('&J0.&SYSUID &JR.&SYSUID.&J1A')
ISREDIT LINE_AFTER 1 = &STR('&J2.&SYSUID')
ISREDIT LINE_AFTER 2 = &STR('&J6')
ISREDIT LINE_AFTER 3 = &STR('&J5')
ISREDIT LINE_AFTER 4 = &STR('&J7')
ISREDIT LINE_AFTER 5 = &STR('&J7')
ISREDIT LINE_AFTER 6 = &STR('&J6')
ISREDIT LINE_AFTER 7 = &STR('&J3')
ISREDIT LINE_AFTER 8 = &STR('&J4')
*********************** BOTTOM OF DATA ************************
Dave Stanowick is a Senior Analyst in the Corporate Information Security department at Society Corporation in Cleveland, Ohio.
|
|
||||||||
home · current
articles
· archives · forums · |