IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Facing Space issue for a PS file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Wed Mar 14, 2012 12:20 pm
Reply with quote

Hi All,

I am facing space issue in one of my job.
The file in question has been defined with SPACE=(CYL,(100,100),RLSE). When I checked the file after abend, the total number of cylinder used were 16 & total extent used were 16. Since all the extent were used up so we received SB37-04 abend. How can I resolve this.Any help will be appreciated.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Mar 14, 2012 1:12 pm
Reply with quote

With the information provided,
Captain obvious says "
1. try increasing primary & secondary space
2. try allocating in multiple volumes.
"
If you have some idea of how big the output dataset is, then u can make decisions based on that.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Mar 14, 2012 1:25 pm
Reply with quote

It seems the first allocation is going to a volume with the largest contiguous space being one cylinder. Your "storage people" would be the people to talk to about that. If you allocate on a volume which has some free space, then you'll do better. What you are allowed to do for that is down to your site policy. We don't know, other than the general (or captain) information already provided.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Mar 14, 2012 1:40 pm
Reply with quote

As Bill said, you can checkout volume statistics quickly using products like ISMF or QWIKREF.

Or Use the free TSO TASID -> option 8 -> snapshot -> DASD Snapshot
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Mar 14, 2012 1:41 pm
Reply with quote

the description of a SB37 rc 04 abend is ...

Quote:
04
During end-of-volume processing, one of the following occurred:
For an output data set, all space was used on the current volume and no more volumes were specified.
The system had to demount a volume in order to mount the next volume of the data set. It was unable to demount the volume for one of the following reasons:
The volume was permanently resident
The volume was reserved
Another job had data sets allocated on the volume
There were open data sets on the volume for the failing task.
For an output data set on a direct access device, the system might have needed to demount the volume for one of the following reasons:

No more space was available on the volume.
The data set already had 16 extents, but required more space.
| The data set has reached the 65535 tracks per volume limit.
More space was required, but the volume table of contents (VTOC) was full. If additional space were allocated, another data set control block (DSCB) might have been needed, but could not have been written.
For an output data set on magnetic tape, a volume needed to be demounted because the reflective spot was encountered and more records were to be written.

For an input data set on more than one volume, one of the volumes needed to be demounted so that the next one could be mounted, but the system was unable to demount the volume.



something smells fishy around here
How in heaven were You able to allocate cyl,(100,100)
and then get an abend saying ( You ) that 16 cylinders used, on 16 extents

Your wording implies that 16 1 cylinder extents were allocated ...

if only 16 1 cylinder extents were free at the time the allocation was requested
You should have got a jcl error with the message

IEF257I <jobname> <stepname> >ddname> - SPACE REQUESTED NOT AVAILABLE


just reconsider posting the proper information
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Wed Mar 14, 2012 2:17 pm
Reply with quote

Hi All,

Thanks for help.

I expect not more than 50 cylinders to be used for the file.So providing 100,100 is more than sufficient.Moreover, i did try increasing the cylinder count.We gave 800,800 still it abended.

I taslked to my storage group and it seems their only solution is increating the space parameter, which I think is not correct.

Quote:
something smells fishy around here
How in heaven were You able to allocate cyl,(100,100)
and then get an abend saying ( You ) that 16 cylinders used, on 16 extents


I have same question, if I allocated 100,100 and it got allocated(i didnt receive any JCL error) then why during program execution I am getting space issue after 16 cylinders only.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 14, 2012 2:53 pm
Reply with quote

anytime a post only has selected parts of a dd statement
space in this case,
without
the rest of the dd statement
and explanation/description of the utility/program involved

we are left with filtered information,
by someone who can not solve the problem themselves
and has decided to provide us with the info 'necessary' to solved the problem.

this is why such stupid topics go on for so long,
because a lack of info has been provided.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Mar 14, 2012 3:09 pm
Reply with quote

Show us the JCL step, after censoring the sensitive information like DS names & such stuff.
You might make a light bulb glow in anyone of our heads.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Mar 14, 2012 3:20 pm
Reply with quote

I'm wondering if you have some "storage class" which is only allowing you extents of one cylinder. It would be unlucky to find a volume which had one cylinder as the maximum available extent, and even then would run across the problem enrico and yourself are pointing to - the primary allocation should fail.

However, if it were this, then your storage people would know... on the other hand, it should fail, so there must be something...

As has been said, it is shooting-in-the-dark without the JCL. Even with the JCL, it could be shooting-in-the-dim if you are coming-up against something local.

From what you have said, it is not even going multi-volume. For 50 cylinders, even (1,1) should get you there with a margin of error with four volumes max. 'Nuff shooting. Likely to get a ricochet like this...
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Wed Mar 14, 2012 5:54 pm
Reply with quote

I would suggest that for whatever reason the dataset is being closed multiple times and this the RLSE parameter is freeing up unused space at that point. So after one (or maybe a few) records have been written, the unused space is freed and the dataset is one cylinder. Then a few more records are written, it goes to a secondary extent, the unused space is freed and the dataset is two cylinders. And so on until you've done that 16 times.

Presumably either there are multiple steps accessing the dataset with DISP=MOD or maybe the program that is being executed is opening and closing the file multiple times.

We found a program once that was closing and opening a file 50,000 times in one step!
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Wed Mar 14, 2012 8:20 pm
Reply with quote

@David Robinson - Thanks for your reply. Yes in my program I am opening and closing the file multiple times.

Now my question is - When the file is closed first time programmitically will it release all the unused space. When the file is opened in extend mode next time, will mainframe look for another extent. If so, the program should have closed after writing 16 records itself.

But we are writing more records.

Below is the DD statement -

//DATAFL DD DSN=TEST.ABC.DEF.DTASHT(+1),
// DISP=(,CATLG,CATLG),UNIT=DISK,
// SPACE=(CYL,(100,100),RLSE),
// DCB=(SYS3.DSCB,RECFM=FB,LRECL=308)

The program is IMS program running in BMP mode.The file is PS and opened in EXTEND mode.Also the program opening the file is a sub program called multiple times.

Please let me know in case you need additional information.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Mar 14, 2012 9:06 pm
Reply with quote

@ saurabh39 !

Only for my understandig. When you make an Open-Extend you want to add
some records to an existing dataset.

So when the dataset exists, why do you code
// DISP=(,CATLG,CATLG),UNIT=DISK,

Means:

// DISP=(NEW,CATLG,CATLG),UNIT=DISK,
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Mar 14, 2012 9:08 pm
Reply with quote

Here's to you Mr Robinson. Good spot.

Tushar, no, it won't just be 16 records. It will be as many records that fit in 16 extents of one unit of the space allocation (here, Cylinders).

If you don't code the RLSE and specify something reasonable (like 50,5) then you get around the problem.

Why are you opening and closing the file multiple times?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 14, 2012 9:20 pm
Reply with quote

Bill Woodger wrote:

...
Why are you opening and closing the file multiple times?


maybe because he does not know any better way?

that's why he is posting here.
he does not want to reveal his incompetence to his co-workers
(or they already know and won't talk/help him because of it).
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Wed Mar 14, 2012 11:48 pm
Reply with quote

@All - The requirement was to create a separate excel files for each credit card holder. Each excel file will have transaction details and other information.For this it was decided that mainframe will create a master datafile for all credit card holder.

There was an existing program which was extracting list of all credit card holder. Since the informtion to be printed needed some different data, so a new sub program was created to open the file and read the file and extract the data and put into file. Since it had data for multiple credit card holder so the sub program was called multiple times a day.

But for each day a new GDG version was created so the DISP was ,CATLG.

One thing i dont understand is - Whenever a Close is encountered the unused space is freed up.And whenever a open is encountered extent is allocated.If extent is allocated everytime a open is performed then, my program should have abended after 16th call to subprogram, as in each call one extent will be allocated.But the program is able to call the sub program 81 times, how?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 15, 2012 12:22 am
Reply with quote

Quote:
And whenever a open is encountered extent is allocated
This is not a true statement. When the data set is opened for output / extend processing, AND IF THE AMOUNT OF OUTPUT DATA EXCEEDS THE CURRENT ALLOCATION for the file, then -- and only then -- will another extent be requested. Merely opening the data set will NOT automatically allocate another extent.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Mar 15, 2012 12:55 am
Reply with quote

I don't understand your explanation, so I don't know, still, if you need to do multiple opens.

I've never done what you're doing, so there is a bit of guesswork and I'm not sure how far it is worth researching.

Dataset initially NEW,CATLG,CATLG. By the time of the first open, the primary space will have been allocated. You write some data to the dataset. Close it. The RLSE kicks in, taking the space down to one cylinder. That cylinder is not necessarily full. You OPEN EXTEND. There is more space available (I've no idea if it is going to use a partial track, but at least the first full unused track will be available) until the cylinder is full. Goes to secondary allocation. Writes a bit more. Closes the file. RLSE kicks in again and the second extent is one cylinder. It may take several calls to be able to fill a cylinder with data. Depends how much is being written. Each time a cylinder fills, you go through the same thing until 16 extents. Then it goes to another vol... actually, it didn't. Well, could have done.

If you want to check it, the data processed in the first 81 calls will be around about that to fill 16 cylinders. It should be less, unless the system re-utilises the part-tracks left lying around by the previous close.
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Fri Mar 16, 2012 11:07 pm
Reply with quote

Thanks Bill.The issue is resolved.Your post was very helpful. Thanks a lot.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 16, 2012 11:18 pm
Reply with quote

Thanks for letting us know. It is also good if you can post the resolution, as it may well help others facing similar problems and finding this topic...
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Sat Mar 17, 2012 12:48 am
Reply with quote

Bill,

As a temporary fix we have remove "RLSE" parameter from Space keyword. And at the end of job we have used ADRDSSU to release the unused space.

As for permamnent fix we are changing our logic to open & close file once. That fix is also working, but as of now that is being tested.

Regards,
Tushar
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Mar 17, 2012 1:07 am
Reply with quote

Thanks again for the feedback. Nice to see one thread come to a conclusion with some thoroughness thrown in. Hopefully the next one along will find this before they do their coding...
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Wed Mar 21, 2012 8:40 pm
Reply with quote

Seems like a rediculously inefficient process from what I can understand, as a non-programmer. Why don't you read the whole file in and create one output CSV file with all the records in it and then upload and post process that to generate the separate excels on a PC somewhere. Even then it seems strange to be generating <hundreds?> of separate excel spreadsheets. Why can't you add to an existing spreadsheet for each existing customer?

The result of the space release and use of extents is perfectly reasonable given the nonsense way it is being used. You're allocating in cylinders, so initial allocation is 100cyls, but on file close is released to the nearest cylinder. Next output to the file will then add to that existing cylinder and so on until it fills up, after which another 100cyls secondary is allocated and used the same way until full. Repeat that until you have taken all possible 16 extents on the volume, then waste time on this forum.

Just remove the RLSE and let DFHSM or whatever you use to release the space later.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top