JCL SPACE ALLOCATION ISSUES

From: STR (setar_at_mindspring.com)
Date: 02/27/04


Date: 27 Feb 2004 07:13:40 -0800

I am running into what appears to be space allocation issues when I
attempt the following:

I am trying to read in a massive file, and break it up into 3 or 4
separate files based on
the record type for the purposes of later examination. I am not a JCL
guy, but I researched
the DD statement parameters to gain an understanding of a way to best
achieve this.

I am using mainframe SAS to split the files. I know that this is
coded correctly. The
errors I receive appear to relate to the JCL, specifically space
allocation issues. The
maximum record length of the input file is approximately 242. I am
projecting approximately
55 million records that qualify for one of the record types.

I should note that from the input file I only require maybe 10 fields
or so. Currently, I
am placing that target data in the same positions as reflected in the
input file to preserve
the original record layout. However, I am thinking this is probably
wasteful of space since
a number of the fields I am not concerned with and contain spaces.
So, I believe this is one
area where I can cut back on required space allocation. So is this
done by simply recoding
the LECL parameter to the new record length required for my target
file based upon only the
fields I am interested in retaining? And then I guess my SAS put
statement would need to be
revised to specify positions that scrunch the data closer together
rather than placing the data
in the same field position as the original file?

Resolution to that might possibly resolve my problem. I am just not
sure if that is the way
to go.

As mentioned above, the first dataset I would like to create will
contain approximately
55 million records. Here are some of the DD statements that I have
used so far which have
brought errors:

//OUTPUT1 DD DSN=DATA.SET.NAME,DISP=(,CATLG,DELETE),
              DCB=(LRECL=242,RECFM-FB),
              UNIT=DISK,SPACE=(CYL,(300,30),RLSE)

The error that resulted:

ERROR: OUT OF SPACE WRITING TO THE FILE OUTPUT1.
FATAL: UNRECOVERABLE I/O DETECTED IN THE EXECUTION OF THE DATA STEP
PROGRAM. ABORTED DURING
        EXECUTION PHASE.

Only a portion of the records were saved out.

I also tried the AVGREC approach:

//OUTPUT1 DD DSN=DATA.SET.NAME,DISP=(,CATLG,DELETE),
              DCB=(LRECL=242,RECFM-FB),
              UNIT=SYSDA,
              SPACE=(242,(55,2),RLSE),
              AVGREC=M

The error that resulted:

ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR
ALLOCATION FAILED FOR DATA SET DATA.SET.NAME, PRIMARY SPACE EXCEEDS
65535 TRACKS

Step one was not executed.

I'm just leary about being too over-zealous in allocating space. I am
reluctant in just
going with trial and error since I am not a mainframe guy and am not
quite sure if I could
cause some performance issues or if the space I am asking for will
send the hounds after me.

Also, I'm not sure to the extent that the working files matter, but I
have allocated about 5
working files each defined as follows:

//WORK DD UNIT=SYSDA,SPACE=(CYL,(500,500),RLSE)
//WORK1 DD "..................................."

Any advice/direction would be greatly appreciated.