Category: 04. JCL

  • Basic Sort Tricks

    The day-to-day application requirements in a corporate world that can be achieved using Utility Programs are illustrated below: 1. A file has 100 records. The first 10 records need to be written to output file. The option STOPAFT will stop reading the input file after 10th record and terminates the program. Hence, 10 records are…

  • Utility Programs

    IBM Dataset Utilities Utility programs are pre-written programs, widely used in mainframes by system programmers and application developers to achieve day-to-day requirements, organising and maintaining data. A few of them are listed below with their functionality: Utility Name Functionality IEHMOVE Moves or copies sequential datasets. IEHPROGM Deleting and renaming datasets; catalog or uncatalog datasets other…

  • Running COBOL Programs using JCL

    Compiling COBOL Programs In order to execute a COBOL program in batch mode using JCL, the program needs to be compiled and a load module is created with all the sub-programs. The JCL uses the load module and not the actual program at the time of execution. The load libraries are concatenated and given to…

  • Output Methods

    Any batch program executed through a JCL requires data input, which is processed and an output is created. There are different methods of feeding input to the program and writing output received from a JCL. In batch mode, there is no user interaction required but input and output devices and required organisation are defined in…

  • Defining Datasets

    A dataset name specifies the name of a file and it is denoted by DSN in JCL. The DSN parameter refers to the physical dataset name of a newly created or existing dataset. The DSN value can be made up of sub-names each of 1 to 8 characters length, separated by periods and of total…

  • Conditional Processing

    The Job Entry System uses two approaches to perform conditional processing in a JCL. When a job completes, a return code is set based on the status of execution. The return code can be a number between 0 (successful execution) to 4095 (non-zero shows error condition). The most common conventional values are: A job step…

  • Procedures

    The JCL Procedures are set of statements inside a JCL grouped together to perform a particular function. Usually, the fixed part of the JCL is coded in a procedure. The varying part of the Job is coded within the JCL. You can use a procedure to achieve parallel execution of a program using multiple input files. A…

  • Base Library

    Base Library is the Partitioned Dataset (PDS), which holds the load modules of the program to be executed in the JCL or the catalogued procedure, which is called in the program. Base libraries can be specified for the whole JCL in a JOBLIB library or for a particular job step in a STEPLIB statement. JOBLIB Statement A JOBLIB statement is used in…

  • DD Statement

    Datasets are mainframe files with records organised in a specific format. Datasets are stored on the Direct Access Storage Device (DASD) or Tapes of the mainframe and are basic data storage areas. If these data are required to be used/created in a batch program, then the file (i.e., dataset) physical name along with the file…

  • EXEC Statement

    Each JCL can be made of many job steps. Each job step can execute a program directly or can call a procedure, which in turn executes one or more programs (job steps). The statement, which holds the job step program/procedure information is the EXEC statement. The purpose of the EXEC statement is to provide required information…