1 / 91

JCL DAY 3

JCL DAY 3. Overview . IBM Utilties . Overview . IBM Utilties. IEFBR14 -> CREATE A DATASET IEBGENER -> CREATE BACKUP OF SEQUENTIAL DATASET IEBCOPY -> COPY DATASET FROM A PDS TO PDS OR MEMBER SORT -> SORT DATA IN ASCENDING/DESCENDING

holland
Download Presentation

JCL DAY 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JCL DAY 3 Overview

  2. IBM Utilties Overview

  3. IBM Utilties • IEFBR14 -> CREATE A DATASET • IEBGENER -> CREATE BACKUP OF SEQUENTIAL DATASET • IEBCOPY -> COPY DATASET FROM A PDS TO PDS OR MEMBER • SORT -> SORT DATA IN ASCENDING/DESCENDING ORDER • IDCAMS -> CREATE GDG OR VSAM

  4. IEBGENER • Create a backup of a sequential dataset or a member of a partitioned dataset • Produce a partitioned dataset or a member of it from a sequential dataset • Expand an existing Partitioned dataset by creating members and merging them into existing datasets

  5. IEBGENER JCL //JOB Card….. //STEP EXEC PGM=IEBGENER //SYSPRINT DD <Specify dataset for messages> //SYSUT1 DD <Specify input dataset> //SYSUT2 DD <Specify output dataset> //SYSIN DD <Specify control dataset>

  6. INPUT FILE (SYSUT1)

  7. OUTPUT FILE GENERATED AFTER Running IEBGENER Utility

  8. SPOOL Message

  9. Exercise: COPY A PDS member to Physical Sequential Dataset

  10. Exercise : Copy a PDS Member to Another PDS member

  11. Question and Answer • IEBGENER can be used to COPY A Physical sequential Dataset to another Physical Sequential Dataset ( T/F) • IEBGENER can be used to COPY a PDS member to another PDS Member ( T/F) • IEBGENER can be used to COPY a PDS to another PDS ( T/F)

  12. IEBCOMPR oVERVIEW

  13. The IEBCOMPR utility provides the ability to verify that the contents of two datasets are identical.  The datasets to be compared may be Physical sequential (PS) Partitioned (PO) organization.  Four DD cards are required:  The datasets to be compared are specified with the SYSUT1 and SYSUT2 DD cards. Output produced by the utility is written to the SYSPRINT DD card Utility control statements are read from the SYSIN DD card. // JOB CARD STATEMENT //STEP1 EXEC PGM=IEBCOMPR //SYSPRINT DD SYSOUT= * //SYSUT1 DD DSN=DATASET1,UNIT=SYSDA, // VOL=SER=LEM001, DISP=SHR //SYSUT2 DD DSN=DATASET2,UNIT=SYSDA, // VOL=SER=D10040, DISP=SHR //SYSIN DD *    COMPARE TYPORG=PS /* // IEBCOMPR Utility

  14. SPOOL Message

  15. Exercise: Compare Two PDS using IEBCOMPR Utility

  16. IEBCOPY Overview

  17. IEBCOPY :- • IEBCOPY is a utility program that may be used to copy one or more members from an existing PDS to a new or existing PDS, to make a backup copy of a PDS.

  18. IEBCOPY Utility

  19. SPOOL Message

  20. IEBCOPY : Copy only Selected Member Overview

  21. SELECT MEMBERS

  22. SORT Utility Overview

  23. SORT • Arranges records in a file in ascending or descending sequence • Provides tailoring feature to select a subset of records from file for sorting • Can reformat output file records after sorting • Merges two or more file into a single file

  24. SORT JCL //JOB CARD………. <Specify JOB Card details here> //STEPNAME EXEC PGM=SORT //STEPLIB DD <Specify library containing SORT program here> //SYSOUT DD <Specify the SORT Message dataset here for SORT utility to write messages as it executes> //SORTIN DD <Specify the SORT INPUT dataset here> //SORTWKnn DD <Specify the SORT temporary Work storage dataset here> //SORTOUT DD <Specify the SORT OUTPUT dataset here> //SYSIN DD <Specify SORT control statements here either as instream data or within a dataset to control the way sorting has to be done>

  25. SORT - SYSIN Parameters • Sort statements are coded through SYSIN which can be instream or cataloged • Dataset specified in SYSIN can be either a PS or a PDS • SORT FIELD statement to be preceded by at least one blank space • Format is • SORT FIELD=(<start-pos>,<length-in-bytes>,<field-format>,<sort-sequence>) • <start-pos>, specifies starting position of field on which sorting is to be done • <length-in-bytes>, specifies length of sort field in bytes • <field-format>, specifies data format of the sort field. Field formats are • CH for EBCDIC character sequence • AC for ASCII character sequence • BI for Binary sequence • ZD for Zoned Decimal • PD for Packed Decimal • <sort-sequence> is either “A” or “D” indicating Ascending or Descending sequence

  26. Input File

  27. Output File BEFORE Executing Utility

  28. SORT UTILITY

  29. SPOOL MESSAGE

  30. OUTPUT FILE GNERATED AFTER RUNNING SORT UTILITY

  31. Remove Duplicate Rows While Sorting Data using SORT UTILITY

  32. INPUT DATA WITH DUPLICATE ROWS

  33. OUTPUT FILE BEFORE RUNNING Utility

  34. SORT Utility

  35. Output file after running Utility

  36. MERGE Overview

  37. This process takes records from up to 16 sorted data sets and combines them in a single sorted output data set. The merge control statement format is similar to that of the sort. Input data sets must already be sorted in the same sequence. //STEP1 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DSN=MTPL.SEQ1,DISP=OLD //SORTIN2 DD DSN=MTPL.SEQ2,DISP=OLD //SORTOUT DD DSN=MTPL.SEQ3,DISP=OLD //SYSIN DD * MERGE FIELDS =(21,2,CH,A) /* Merge

  38. INPUT FILE 1

  39. INPUT FILE 2

  40. MERGE

  41. OUTPUT FILE AFTER MERGE OPERATION

  42. JCL DAY 4

  43. Procedures in JCL oVERVIEW

  44. Procedures • Abbreviated as PROC • Consists of pre-tested JCL statements which is given a name • Helps in minimizing duplication of code and hence errors • Two types • Instream Procedures • Cataloged Procedures

  45. Instream Procedures • Coded within the input stream of the JOB • Can be invoked more than once within the JOB • Starts with a PROC statement and ends with a PEND statement • Formats for invoking the PROC are: • EXEC <procname> • EXEC PROC=<procname> • <procname> must be 1 to 8 characters long

  46. Symbolic Parameters • Allows same JCL procedure to be used with different parameters • Very often used in situations where same JCL is used by different programmers with different parameters to access different datasets • Consists of 1 to 8 characters. The first character must be &

  47. Instream procedure

More Related