CNS DOCWEB Home
CNS Home Page
CNS Publications Page
Search All CNS Docs

DOCWEB Logo Entire document
Available as PDF

How to Create a Partitioned Data Set


Table of Contents

Parameters
Notes on Allocating Directory Blocks

The CREATLIB JCL procedure produces empty, ready-to-use partitioned data sets (PDS). If you accept CREATLIB's default values, it will create a PDS formatted for exclusive use as a load module library. By adding parameters to the default EXEC statement, you can create partitioned data sets customized for other types of data.

Parameters

There are nine different parameters associated with CREATLIB. The record format, logical record length, and block size parameters specify how data in a PDS will be formatted, or "packaged." The cylinders/tracks, primary/secondary allocations, directory blocks, and volume parameters define space on direct access storage media. The unit parameter specifies a type of input/output device.

Values for these parameters (for uses other than load libraries) depend on the nature of your data, and how it can most efficiently be stored and accessed. Parameter values can be requirements of the program you are using. The list below shows the parameters whose values can be changed on the CREATLIB EXEC statement. In the left column are keywords for each parameter. The right hand column defines the keywords and lists the default values for each parameter.

RECFM

= Record format. Default is undefined-length (U).

LRECL

= Logical record length. Default is 0 (zero).

BLKSIZE

= Block size. Default is 15,476.

CYLTRK

= Unit of space to be allocated, cylinder (CYL) or track, (TRK). Default is TRK.

PRIM

= Primary allocation of cyclinder or tracks. Default unit is 5.

SEC

= Secondary (overflow) allocations of cylinder or tracks. Default is 1.

DIR

= Number of directory blocks. Default is 1.

VOL

= An online DASD volume. Default is null.

UNIT

= Type of input/output device. Default is SYSDA.

Notes on Allocating Directory Blocks

Directory entries for members of an object library require the least space, since the member's name and its relative location in the data set are all that must be stored. Directory entries for load modules created by the linkage editor require more space: The system must include additional information for use at execution, such as the size of the module and the entry point address.

The following guidelines can help you determine the number of directory blocks needed for a PDS. The figures are typical of data sets at CNS.

TYPE OF LIBRARYNUMBER OF ENTRIES THAT WILL FIT IN A DIRECTORY BLOCK
SOURCE6-16*
OBJECT16
LOAD MODULE6

* Directory entries for source and macro libraries will vary in size, depending on the method used to build them. Using ISPF statistics will increase the size of entries to maintain update information. Since you cannot get additional directory space once a PDS has been created, we suggest you allocate 10%-15% more directory blocks than you think you need.

If you need further help defining parameters, see CNS Document D0045 or System 370/390 Job Control Language. See chapter 5 in this document for procedures to follow when a PDS directory proves too small.

Job Control Language

Figure 1 below shows the JCL used to create a default load module library. Note that other than standard JOB statement information, all you need to supply is a data set name in the EXEC statement.

Figure 1. JCL for the CREATLIB Procedure

//jobname JOB (,,time,lines),'your name',CLASS=class 
/*ROUTE PRINT node.location
// EXEC CREATLIB,LIBRARY='data.set.name'

Examples. The JCL example in Figure 2 on the following page shows how to create a load module library using the CREATLIB defaults, and then store a program on it. Our explanation starts with the first EXEC statement: The PDS is given a data set name, UF.TEACHER.LIB.The next two lines of JCL instruct the computer to compile and link a Fortran program called BGCLASS then store the resulting executable program in UF.TEACHER.LIB. The last line is where the Fortran language instructions for BGCLASS would begin.

Figure 2. Compile and Link a Fortran Program into a Load Module Library

//LIB JOB (,,time,lines),'your name',CLASS=class 
/*ROUTE PRINT node.location 
// EXEC CREATLIB,LIBRARY='UF.TEACHER.LIB' 
// EXEC VSFCL,LIBRARY='UF.TEACHER.LIB',PROGRAM=BGCLASS 
//FORT.SYSIN DD * 
...FORTRAN program ....

The EXEC statement below creates a PDS formatted for 80-byte records. It can be used to store card-image data, object decks (compiled programs), or source images (in a programming language). When object decks are to be stored in a PDS, BLKSIZE must be either 400, 800 or 3200. These are multiples of blocking factors 5, 10, 40 and the 80-byte logical record length.

Note that the parameters shown below are separated by commas but no additional spaces, and are continued on a second line.

// EXEC CREATLIB,LIBRARY='UF.TEACHER.MYLIB',RECFM=FB, 
// LRECL=80,BLKSIZE=3200,VOL=volume,UNIT=SYSDA

A final CREATLIB example is the following EXEC statement, which creates a PDS with a primary storage space allocation of 10 cylinders, two secondary cylinders, and 2 directory blocks:

// EXEC CREATLIB,LIBRARY='UF.TEACHER.KOLIB',CYLTRK=CYL, 
// PRIM=10,SEC=2,DIR=2
CNS DOCWEB Home
CNS Home Page
CNS Publications Page
Search All CNS Docs