jcl training class 001

Upload: sharathraj

Post on 03-Jun-2018

223 views

Category:

Documents


3 download

TRANSCRIPT

  • 8/12/2019 Jcl Training Class 001

    1/22

    www.mainframes-online-training.weebly.com Polsani Anil Kumar

    IBM MAINFRAMES

    Job control Language(JCL) - 01

    http://www.mainframes-online-training.weebly.com/http://www.mainframes-online-training.weebly.com/http://www.mainframes-online-training.weebly.com/
  • 8/12/2019 Jcl Training Class 001

    2/22

    Introduction on JCL

    JCL is used to compile and execute batch programs.

    To write any JCL we reuire

    1. JOB Statement.

    2. EXEC Statement.

    3. DD Statement.

    4. Null Statement.

    JOB: !xecution of one or more programs is "nows as a #ob

  • 8/12/2019 Jcl Training Class 001

    3/22

    JCL Statements

    JOBSTATEMENT: J$% statement is used to identify the J$% &ame

    and J$%'s related parameters (accounting info) username) class) notify

    etc*.

    +yntax,

    J$%&A!J$% ACCT/&0$)1+!2&A!)CLA++)&$T/03..

    AccountingIno!mation: Is mainly used for billing purpose.

    "#e!name: Is used to identify who has written the JCL.

    Cla##: Is used to pro4ide resource constraint to the #ob.

    Noti$: /s used to decided to which "SE%&IDthe J$% has to be notify

    after successful or unsuccessful compilation

  • 8/12/2019 Jcl Training Class 001

    4/22

  • 8/12/2019 Jcl Training Class 001

    5/22

    J$%&A! J$% ACC$1&T/&7-/&0$2AT/$&)

    P2$72A!2-&A!)

    CLA++8J$%-CLA++)

    P2T38P2/$2/T3-&1%!2)

    +7CLA++8!++A7!-CLA++) +7L!9!L8(+TAT!!&T+)!++A7!+*)

    2!7/$&82!7/$&-+/:!(K%%*)

    C$&;8(2C)$P!2AT$2*)

    2!+TA2T8+T!P&A!) T/!8(.++*)

    T3P21&8(

  • 8/12/2019 Jcl Training Class 001

    6/22

    JCL Parameter

    There are two "inds of parameters in the operand field ,-

    )OSITIONA-and E/0O%Dparameters.

    The operating system recogni>es positional parameters by their

    position in the operand field.

    !x , Accounting/nformationand Programmer&ame

    Keyword parameters can be coded in any order) defined by a

    JCL reser4ed name. !x, T/!)CLA++)&$T/03..etc.

    Positional parameters must be coded in a specific order before

    any "eyword parameter.

  • 8/12/2019 Jcl Training Class 001

    7/22

    Accounting Ino!mation )o#itional )a!amete!is used to

    supply any type of accounting information which may

    be reuired by a particular installation.

    The entire Accounting /nformation Parameter maycontain as many as 142 characters.

    /f Su,a!amete!#are used in the Accounting

    /nformation Parameters) they must be separated by

    commas and enclosed within parentheses.

    )!og!amme! Name: /dentifies the indi4idual or groupresponsible for the #ob. The )!og!amme! Namepositionalparameter

    may be from1 to 2characters long) including any specialcharacters.

    Positional Parameter

  • 8/12/2019 Jcl Training Class 001

    8/22

    Assuming that your installation reuires ?subparameters --

    account number) billing date) billing code) andbilling location---

    Jobname J$% (?@@-5?-B6DE)'@6@')?%B)

    F+T. L$1/+) $.'*)'+A

  • 8/12/2019 Jcl Training Class 001

    9/22

    Cla##: These tell about how much time each #obs should run.

    Class are di4ided into executions of certain types from A to >

    category .

    ;epending on installation the grades was gi4en for each class type.

    A - B@ min's the #ob has to complete % - @ min's

    C - B hour G $ 5? hoursG

    Hhy we need so many class because

    B* 7enerating 2eports for one year( it may too" B? hours to

    generates reports normally spea"ing reports will too" much time.

    He ha4e to gi4e class F$' for this #ob*

    5* ;oing updation deletion addtion of records( it may too" B

    hour we ha4e to gi4e class FC'*

    * ;oing some calculation ( it may too" to ? min's F A F*

    Key ord Parameters

  • 8/12/2019 Jcl Training Class 001

    10/22

    %ased on the wor" the #ob is going to do according to thatwe ha4e to pro4ide the class for each #ob. This

    )%T/:Three #obs was submitted at a time to the system so

    which #ob should submit first. To a4oid the confusion thepriority will help the system.

    P2T3 range will start from (B to B6* again it will depend on

    the installation.

    e$ 0o! )a!amete!#

  • 8/12/2019 Jcl Training Class 001

    11/22

    MS*-EE-: This parameter tells $+ which messages youwant to printed. The format of the parameter.

    +7L!9!L 8 (+tatement ) messages*

    +tatement , 2efer to your coded JCL statement.

    essages , To the system output messages generated by $+

    "#e o MS*-EE-: /f you want to a4oid some of the

    statements and messages which was generated by $+ we can doby using +7L!9!L.

    Hhat will be happening if you omit the +7L!9!L) the

    installation default will apply.

    e$ 0o! )a!amete!#

  • 8/12/2019 Jcl Training Class 001

    12/22

    STATEMENTS@ 8 Print only the #ob statement

    B 8 print all JCL statements including statements from cataloged

    procedures

    5 8 Print only the input JCLMESSA*ES

    @ 8 Print system messages only if the #ob abnormally terminates

    B 8 Print all system messages e4ery time.

    0or e.g

    +7L!9!L(B)B* / want to see all the messages

    and statements which was generated by $+.

    +7L!9!L 8 @ / don't want to see any messages

    and statements.

    e$ 0o! )a!amete!#

  • 8/12/2019 Jcl Training Class 001

    13/22

    MS*C-ASS: The message class parameter is associated

    with an output writer that in turn) is associated with a specific

    output de4ice. This enables you to route the system messages

    to a specific printer or other output de4ice.

    As your #ob is executingit also pro4ide you information if the

    system abnormally terminated and other information that will

    help you to analy>e the results and also

    $+ puts out so many system messages.

    Hhere this system messages should write dump.

    The +7CLA++ will help the system where it has to

    writedump and also /t tells you whether a file was "ept or

    deleted after a #ob step was finished.

    e$ 0o! )a!amete!#

  • 8/12/2019 Jcl Training Class 001

    14/22

    Key ord Parameters

    +uppose we ha4e submitted a #ob ha4ing B@ steps and after

    executing step6 )step got abend and when we submit for next

    time after resol4ing the step) but we need to start the #ob from

    step but not from stepB

    %ESTA%Tparameter is one of most important parameter that

    used in real time

    1sing this parameter we can start a #ob from a particular step

    +yntax

    %ESTA%T + STE)NAME

  • 8/12/2019 Jcl Training Class 001

    15/22

    Key ord Parameters

    T/)%"N+SCAN(5O-D

    The T/)%"Nparameter allows the operating systemto,

    SCANthe JCL for errors. $nce the scan iscompleted) a JCL listing) containing any errorsfound) will be printed. The Job will not beexecuted.

    5O-DI the #ob is submitted into the systembut will not be executed. The #ob will stay in5O-Dstatus until the T/)%"Nparameter isdeleted.

  • 8/12/2019 Jcl Training Class 001

    16/22

    Key ord Parameters

    COND+6%C.O)E%ATO%7STE)NAME87

    This parameter is used to either to bypass a particular step or toexecute a particular step.

    The%etu!n Coe6%C8is a number from through 49which is compared to the return code or completion codeissued by a program.

    The O)E%ATO%specifies the type of comparison to bemade, i.e.) 7T)LT)7!)L!)&! = !.

    The STE)NAMErefers to a particular step to which the 2C iscompared.

  • 8/12/2019 Jcl Training Class 001

    17/22

    Key ord Parameters

    /f the C$&; is true them the particular step is bypassed and executes when

    failed.

    He got Two other options here, EEN an ON-/

    EENI +pecifies that the #ob step is to be executed if any preceding step

    abended and no other 2C tests mentioned here are satisfied,

    /f a 2C test is specified here and it's true) this step is bypassed..

    ON-/I !xecute this step only if a pre4ious step abended and no 2C tests

    specified here are satisfied.

    COND+ON-/(EEN

    &ote, /f you don't code !4en or $nly) then a pre4ious step that

    abends will cause all subseuent steps not to be performed.

  • 8/12/2019 Jcl Training Class 001

    18/22

    %E*ION: The maximum amount of main storage allocated

    to your program.

    To execute are run a program we ha4e pro4ide some space

    for his #ob the region will tell to the system how much

    memory that the #ob reuired.

    +yntax

    %E*ION8 & "b%

    aximum region 4alue is @%

    e$ 0o! )a!amete!#

  • 8/12/2019 Jcl Training Class 001

    19/22

    Key ord Parameters

    TIME+6MM7SS8

    The TIMEparameter specifies the total amount of CP1 time

    the #ob will be allowed to run.

    TheTIMEparameter has 5#u,a!amete!#- one

    which indicates the number of minutes and onewhich

    indicates the number of seconds the #ob will be allowed

    to run.

    He can specify maximum by coding

    T/!8&$L//T A/1B??@

  • 8/12/2019 Jcl Training Class 001

    20/22

    EXEC: The !!C statement as it is used to cause the executionof one program or a procedure.

    /ts recommend that all your Job+teps ha4e meaningful step

    names.

    +T!P&A! !!C P7 8 +APL!) PA2 89AL1!)

    T/!8(@)@*)C$&;8(2C)$P!2*)2!7/$&82+/:! K

    ost of the system messages you will recei4e will refer to the

    step name. /f you gi4e blan" step name it will thru blan" only.

    )*M: !xec statement identifies the program to be executed in

    each step.

    !"e E#EC Statement

  • 8/12/2019 Jcl Training Class 001

    21/22

    PARM Parameter

    /t is used to access the data that are external to the program.

    JCL can send maximum B@@ characters to a program thru

    PA2.

    Lin"age section 1+T be coded with a ;al

  • 8/12/2019 Jcl Training Class 001

    22/22

    !"an$ %ou