CATALOGED PROCEDURES - IBM Mainframe

The simplest way to compile your program under z/OS is by using a batch job with a cataloged procedure. A cataloged procedure is a set of job control statements placed in a partitioned data set (PDS) called the procedure library (PROCLIB).

z/OS comes with a procedure library called SYS1.PROCLIB. A simple way to look at the use of cataloged procedures is to think of them as copybooks. Instead of source statements, however, cataloged procedures contain JCL statements. You do not need to code a JCL statement to tell the system where to find them because they are located in a system library which automatically gets searched when you execute JCL that references a procedure.

You need to include the following information in the JCL for compilation:

  • Job description
  • Execution statement to invoke the compiler
  • Definitions for the data sets needed but not supplied by the procedure.

IBM-Supplied Cataloged Procedures

Cataloged procedures can be incorporated on your system when it is Installed. IBM distributes the following cataloged procedures with the program product:

  • COB2UC (Compile)                        
  • COB2UCL (Compile and link-edit)   
  • COB2ULG (Link-edit and execute)
  • COB2UCLG (Compile, link-edit and execute)
  • COB2UCG (Compile, load and execute)

These procedures can be used with any of the job schedulers released as part of MVS. When parameters required by a particular scheduler are encountered by another scheduler that does not require those parameters, they are either ignored or alternative parameters are substituted automatically.

Procedure names begin with the abbreviated name of the processor program, which, in the case the COBOL procedures, is COB2. The processor name COB2 is followed by the letter U, and by one or more of the letters C (compile), L (link-edit), and G (go-that is, execute). Hence, procedure COB2UC is a single-step procedure that compiles a program, using the VS COBOL II product; COB2UCLG is a three-step procedure wherein the first step compiles a program, using COBOL; the second step link-edits the output of the first step; and the third step executes the output of the linkage editor.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics