IBMMainframes PLI Training Class 02 www mainframesonlinetraining weebly
IBM-Mainframes PLI Training Class- 02 www. mainframes-online-training. weebly. com Polsani Anil Kumar
So far we have Covered § § Background and History of PLI. Structure of PLI Program. PLI Layout/PLI Code Sheet My First PLI Program
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 program’s. § Just we need to copy the compile JCL from the existing Dataset and make the necessary changes.
Preparation for PLI Program DISPGM: PROCEDURE OPTIONS(MAIN); PUT LIST(‘HELLO WORLD!’); PUT SKIP LIST(‘HELLO ALL’); END DSIPGM; PLI Program COMPILER (IBMZPLI) Output: Object Module HEWL/IEWL ( LINK EDITOR ) Output: Load Module Execution JCL Output Spool or File
JCL Job control Language www. mainframes-online-training. weebly. com Polsani Anil Kumar
Introduction on JCL § JCL stands for JOB 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.
JCL Statement’s § JOB STATEMENT: JOB statement is used to identify the JOB Name and JOB’s 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: FSS 197 A/FSS 197 B… § § § Accounting Information: Is mainly used for billing purpose. User name: 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
JCL Statement’s § 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: § //STEP 1 EXEC PGM=PROG NAME § DD statement: Is used to specify the input and output location required for a program execution/compilation. § Syntax: § //DDNAME DD PARAMETERS
JCL Statement’s § contd. . DD name’s § 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.
JCL Coding Sheet § § 123 -----COLUMN NUMBERS------7273 ---------80 § § Every statement in JCL are preceded by // § End of JCL is specified by Null statement i. e. , // //Name-field statement parameter 1, 2, 3… **COMMENTS** 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 //*
Sample Execution JCL //JOBNAME JOB 123, ’SAHASRA’, CLASS=A, NOTIFY=&SYSUID //*JOBLIB //STEP 1 //STEPLIB DD EXEC DD DSN=USERID. NAME. LOADLIB, DISP=SHR PGM=DISPGM DSN=USERID. NAME. LOADLIB, DISP=SHR //SYSPRINT DD SYSOUT=* //SYSOUT=* // DD
Thank You www. mainframes-online-training. weebly. com Polsani Anil Kumar
- Slides: 12