Space problem in JCL

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
sandeep saini
Member
Posts: 2
Joined: Fri Sep 21, 2007 11:36 am

Space problem in JCL

Post by sandeep saini » Thu Oct 04, 2007 4:43 pm

Hi,

Actually my problem is that in my job the input dataset is having varying number of records.Sometimes it comes to 100,sometimes 10000,means its varying.But the problem is when I am specifying the space parameters it will abend as I am not sure about the number of records.
So,Is there any way to optimize this like depending upon the number of records it will allocate space(apart from RLSE parameter).

Thanks and Regards
Sandeep.

Veera
Moderator
Posts: 111
Joined: Wed Feb 22, 2006 2:59 pm

Post by Veera » Fri Oct 05, 2007 12:56 am

Hi Sandeep,

I dont think so there is a way by which the system calcualtes the space
by itself based on the no of recs in the I/P file.

Well, you have any issue with the RLSE parameter anyhow the memory
gets released correct...no matter how much you specify.

Otherwise you can go for Tapes...if you have an option ...

Lets see if some one responds and if there is a dynamic way of calculating the space as you have asked for...it would be good to know.

Thanks,
Veera.

User avatar
DavidatK
Active Member
Posts: 65
Joined: Tue Mar 27, 2007 8:41 am
Location: Troy, MI USA

Post by DavidatK » Sat Oct 06, 2007 2:17 am

Sandeep,

Will you know the number of records prior to allocation? There may be some overrides if you do know.

But allocating sufficient, but not to much space if the function of the 'RLSE' keyword. Allocate for the max and then release unused space upon closing.

You can also try to allocate space using extents.

SPACE=(recsz,(prim alloc, second alloc),RLSE),AVGREC=U

Where
LRECL=200
recsz = your LRECL
prim alloc = average number of records
second alloc = 1/14 (max number of records ? average number of records)

lets say the average number of records you will be allocating for is 2500 and the max number of records that you will allocate is 100,000.

Then the allocation might look like

SPACE=(200,(2500,6965),RLSE),AVGREC=U,
RECFM=FB,LRECL=200

Where prim alloc is for space for 2500 records of LRECL=200
And the secondary alloc will be for up to 14 allocations of space for 6965 records for LRECL=200

2500 + (6965 * 14) = 100,010 records

sandeep saini
Member
Posts: 2
Joined: Fri Sep 21, 2007 11:36 am

Post by sandeep saini » Tue Oct 09, 2007 10:26 am

Thanks

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others