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

Compress DATASET in Use.


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

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Mon Dec 29, 2008 11:04 pm
Reply with quote

Hi,

I have a general Dataset V34.GEN.CLIST which gets concatenated to SYSPROC of every TSO user when s/he logs in. Currently this dataset is running out of space (Giving E37 whenever I try to edit/add any member to it) and there are around 10 users who are logged on in the TSO so I am unable to compress the dataset (it says 'Dataset in Use').

Is there a way to get around this problem.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Dec 29, 2008 11:06 pm
Reply with quote

Hello,

Get the people to log off and compress/re-allocate larger or do this overnight when no one is using the pds.

You might also consider using a pdse to eliminate the compress need.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Mon Dec 29, 2008 11:12 pm
Reply with quote

hi d.sch.

thanks. Is there a way to forcefully delete the dataset ? i have copied all members of the dataset into another dataset. what i think i need to do now is delete the old one and rename the new to old. or am i thinking too loud? icon_sad.gif

Thanks.
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Mon Dec 29, 2008 11:49 pm
Reply with quote

Hi,

There is one way of compressing a dataset with 'DATASET in use'. Try compressing in batch job.

execute IEBGENER , copy same input dataset to o/p dataset and use DISP=SHR.

The above trick should work.

If you do not resolve space abend even after compressing, then u got to recrerate your dataset.

Thanks,
-Kapil.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Dec 30, 2008 12:00 am
Reply with quote

I don't think compressing a "data set in use" PDS will be successful in batch. I believe your batch job will wait until everyone is "out" of the PDS.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Dec 30, 2008 12:00 am
Reply with quote

Hello,

Quote:
Is there a way to forcefully delete the dataset ?
I don't know how to do this while it is in use. . .
Quote:
or am i thinking too loud?
Good idea, but delete/allocate needs to be "single-user".

Quote:
execute IEBGENER , copy same input dataset to o/p dataset and use DISP=SHR.

The above trick should work.
Have you done this to prove it works today? Please post the output of a job that successfully compressed a pds that was currently in use this approach.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Dec 30, 2008 12:19 am
Reply with quote

Does anyone else think that that PDS is probably a good candidate to convert to a PDS/E?
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Tue Dec 30, 2008 12:22 am
Reply with quote

Hi,

I use the below job to compress datasets.

//STEP10 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSUT3 DD SPACE=(TRK,(1,1)),UNIT=SYSDA
//SYSUT4 DD SPACE=(TRK,(1,1)),UNIT=SYSDA
//DDI1 DD DSN=XXX.YYY.ZZZ.LOADLIB,
// DISP=SHR
//DDO1 DD DSN=XXX.YYY.ZZZ..LOADLIB,
// DISP=SHR
//*
//SYSIN DD *
COPY OUTDD=DDO1,INDD=DDI1
/*

I couldn't test the above job right now, I can test it and let you know results by tomorrow.

Please let me know, if you find anything wrong with this job.
Thanks,
-Kapil.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Dec 30, 2008 12:24 am
Reply with quote

Quote:
Does anyone else think that that PDS is probably a good candidate to convert to a PDS/E?
Yup.

Quote:
You might also consider using a pdse to eliminate the compress need.
icon_smile.gif

d
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Dec 30, 2008 12:27 am
Reply with quote

Hello,

Quote:
I couldn't test the above job right now, I can test it and let you know results by tomorrow.
Yes, the job you posted should work as long as the dataset is not in use. . .

Your first post mentions IEBGENER and that it would work while the dataset was "in use". . .
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Dec 30, 2008 12:28 am
Reply with quote

I know that there are third-party data management tools that allow for a compress of a PDS that's in-use.
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Tue Dec 30, 2008 12:37 am
Reply with quote

I am sorry for that IEBGENER/IEBCOPY confusion. When I looked at my job, I found it to IEBCOPY.


As I understand the problem. the dataset is in SHR mode among 10 users. So, this job won't work with DISP=OLD( keep on waiting for dataset). It might work with DISP=SHR.

Still, I got to test it.
Thanks,
-Kapil.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Dec 30, 2008 12:40 am
Reply with quote

Quote:
Please let me know, if you find anything wrong with this job.
Did you back up your PDS before running this job?
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: Tue Dec 30, 2008 12:58 am
Reply with quote

If the dataset has DISP=SHR, a batch compress job will work -- I've done it before but it's never a good idea. The problem can be if the current users of the dataset don't refresh their data once the compress is done, they could be attempting to refer to members in locations that aren't in use anymore, or even in use by a different member. Compress changes the member locations in the PDS and that can impact address spaces that have already opened the dataset.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Dec 30, 2008 1:18 am
Reply with quote

When I need to allocate more space or more directory blocks for a PDS, which in effect does a compress, I always run the following steps:
    copy the old PDS (disp=old) to a new PDS
    delete the old
    rename the new to the old
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Tue Dec 30, 2008 11:09 am
Reply with quote

Hi Robert,

Quote:
If the dataset has DISP=SHR, a batch compress job will work -- I've done it before


Thanks for confirmation.

Quote:
but it's never a good idea. The problem can be if the current users of the dataset don't refresh their data once the compress is done, they could be attempting to refer to members in locations that aren't in use anymore, or even in use by a different member.


I never new about it. I had used the compress job many times and never faced any problem before, may be I was lucky. Thanks for the information and I will take care of this next time (refresh PDS before using it).

Thanks,
-Kapil.
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: Tue Dec 30, 2008 9:38 pm
Reply with quote

You were probably lucky nobody was using the file at the time. Basically a PDS has location pointers in the member directory that tell the system where each member starts. When a member is deleted, that space is not reused until a compress is done, at which time everything is moved to start at the end of the member directory without any gaps. You can see the potential for problems if you compress via DISP=SHR a PDS that has programs with open members -- they aren't going to get the new locations until they close & open.
Back to top
View user's profile Send private message
Simon Jia

New User


Joined: 21 Nov 2008
Posts: 5
Location: China

PostPosted: Thu Mar 19, 2009 8:24 am
Reply with quote

IEBCOPY with DISP=SHR actually worked!
I just tried using the technique to compress a PDS which is being used by over 10 users, and it worked!
But I still can't confirm whether it will work if someone is updating members.
I am pretty sure all the 10 users are just reading the members only.
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Thu Mar 19, 2009 3:26 pm
Reply with quote

Kapils job will work and should cause no problems if the dataset is only allocated to the SYSPROC of tso users
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top