Pli Training Class-2

Embed Size (px)

Citation preview

  • 7/27/2019 Pli Training Class-2

    1/12

    IBM-Mainframes

    PLI Training Class- 02

  • 7/27/2019 Pli Training Class-2

    2/12

    So far we have Covered

    Background and History of PLI.

    Structure of PLI Program.

    PLI Layout/PLI Code Sheet

    My First PLI Program

  • 7/27/2019 Pli Training Class-2

    3/12

    Preparation for PLI Programs

    Three important steps:

    1. Write a PLI Program.

    2. Compile the Program.

    3. Execute the Program..Compilation: Process of converting from source code to

    object code

    .For every PLI program we need to compile using JCL. The

    compile JCL will be standard for the all the programs.

    .Just we need to copy the compile JCL from the existing

    Dataset and make the necessary changes.

  • 7/27/2019 Pli Training Class-2

    4/12

    Preparation for PLI Program

    DISPGM: PROCEDURE OPTIONS(MAIN);PUT LIST(HELLO WORLD!);

    PUT SKIP LIST(HELLO ALL);

    END DSIPGM;

    COMPILER

    (IBMZPLI)

    HEWL/IEWL

    ( LINK EDITOR )

    Output: Object Module

    Output: Load Module

    PLI Program

    Execution JCL

    OutputSpool or File

  • 7/27/2019 Pli Training Class-2

    5/12

    JCLJob control Language

  • 7/27/2019 Pli Training Class-2

    6/12

    Introduction on JCL

    JCL stands forJOB CONTOL LANGAUGE and mostly used to

    compile and execute batch programs.

    JOB : Execution of one or more programs is knows as a JOB

    To write any JCL we require

    1. JOB Statement.

    2. EXEC Statement.

    3. DD Statement.

    4. Null Statement.

  • 7/27/2019 Pli Training Class-2

    7/12

    JCL Statements

    JOBSTATEMENT: JOB statement is used to identify the JOB Name

    and JOBs related parameters (accounting info, username, class, notify

    etc).

    Syntax:

    //JOBNAME JOB ACCTINFO,USERNAME,NOTIFY=USER-ID

    Jobname: To identify the job in the spool, should be USER-ID + atleast

    1 character. EX: FSS197A/FSS197B

    AccountingInformation: Is mainly used for billing purpose.

    Username: Is used to identify who has written the JCL.

    Notify: Is used to decided to which USER-ID the JOB has to be notify

    after successful or unsuccessful compilation

  • 7/27/2019 Pli Training Class-2

    8/12

    JCL Statements contd..

    EXEC Statement:This statement is used to identify the step name and

    program name. A maximum we can write 255 statements in a single

    JOB.

    Syntax:

    //STEP1 EXECPGM=PROG NAME

    DDstatement: Is used to specify the input and output location required

    for a program execution/compilation.

    Syntax: //DDNAME DD PARAMETERS

  • 7/27/2019 Pli Training Class-2

    9/12

    JCL Statements contd..

    DDnames

    STEPLIB : This is used to identify the path of the load module

    (ML language code) for a particular step only.

    JOBLIB : This is used to identify the path of the load module

    (ML language code) for the entire steps in a job.

    SYSPRINT: This is used to print the output messages in the

    spool.

    SYSOUT: If the program is unsuccessful the error O/P will be

    routed in to the spool. SYSIN: This is used to pass input data to the PL/I program.

    NULL STATEMENT(//): It is used to indicate the end of the JCL.

  • 7/27/2019 Pli Training Class-2

    10/12

    JCL Coding Sheet

    123---------COLUMN NUMBERS------7273------------------80

    //Name-field statement parameter1, 2,3 **COMMENTS**

    Every statement in JCL are preceded by //

    Name field: JOB Name, Step Name and DD name

    Statement Fields: JOB, EXEC, DD Statement

    Comment : To make any comment in the JCL program we need

    to code //*

    End of JCL is specified byNull statement i.e., //

  • 7/27/2019 Pli Training Class-2

    11/12

    Sample Execution JCL

    //JOBNAME JOB 123,SAHASRA,CLASS=A,NOTIFY=&SYSUID

    //*JOBLIB DD DSN=USERID.NAME.LOADLIB,DISP=SHR

    //STEP1 EXEC PGM=DISPGM

    //STEPLIB DD DSN=USERID.NAME.LOADLIB,DISP=SHR

    //SYSPRINT DD SYSOUT=*

    //SYSOUT DD SYSOUT=*

    //

  • 7/27/2019 Pli Training Class-2

    12/12

    Thank You

    Polsani Anil Kumar