Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Compress DATASET in Use.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Compress DATASET in Use.
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

Site Director


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

PostPosted: Mon Dec 29, 2008 11:06 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Compress DATASET in Use.
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: 1238
Location: Richfield, MN, USA

PostPosted: Tue Dec 30, 2008 12:00 am    Post subject:
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

Site Director


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

PostPosted: Tue Dec 30, 2008 12:00 am    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Dec 30, 2008 12:19 am    Post subject: Reply to: Compress DATASET in Use.
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    Post subject: Reply to: Compress DATASET in Use.
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

Site Director


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

PostPosted: Tue Dec 30, 2008 12:24 am    Post subject: Reply to: Compress DATASET in Use.
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

Site Director


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

PostPosted: Tue Dec 30, 2008 12:27 am    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Dec 30, 2008 12:28 am    Post subject: Reply to: Compress DATASET in Use.
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    Post subject: Reply to: Compress DATASET in Use.
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: 1238
Location: Richfield, MN, USA

PostPosted: Tue Dec 30, 2008 12:40 am    Post subject:
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: 7905
Location: Bellevue, IA

PostPosted: Tue Dec 30, 2008 12:58 am    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Tue Dec 30, 2008 1:18 am    Post subject:
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    Post subject: Reply to: Compress DATASET in Use.
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: 7905
Location: Bellevue, IA

PostPosted: Tue Dec 30, 2008 9:38 pm    Post subject:
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    Post subject: it actually worked
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: 258

PostPosted: Thu Mar 19, 2009 3:26 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Not able to compress a very large PDS Hervey Martinez JCL & VSAM 7 Fri Nov 04, 2016 5:57 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us