Interview Questions   Tutorials   Discussions   Programs   

JCL - What you mean by skeleton JCl?




378
views
asked mar September 8, 2014 11:59 AM  

What you mean by skeleton JCl?


           

1 Answers



 
answered By Mswami   0  

A skeleton JCL or JCL skel is a JCL template that another program can use with certain parameter and create dynamic JCL on the fly. Today I will show how skeletal JCL works with a simple example. Here is one example of skeleton JCL.

/* replace all variables of JCL SKEL*/

&USER   = J12345
&JOBNAME   = J12345A
&FILE1 = N12345.F1
&FILE2 = N12345.F2
&FILE2 = N12345.F3
&FILE3 = N12345.F4
&IND = Y
/* write to the output dataset from skelton */
/* The JCL SKEL is in N12345.REXX.SKELL(JCLSKEL)*/
/* SUBJCL is the member name containing runtime JCL and will be created in N12345.DYNAM.JCL*/
ADDRESS ISPEXEC
"ISPEXEC LIBDEF ISPSLIB DATASET ID('"N12345.REXX.SKELL"')"
"ISPEXEC LIBDEF ISPFILE DATASET ID('"N12345.DYNAM.JCL"')"
"FTOPEN"
"FTINCL JCLSKEL"
"FTCLOSE NAME(SUBJCL) LIBRARY(ISPFILE)"
 CALL SUB
/* EXIT */
;END
SUB:
/*Function to submit a job*/

Above JCL skel has 7 variables which are to be replaced with real values during run time and the calling program will pass actual values to use the above JCL skel. Above example also shows conditional use of a step which will be used only when the indicator variable is set to 'Y'. Please notice the second step of the JCL is within )SEL and )ENDSEL tag giving the calling program choice to use that step or not according to the requirement.

The calling program can be any module. Most cases you will use a JCL skel from a REXX code. Please see below REXX code snippet which uses the above JCL skel.

/&JOBNAME JOB (1200,4352),'John',
// MSGLEVEL=1,CLASS=A,NOTIFY=&USER,
// MSGCLASS=J 
//*
//* EXAMPLE STEP01 
//STEP01 EXEC PGM=PRG01
//INP DD DSN=&FILE1,
//  DISP=SHR 
//* 
//OUP DD DSN=&FILE2, 
//         DISP=(,CATLG,DELETE),SPACE=(CYL,(5,5),RLSE), 
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
//*
//* EXAMPLE STEP02   
)SEL &IND = Y
//STEP02 EXEC PGM=PRG02
//INP DD DSN=&FILE3,
//  DISP=SHR 
//* 
//OUP DD DSN=&FILE4, 
//               DISP=(,CATLG,DELETE),SPACE=(CYL,(5,5),RLSE), 
//       DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
)ENDSEL
flag   
   add comment

Your answer

Join with account you already have

FF

Preview

 Write A Tutorials
Online-Classroom Classes
www.writeabc.com


  1 person following this question

  Question tags

jcl × 1

Asked 2 years and 3 months ago ago
Number of Views -378
Number of Answers -1
Last updated
3 years and 3 months ago ago

  Similar questions


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert