IBM User's Guide, Thirteenth Edition


12 MVS Procedure Libraries

Job control language (JCL) that is frequently used with little change, such as that required to compile, link-edit and execute programs, can be stored as a member of a partitioned data set (PDS) called a procedure library Each set of JCL statements (member) in the procedure library is called a cataloged procedure The cataloged procedure name is the member name, or alias. A procedure is invoked by coding the procedure name on an EXEC statement, as follows:

//stepname EXEC proc-name There are two types of procedure libraries at UTCC, private libraries and the UTCC procedure library (UTCC.MVS.PROCLIB).


Private procedure libraries

Private procedure libraries contain procedures which users create and maintain for their own use.

JCL requirements for private procedure libraries

A private procedure library is created as a partitioned data set on an online disk pack. The record format of the PDS must be fixed, and the record length must be 80 bytes. The records should be blocked, with a blocksize that is a multiple of 80. If any procedure from a private library is required in a job, the JCL must include a PROCLIB DD statement after the JOB statement and any JES2 statements but before any other JCL statements. The PROCLIB DD statement uses standard parameters for accessing an existing data set. If that data set is cataloged, the DSN parameter with DISP=SHR is sufficient to retrieve the data set. If the data set is not cataloged, the VOL and UNIT parameters are required in addition to DSN and DISP. An invalid PROCLIB statement will cause the job to fail with a JCL error and will produce a diagnostic message describing the error. An example showing the placement of the PROCLIB DD statement is given below.

//TESTPROC JOB ,SMITH,GROUP=J999991,USER=P999998,MSGLEVEL=(1,1),
//         PASSWORD=?
/*ROUTE    PRINT RMT2
//PROCLIB  DD  DSN=J999991.PROCLIB,DISP=SHR
//STEP1    EXEC  USERPROC

The UTCC procedure library: UTCC.MVS.PROCLIB

The UTCC.MVS.PROCLIB library contains procedures which are maintained by UTCC for use by the user community. Any procedure in UTCC.MVS.PROCLIB may be invoked without including a PROCLIB DD statement within the job. Two categories of procedures are contained in UTCC.MVS.PROCLIB. Procedures in the first category are used to compile, link edit or load, and/or execute programs written in any of the source languages, such as FORTRAN, PL/I, or COBOL, which are available on MVS at UTCC. Procedures in the second category are used to invoke other programs or programming systems, such as SPSS or MPSX, which are available at UTCC.

Cataloged procedures for programming languages

Most UTCC cataloged procedures for programming languages follow standard conventions. The convention for the format of the procedure name is xxxxxsss, where

xxxxx is the abbreviation of the compiler/assembler programming language name and may be from one to five characters in length. The name may include the compiler/assembler level, e.g., FORTV for VS FORTRAN. See section 12.3.1 for a list of language abbreviations.

sss is the suffix and indicates the function to be performed by the cataloged procedure. The standard suffixes are:

C Compile. These procedures should be used early in debugging to obtain a program listing and diagnostic messages.

CL Compile and Link. These procedures should be used either early in debugging to obtain a program listing, compiler diagnostics, and linkage editor diagnostics, or for completed programs to create a load module library.

CLD Compile and Load. These procedures should be used in the later stages of debugging to obtain a program listing and compiler diagnostics, to obtain loader diagnostics, and to obtain test output. The CLD procedures should not be used with completed programs. Instead, either an object module should be obtained which can be link edited or loaded and executed without further compilation, or a load module library should be built so that programs can be run without compilation or linkage editor processing.

CLG Compile, Link, and Go. These procedures should be used in the later stages of debugging to obtain a program listing and compiler diagnostics, to obtain linkage editor diagnostics, and to obtain test output. The CLG procedures should not be used with completed programs. Instead, either an object module should be obtained which can be link edited or loaded and run without further compilation, or a load module library should be built so that the program may be run without compilation or linkage editor processing. The decision to use CLD or CLG procedures usually depends on time and memory requirements. Loading of a program with CLD is somewhat faster than with CLG but requires a significant amount of additional memory. Actual program execution time is the same with either procedure.

LD Load. These procedures should be used for completed programs which have been previously compiled and for which an object exists. They should be used in preference to the LG procedures for programs which do not use advanced features of the linkage editor such as CHANGE and INCLUDE statements and where memory is not a critical factor during execution.

LG Link and Go. These procedures should be used for completed programs which have been previously compiled and for which an object module or load module exists. They should not be used if the LD procedures can be used instead.

L Link. These procedures should be used for building load module libraries of completed programs which have already been compiled and for which an object module exists. The EXEC statement to invoke a cataloged procedure for a programming language has the form

//stepname EXEC xxxxxsss

The stepname on the EXEC statement is optional but recommended.

Compilers and assemblers

Cataloged procedures are available on MVS/ESA for the compilers and assemblers listed below. The abbreviated compiler or assembler name may be combined with a suffix, as described in section 12.3 above, to form the procedure name. The procedure names marked with an * do not include a suffix.

Name/Level Compiler/Assembler

ALGOF ALGOL F ASMH Assembler H *ASSIST Pennsylvania State's Assembler C370 IBM C COBV2 VS COBOL II *EASYTREV EASYTRIEVE *EZTPLUS EASYTRIEVE PLUS FORTV VS FORTRAN FORTD VS FORTRAN Debugger FORTM VS FORTRAN Multitasking Facility FORTP VS FORTRAN Parallel Compiler *FORTXLAT FORTRAN Translation Tool *PLC PL/C PL1X PL/I Optimizing Compiler RPGE Report Program Generator E *SPITBOL SPITBOL VSPAS VS Pascal

Stepname conventions

Within each cataloged procedure in UTCC.MVS.PROCLIB, the EXEC statement that accomplishes the processing task of the procedure is labeled with a stepname. Knowing this stepname allows a user to tell the computer to supply desired values to certain variables within the process that is being executed (these variables are called symbolic parameters and are discussed in the next section). Because the user may not see the JCL statements of the cataloged procedure, the stepnames follow a naming convention. The following stepname conventions are used within every cataloged procedure for the source languages:

Function Stepname

ALGOL compilation ALGO ASSIST compilation and execution GO IBM C compilation C370 COBOL compilation COB EASYTRIEVE compilation and execution GO EASYTRIEVE PLUS compilation and execution EZTPLUS FORTRAN compilation FORT FORTRAN Translation Tool GO VS Pascal compilation PASC PL/C compilation and execution GO PL/I compilation PL1 RPG compilation RPG

link editing LKED execution GO loading and execution GO assembly ASM

Symbolic parameters

A symbolic parameter is a variable within a cataloged procedure to which a value may be assigned by coding on the EXEC statement the name of the symbolic parameter and its desired value.

Step option parameter

Various options may be specified by the use of symbolic parameters on the EXEC statement which invokes the cataloged procedure. For many of the steps listed in section 12.3.2 above, there is a parameter of the form stepnameOPT; e.g.:

FORTOPT FORTRAN compiler options ALGOOPT ALGOL compiler options PL1OPT PL/I compiler options C370OPT IBM C compiler options COBOPT COBOL compiler options ASMOPT Assembler options LKEDOPT linkage editor options LOADOPT loader options (in the GO step) GOOPT user execution-time options (in the GO step)

The UTCC cataloged procedures have default values for their symbolic parameters. Although the default options are not the same for all the compilers, some general conventions are described below.

` In any procedure containing a compilation, the default option for an object module is NODECK.

` In cases where an assembler listing for a higher level language program can be obtained, the default is to suppress the assembler listing.

` In all cases, a source listing is produced by default.

` In all steps involving compilation, an object module is placed on disk by default. The option is normally called the LOAD option.

` In all steps involving the linkage editor, the default options are LKEDOPT='LIST,MAP'. Any additional options may also be specified by using the LKEDOPT parameter. However, the linkage editor does not permit negative options. Thus, options must be negated by their omission rather than by their negation. This may be done by specifying PARM.LKED= on the EXEC statement. The examples below illustrate these rules.

1) To specify XREF in addition to LIST and MAP:

//STEP1 EXEC FORTVCLG,LKEDOPT=XREF

2) To specify LIST but no MAP:

//STEP1 EXEC FORTVCLG,PARM.LKED=LIST

3) To specify no LIST and no MAP:

//STEP1 EXEC FORTVCLG,PARM.LKED=

` The LOADOPT parameter is present in all steps involving the loader. The loader combines the loading function and the execution function into a single step, the GO step; there is no actual LOAD stepname. The default value for LOADOPT is a null character string.

` The GOOPT parameter is present in all procedures having a GO step. The default for GOOPT is a null character string.

` All other default options for any compiler may be obtained from a source listing of a program for that language, since all of the compilers print a list of the options used. How to override the default value of a symbolic parameter: Only those symbolic parameters whose values are to be changed need be specified. For example,

//STEP1 EXEC FORTVC,FORTOPT=LIST

will cause an assembly listing of the FORTRAN program to be produced but will not change any other standard options. The value of a parameter must be enclosed in parentheses or apostrophes if more than one option is specified. Apostrophes must be used if any nonalphabetic or nonnumeric character such as an equal sign (=) or a comma (,) is used. For example,

//STEP1 EXEC ASMHC,ASMOPT='NOXREF,NOLIST,LINECNT=50'

REG parameter

Each step within a cataloged procedure has a parameter to specify the size of the region in which that step will run. Each parameter is of the form The parameters and their default values are as follows:

ALGOREG=64K ASMREG=256K (Assembler H) C370REG=2M (IBM C) COBREG=1280K (VS COBOL II) FORTREG=3M (VS FORTRAN) PASCREG=1024K (VS Pascal) PL1REG=512K RPGREG=64K SPITREG=128K LISTREG=2M (VS COBOL II with COBOLAID) LKEDREG=256K (general) LKEDREG=512K (IBM C, VS Pascal, VS COBOL, PL1X) LKEDREG=1M (FORTRAN) GOREG=64K (ALGOL, ASSEMBLER H, RPGE) GOREG=128K (ASSIST, SPITBOL) GOREG=256K (VS COBOL, VS FORTRAN multitasking) GOREG=512K (VS Pascal, PL1X) GOREG=2048K (IBM C, VS FORTRAN debugger) GOREG=2M (FORTXLAT) GOREG=5M (Parallel FORTRAN)

These default parameters are adequate for most jobs, but they may be changed when required. For example,

//stepname EXEC FORTVCLG,FORTREG=4096K,GOREG=320K

Other symbolic parameters

There are some other symbolic parameters which are less general in scope than the previous parameters. These are discussed briefly below:

LETGO condition code parameter OPT PL/I and VS FORTRAN optimization parameter GOPGM load module name parameter NAME VS FORTRAN program name parameter LANGLVL VS FORTRAN language level parameter (default '=77') CHARLEN VS FORTRAN character variable maximum length (default '=500') VERSION VS FORTRAN mathematical library parameter MODE COBOL variable to produce normal or COBOLAID enhanced listing (default '=NORMAL'; see section 13.12, "Additional COBOL support")

The LETGO parameter refers to a compiler-generated condition code indicating the level of success of the compilation. A code of zero indicates no errors; a code of four, warnings; a code of eight, errors; etc. This code is tested by the link edit and execution steps and may suppress execution of these steps. The LETGO parameter may be used to specify the maximum error level in a compilation which will permit the link edit and execution to proceed. For example,

// EXEC COBV2CLD,LETGO=0

implies that execution is to be permitted only if there are absolutely no errors or warning messages in the COBOL compilation. The default value for LETGO is 8 for PL/I and 4 for all other languages. The OPT parameter may be used to specify the optimization level for the PL/I and VS FORTRAN compilers. The effects of using the optimization parameters are explained in the appropriate programmer's guides. For example,

// EXEC PL1XC,OPT=1

will perform a PL/I compilation with optimization level 1. The default values are OPT=2 for VS FORTRAN and OPT=0 for the PL/I Optimizer. The GOPGM parameter may be used to specify the name of the user's load module in procedures involving the linkage editor. The default value for this parameter is GO. If a job contains more than one link edit step, it is necessary to specify a name other than GO in order to avoid overwriting the first module. The -L, -CL, -CLG, and -LG procedures all involve link edits, so that any combination of these procedures requires the use of the GOPGM parameter. For example,

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //STEP1 EXEC ALGOFCLG,ALGOOPT=LP //ALGO.SYSIN DD * (ALGOL program) //STEP2 EXEC PL1XCLG,GOPGM=PROG2 //PL1.SYSIN DD * (PL/I program)

In this example, the load module name for the ALGOL program is GO by default; the load module name for the PL/I program is specified as PROG2. The symbolic parameters NAME and LANGLVL are included in the VS FORTRAN procedures to enable compatibility with the older FORTRAN 66 language The NAME parameter is used to specify a program name other than MAIN for the main program. The LANGLVL parameter may be used to select the FORTRAN 66 language standard. LANGLVL=66 specifies that the source input is written in the FORTRAN 66 language level. If the NAME parameter is used, LANGLVL=66 must also be coded. For example,

// EXEC FORTVCLG,LANGLVL=66,NAME=INVSIN

specifies a FORTRAN 66 main program whose name is INVSIN. The default value is LANGLVL=77, which is the FORTRAN 77 level described in the VS FORTRAN Version 2 manuals. The symbolic parameter VERSION is used with VS FORTRAN to specify which versions of the mathematical libraries ESSL and NAG to include in the LKED step. The default is VERSION=VECTOR, which selects the vector versions. To select the scalar versions, code VERSION=SCALAR. See section 16.3.2 on ESSL and section 16.3.7 on NAG for more information.

DD statement conventions

The DD statements necessary for each processing program may be found in the programmer's guide for the language in which the program is written. However, the conventions given below apply to DD statements used with programs run at UTCC.

` A DD statement for printed output is included in all steps. The ddname is FT06F001 in FORTRAN GO steps, SYSOUT in COBOL GO steps, ALGLDD01 in ALGOL GO steps, and SYSPRINT in all other steps. The printed output is always directed to SYSOUT=A or SYSOUT=*.

` A DD statement for card-image output is included for all compiler/assembler programs. The ddname is SYSPUNCH for the compilers and FT07F001 for FORTRAN execution. The card-image output is always directed to SYSOUT=B and no DCB information is specified.

` A cataloged procedure cannot contain DD statements for card-image input (DD *); however, such data sets can be defined with the DDNAME parameter, which is described in MVS/ESA JCL Reference , GC28-1829. The required ddname is SYSLDIN for the loader and SYSIN for all other procedure steps. The FORTRAN ddname FT05F001 for unit 5 is changed to SYSIN through the DDNAME parameter on the DD statement. The linkage editor name SYSLIN is either changed to SYSIN or concatenated with SYSIN, depending on whether or not the LKED step is the first step in the procedure.

` DD statements for all necessary utility data sets, e.g., SYSUT1 and SYSUT2, are included for all steps except GO steps. Users must define their own work data sets. In particular, FORTRAN programmers who use units other than 5, 6, and 7 must supply DD statements to define their data sets.

` A DD statement for object module output is included in each compilation or assembly step except for Pascal. The ddname is SYSGO for RPG, and SYSLIN for all other compilers. The DSNAME is &&SYSLIN. The disposition for the object module is DISP=(MOD,PASS).

` ASM, PL1, and COB steps include a SYSLIB DD statement for the UTCC macro library. The library is UTCC.MACLIB in concatenation with SYS1.MACLIB.

` Linkage editor and loader steps include a SYSLIB DD statement for the UTCC automatic call library when used in a procedure for a particular language. The following list contains the standard UTCC automatic call libraries, which are concatenated in the order indicated.

ALGOL                SYS1.ALGLIB
Assembler            UTCC.ASMLIB, UTCC.COMLIB
IBM C                SYS1.IBMC.SEDCBASE, SYS1.COMLIB.SIBMBASE,
                       SYS1.FORTVS.VSF2FORT, UTCC.ESSL.&VERSION.LB
VS COBOL II          SYS1.COB2LIB, UTCC.COMLIB

FORTRAN(VS) SYS1.FORTVS.VSF2FORT, UTCC.VFORTLIB, UTCC.ESSL.&VERSION.LB, UTCC.IMSL.VECTORLB, UTCC.NAG.&VERSION.LB, UTCC.FORTLIB, UTCC.COMLIB VS Pascal SYS1.VSPASCAL.VSPV1R2.SAMPDBG2, SYS1.VSPASCAL.VSPV1R2.SAMPRUN3, SYS1.VSPASCAL.VSPV1R2.SAMPRUN1, SYS1.VSPASCAL.VSPV1R2.SAMPMSG1 PL/I SYS1.PL1LIB, UTCC.COMLIB PL/I Optimizer SYS1.PLIBASE, SYS1.COMLIB.SIBMBASE, UTCC.COMLIB RPG None

` The LG, CL, and CLG functions (see section 12.3) all include a SYSLMOD DD statement. The DSNAME is &&GOSET. The member name is the symbolic parameter GOPGM, with a default value of GO.

` In order to override DD statements in a procedure, it is necessary to do so in the order in which the DD statements appear in the procedure. The order may be determined from a listing of the procedure.

Extensions to the language procedures

In addition to the procedures specific to each compiler, there are a few procedures which may be used with any language. These procedures involve only the linkage editor or the loader. No SYSLIB DD statement is included. The following procedures are available:

LKED link edit LKEDG link and execute LOADG load and execute LOADGO load and execute (same as LOADG) GO load and execute


Other procedures in UTCC.MVS.PROCLIB

Cataloged procedures are available for use with commonly used software packages. The use of these procedures is documented throughout the IBM User's Guide in connection with the description of the corresponding programs. These procedures perform a wide variety of functions; therefore it is difficult to state general rules which may be applied to all of them. The statements listed below, however, are always applicable.

` Where possible, an adequate region size is specified by default. However, for the STAT procedure, the user must specify an appropriate region size by using the REGION parameter on the EXEC statement. Any other procedures in which the default region size is not satisfactory may be overridden with the GOREG parameter.

` DD statements for all standard data sets, such as SYSPRINT and any utility data sets, are included in the procedures. The user must supply the SYSIN statement and any DD statements for tape or disk input/output.


[ Top of Page | Previous Page | Next Page | Table of Contents ]