+ All Categories
Home > Documents > Baseline Jcl Day1

Baseline Jcl Day1

Date post: 07-Apr-2018
Category:
Upload: ram8708
View: 227 times
Download: 2 times
Share this document with a friend

of 47

Transcript
  • 8/4/2019 Baseline Jcl Day1

    1/47

    JCL

    DAY 1

  • 8/4/2019 Baseline Jcl Day1

    2/47

    J C L

    JOB CONTROL LANGUAGE

  • 8/4/2019 Baseline Jcl Day1

    3/47

    Determinethejob

    CreatetheJCL

    SubmittheJOB

    JESinterpretsJCL andpasses it

    to

    MVS

    MVS does

    the work

    UserViews andInterprets

    output

    JEScollects

    the outputand information

    aboutthe JOB

    SystemMessages

  • 8/4/2019 Baseline Jcl Day1

    4/47

    WHY JCL ???

    MVS operating system is designed to work

    in the batch processing mode

    JCL is a powerful and flexible language

    that helps to customize the use of localand remote resources available to one or

    more computers

  • 8/4/2019 Baseline Jcl Day1

    5/47

    Difference between batch &

    interactive processingBatch processing

    Jobs submitted are

    executed at later time User can not interact Performance measure is

    throughput

    Snapshot of output isused for debugging

    Interactive processing

    Jobs submitted are

    executed immediately User can interact Performance measure is

    response time

    Interactive debugging

  • 8/4/2019 Baseline Jcl Day1

    6/47

    Various stages of JCL execution

    Input Conversion

    Execution Output Hard copy Purge

    f

  • 8/4/2019 Baseline Jcl Day1

    7/47

    Input JES gives a unique jobnumber

    Conversion Check syntax error & Place itin JES spool

    Initiator Taking the job from the spooland sending it for execution

    Output sends the output to printer

    Purge After job is processed,it ispurged

    Various stages of JCLexecution

  • 8/4/2019 Baseline Jcl Day1

    8/47

    Stages of Job Processing - INPUT

    Job entry or input is how jobs are entered

    into the system.

    Local and remote card readers

    Via a started procedure

    Internal readerFrom another system via network job entry

    Several methods are :

  • 8/4/2019 Baseline Jcl Day1

    9/47

    Stages of Job Processing - INPUT

    INPUT

    SPOOL

    JCL

    SYSINJES

    MVS

    During input processing , the job is placed out on spool.At this point in time, a job consists of :

    Any JOB Control Language

    Any JOB Entry Control Language (JECL) in the Input StreamAny data SYSIN in the Input Stream

    An entry is initialized in the Jobqueue and the job is assigned a

    JES Job Number as part of Input Processing

  • 8/4/2019 Baseline Jcl Day1

    10/47

    Stages of Job Processing -CONVERSIONSPOOL

    JCL

    SYSIN

    During conversion the JCL for a job is converted to its internal

    form, known as Converter/Interpreter text. All of the jobs that

    were marked awaiting conversion in the job Queue are converted

    MVS

    JES

    PROCLIB

    PROC

    Full Syntax checking of the JCL is done at this time

    Input to the conversion process consists of the Original JCL and

    any cataloged procedure referenced by it

  • 8/4/2019 Baseline Jcl Day1

    11/47

    Stages of Job Processing -CONVERSION

    JOB INTERPRETER - JES2

    JES2

    ADDRESS

    SPACE

    INITIATOR

    ADDRESS

    SPACE

    PAY

    JCLINTERPRETER

    PAY

    CONTROL

    BLOCKS

    JES2 gives job to idle initiator

    Initiator attaches the interpreter

    to build control blocks

    Control blocks used to start job

    in initiator

  • 8/4/2019 Baseline Jcl Day1

    12/47

    Stages of Job Processing -CONVERSION

    JOB INTERPRETER - JES3

    JES3

    ADDRESS

    SPACE

    INITIATOR

    ADDRESS

    SPACE

    PAY

    JCL

    INTERPRETER

    PAY

    CONTROL

    BLOCKS

    JES3 Attaches the interpreter

    Interpreter builds the control

    blocks in the JES3 address space

    JES3 passes the CONTROL

    blocks to an idle initiator to

    start execution.

  • 8/4/2019 Baseline Jcl Day1

    13/47

    Stages of Job Processing - EXECUTION

    JES selects a job for execution , based upon job CLASS

    and job selection PRTYex. //PAY JOB PRTY=8,CLASS=A

    Allocation ( of data sets and devices necessary for execution )

    is performed.

    If the program reads any SYSIN data, a copy will be read

    from Spool and presented to the program.

    If the program creates any SYSOUT data, it will be

    Spooled, rather than sent directly to an output device.

  • 8/4/2019 Baseline Jcl Day1

    14/47

    Stages of Job Processing - OUTPUT

    After the job has terminated, the output created isanalysed and grouped according to SYSOUTclass and output characteristics

    Entries are then created in the Job Output Table(JOT) to reflect these various groupings

  • 8/4/2019 Baseline Jcl Day1

    15/47

    Stages of Job Processing - HARDCOPY

    During this phase, job output characteristics andthe output is sent to the physical devices.

  • 8/4/2019 Baseline Jcl Day1

    16/47

    Stages of Job Processing - PURGE

    During Purge processing, all of the resources allocatedto the job in earlier phases can be freed for re-use.These include :

    Spool Space

    Jobqueue space

    JES job number

  • 8/4/2019 Baseline Jcl Day1

    17/47

    JCL PROCESSING

    JCL

    SYSIN

    SYSOUT

    SPOOLJES2 /

    JES3

    JES2 /

    JES3

    INITIATOR1 INITIATOR2PRINTER

    INPUT

    STREAM

  • 8/4/2019 Baseline Jcl Day1

    18/47

    JCL execution

    JCL INITIATION

    STEP INITIATION

    ALLOCATION

    PROGRAM EXECUTION

    STEP TERMINATION

    JOB TERMINATION

    JCL

    SYSIN

    SYSOUT

  • 8/4/2019 Baseline Jcl Day1

    19/47

    QUESTIONS ???

    JCL is used to write an application program ?

    Yes/No

    What are the different stages of JCL processing ?

  • 8/4/2019 Baseline Jcl Day1

    20/47

    JCL statements

    JOB Job identification

    EXEC Instruction for execution

    DD Source of data to operate

  • 8/4/2019 Baseline Jcl Day1

    21/47

    TYPE OF STATEMENTS

    JOB CONTROL STATEMENTS

    UTILITY CONTROL STATEMENTS

  • 8/4/2019 Baseline Jcl Day1

    22/47

    Basic Format of a JCL :

    JCL statements are coded in 80 byterecords -

    Only 72 of the 80 chars available to codeJCL -

    last eight columns of each record reserved foran optional sequence number

  • 8/4/2019 Baseline Jcl Day1

    23/47

    JCL STATEMENT FORMAT

    //P123 JOB 1234,AMLAN,CLASS=E

    Name Parameters

    Operation

    Identifier Comment

  • 8/4/2019 Baseline Jcl Day1

    24/47

    Basic Format of a JCL : ...

    Identifier [Name] [Operation][Parameters] [Comments]

    Identifier Two slashes ( // ) starting in col 1.

    Exceptions -

    1) For a delimiter statement, /* starting in col 1

    2) For a comment statement , //* starting at col1

    Name One to eight alphanumeric , starting with a

    letter char. Must begin at col 3.

  • 8/4/2019 Baseline Jcl Day1

    25/47

    Basic Format of a JCL : ...

    OperationA valid operation code, such as JOB, EXEC or

    DD. Must be preceded and followed by a space.

    Parameters

    One or more parameters depending on theoperation. Individual parameters are separatedfrom one another by commas, no interveningspaces.

    Comments

    comments may follow parameters, preceded byone space and not extending beyond col 71

  • 8/4/2019 Baseline Jcl Day1

    26/47

    JCL parameters :

    JCL parameters : 1) Positional parameters - Must occur at a specific position within the

    parameters field

    account for a missing parameter by a comma

    2) Keyword parameters -

    UNIT=SYSDA ( no spaces ) UNIT is a keyword parameter of value SYSDA

    Keyword parameters to come only after allpositional parameters have been coded, order ofkeyword parameters immaterial

  • 8/4/2019 Baseline Jcl Day1

    27/47

    JCL subparameters :

    DCB=(DSORG=PO,LRECL=80,BLKSIZE=6160)

    DCB=(DSORG=PO)DCB=DSORG=PO

    DISP=(,DELETE)

    Comma place holders are required only for missingpositional subparameters.

  • 8/4/2019 Baseline Jcl Day1

    28/47

    Continuing JCL statements: ... Break the parameter field with the comma

    that follows a parameter or sub-parameter

    Slashes in column 1 & 2 of following line Next parameter or sub parameter starting

    anywhere between columns 4 - 16

    //SYSUT2 DD DSNAME=...,DISP=...,// UNIT=SYSDA,VOL=SER=MPS800,

    // SPACE=(CYL,(10,5,2)),// DCB=DSORG=PO

    ( X ) Avoid continuing comments from line to line.

    G id li

  • 8/4/2019 Baseline Jcl Day1

    29/47

    Guidelines :

    JCL cryptic :

    Code just one or two parameters per line

    align the operation and parameters fields

    of each statement

    begin job with a group of commentstatements that document a job thoroughly

    Name, date of coding, what each job stepdoes, any special processing requirements

    Dont forget to update comments !

  • 8/4/2019 Baseline Jcl Day1

    30/47

    JCL statements

    JOB Job identification

    EXEC Instruction for execution

    DD Source of data to operate

  • 8/4/2019 Baseline Jcl Day1

    31/47

    JOB STATEMENT

    ACCT CLASS

    NAME NOTIFY

    MSGLEVEL TYPRUNMSGCLASS PRTY

    COND RESTART

    USER REGION

    PASSWORD PERFORM

    TIME

  • 8/4/2019 Baseline Jcl Day1

    32/47

    IMPORTANT JOB PARAMETERS

    positional parameters

    ( a/c inf ),name

    ex. //TCSABCDA JOB (A123),AMLAN

    All these parameters are optional as far as JCL is concerned,

    they are probably required by your installation.

  • 8/4/2019 Baseline Jcl Day1

    33/47

    IMPORTANT JOB PARAMETERS

    keyword parameters

    ( CLASS )

    ex. //TCSABCDA JOB CLASS=A

    CLASS specifies the job class that is the nature of the job.

    Installation will specify which of the 36 possible classes to use

    which is from A to Z and 0 to 9 .

    Installation establishes a default class that is in effect if CLASS

    is omitted.

  • 8/4/2019 Baseline Jcl Day1

    34/47

    IMPORTANT JOB PARAMETERS

    keyword parameters

    ( MSGCLASS )

    ex. //TCSABCDA JOB MSGCLASS=A

    MSGCLASS specifies the job scheduler message output class.

    Job scheduler messages include all messages not printed by the

    job steps being executed but the JCL messages and system messages

    Installation establishes a default class that is in effect if CLASS

    is omitted.

  • 8/4/2019 Baseline Jcl Day1

    35/47

    IMPORTANT JOB PARAMETERS

    keyword parameters

    ( MSGLEVEL )

    ex. //TCSABCDA JOB MSGLEVEL=(1,1)

    MSGLEVEL(jcl,allocations) specifies the printing of JCLstatements and allocation messages.

    ex. MSGLEVEL(0,1) will print only JOB statement, and

    all the allocation,JES,SMS and operator messages

    By default it is MSGLEVEL(1,1)

  • 8/4/2019 Baseline Jcl Day1

    36/47

    IMPORTANT JOB PARAMETERS

    keyword parameters

    ( NOTIFY )

    ex. //TCSABCDA JOB NOTIFY=TCS

    NOTIFY notifies you at a time-sharing terminal when the job is

    completed.

    IMPORTANT JOB PARAMETERS

  • 8/4/2019 Baseline Jcl Day1

    37/47

    IMPORTANT JOB PARAMETERS

    keyword parameters

    ( TYPRUN )

    ex. //TCSABCDA JOB TYPRUN=SCAN

    TYPRUN checks the JCL and holds the job in the input queue.

    TYPRUN = SCAN checks the JCL for syntax errors and suppresses execution

    of the job

    TYPRUN = HOLD holds the JCL in the input queue for later execution.It is helduntil the operator releases it.

    TYPRUN = JCLHOLD(JES2 only) similar to HOLD but the difference is it is

    checked while it is not with the HOLD option.

    TYPRUN = COPY(JES2 only) lists or duplicates the lines placed in the JOBstatement to the class assigned in the MSGCLASS parameter and suppressesexecution.

    SOME OTHER keyword JOB PARAMETERS

  • 8/4/2019 Baseline Jcl Day1

    38/47

    SOME OTHER keyword JOB PARAMETERS

    PRTY=priority : is related to the CLASS parameter. It assignspriority to jobs which belong to the same class.priority numbers

    range from (0-14) or (0-15) depending on installations.

    TIME=(min,sec) : signifies how much time the JOB must take to

    run.

    RESTART=STEP3 :Forces the JOB execution to start from STEP3.

    SOME OTHER keyword JOB PARAMETERS

  • 8/4/2019 Baseline Jcl Day1

    39/47

    SOME OTHER keyword JOB PARAMETERS

    REGION=96K :To override the default amount of workspace

    assigned for the job.

    COND=(4,LT) :Permits the execution of a steps to depend on the

    return code from the previous steps.Will be dealt in detail in Day2.

    ADDRSPC=REAL : It is used to specify whether the program is

    to use REAL or VIRTual ADDRess SPaCe. Default is Virtual. If

    Real is coded then the REGION parameter is also to be coded.

  • 8/4/2019 Baseline Jcl Day1

    40/47

    Various stages of JOBProcessing

    Input Conversion

    Execution Output Hard copy Purge

  • 8/4/2019 Baseline Jcl Day1

    41/47

    JOB ENTRY SUBSYSTEM

    JES2 / JES3

    JES2 or JES3 statements can be includedto communicate with JES concerning...

    INPUT

    OUTPUT PROCESSING

  • 8/4/2019 Baseline Jcl Day1

    42/47

    JES2 Control Statements

    $COMMAND OUTPUT SIGNOFF

    JOBPARAM PRIORITY SIGNON

    MESSAGE ROUTE XEQ

    NETACCT SETUP XMIT

    NOTIFY

  • 8/4/2019 Baseline Jcl Day1

    43/47

    JES2 Control Statements

    NOTIFY - direct jobs notification messages to a user.

    PRIORITY or PRTY -Assign a selection priority for yourjob. Within a job class, a job with a higher priority is

    selected for execution sooner.

    JES2 Control statements are precededwith /* in col1 & col2.

  • 8/4/2019 Baseline Jcl Day1

    44/47

    Errors

    JCL syntax errors.

    JOB will not be submitted

    JCL allocation errors.

    JES2-subsequent steps will not get executed.JES3-detects errors in the beginning.

  • 8/4/2019 Baseline Jcl Day1

    45/47

    Abend Failures

    An ABEND failure occurs under the following

    conditions:

    A program while executing, attempts to perform an

    instruction or operation which the system recognizes

    as being impossible or unacceptable.

    Causes of Abend

  • 8/4/2019 Baseline Jcl Day1

    46/47

    Causes of Abend

    FailuresLogic error

    JCL error

    Resource unavailabilityExceeding limits (Time or Space on DASD)

    Hardware Malfunction

    User ABENDSOperator intervention

    Operating System failure

  • 8/4/2019 Baseline Jcl Day1

    47/47

    Thats all for

    DAY

    1


Recommended