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

JCL to modify the volume


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

New User


Joined: 02 Dec 2008
Posts: 11
Location: Chennai

PostPosted: Wed Feb 11, 2009 6:55 pm
Reply with quote

Hi all,
I am planning to design a tool in JCL which will be used to increase or decrease the volume of a PDS or PS. The DSN and size attributes will be passed from a PROC or Control card.

For this:
1. Copy the dataset to a new DS (say A.A.A) using the attributes specified in the job card or Proc(from the user)
2.Rename the original DS to some X.Y.Z
3.Rename A.A.A to the original DS name.
4.Then delete the X.Y.Z

This strategy may sound weird but i feel this would be useful to ensure the data being safe. i.e we delete the original DS only after the successful completion of the other steps.
Or is there any other straight forward way with which i could do it with ease. Your valued suggestions will be highly appreciated.

Thanks,
Deepak
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: Wed Feb 11, 2009 6:59 pm
Reply with quote

IDCAMS ALTER command?
Back to top
View user's profile Send private message
deepak.tcs

New User


Joined: 02 Dec 2008
Posts: 11
Location: Chennai

PostPosted: Wed Feb 11, 2009 7:08 pm
Reply with quote

Hi Robert,
Is the IDCAMS ALTER command used to change the volumes(CYLS, its quantities)??
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: Wed Feb 11, 2009 7:46 pm
Reply with quote

No, you can add volumes with it ... why on earth would you want to change the primary and secondary space quantities on the file? Those presumably were picked by someone with some idea how big the file is and could get -- keeping in mind site restrictions -- so changing those could cause production abends.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Wed Feb 11, 2009 7:47 pm
Reply with quote

alter command can be used to add volumes , remove volumes and changing dataset name etc.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Feb 11, 2009 7:48 pm
Reply with quote

Ajay Baghel wrote:
alter command can be used to add volumes , remove volumes and changing dataset name etc.

But not for PDS / PDSE which are limited to one volume only.
Back to top
View user's profile Send private message
deepak.tcs

New User


Joined: 02 Dec 2008
Posts: 11
Location: Chennai

PostPosted: Thu Feb 12, 2009 10:01 am
Reply with quote

Hi Robert,
Thanks for your explanation.
Quote:
why on earth would you want to change the primary and secondary space quantities on the file? Those presumably were picked by someone with some idea how big the file is and could get -- keeping in mind site restrictions -- so changing those could cause production abends.

I need to alter the DS primary and secondary qunatities when SB37 abend occurs and also to reduce the DS size when some DS occupies more space and become redundant. And its in UAT region or even some UAT people will run the job to move it in PROD too.

The JCl needs to be very generic so that i can be used to modify PDS,PS and all. So will ALTER command suppor this?? Or i may need to carry on the process with all the steps i thought of??
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 Feb 12, 2009 10:20 am
Reply with quote

I think you're trying to reinvent the wheel (Google Stop X37 for example) but you know your site better than I do. IDCAMS ALTER will add volumes but it doesn't change primary or secondary extent size. There's ways to do that I'm sure but they involve digging deeper into the system than I typically get into.

Quote:
also to reduce the DS size when some DS occupies more space and become redundant
How do you know the space growth is not routine and expected? Year-to-date data in a file can cause it to grow in a predictable manner all year -- if allocated to its final size it may look to be way overallocated even though by the end of the year it is using all the space.
Back to top
View user's profile Send private message
deepak.tcs

New User


Joined: 02 Dec 2008
Posts: 11
Location: Chennai

PostPosted: Thu Feb 12, 2009 10:33 am
Reply with quote

The main purpose of this would be increasing the volume of DS(by modifying the quantities). In other words, a in-house utility to prevent SB37. Decreasing the volume would be the dependent on UAT people's choice and i am trying to give them just a choice to do that. icon_smile.gif
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Feb 12, 2009 11:18 am
Reply with quote

Quote:
a in-house utility to prevent SB37

You can look for BMC STOP X37 or CA-ALLOCATE.
Back to top
View user's profile Send private message
deepak.tcs

New User


Joined: 02 Dec 2008
Posts: 11
Location: Chennai

PostPosted: Thu Feb 12, 2009 12:16 pm
Reply with quote

Quote:
You can look for BMC STOP X37 or CA-ALLOCATE.

Thanks Gnanas!! However, i need to create my own utility and not to go for a third party product.
As i am a beginner in JCl, can anybody let me know if i am travelling in a right way?? If this is fine, can i have a rename JCL??
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Feb 12, 2009 12:28 pm
Reply with quote

OK, so why fight the fire when it can be prevented. ?

A long time ago I wrote a SAS program that analysed SMF records and reported on datasets that were going into multiple extents and this was passed to the OAs to amend the production JCL. In the year since that report was introduced there was only 1 Sx37 abend in production.

Unused space - the RLSE parameter in JCL has been around far longer than I have icon_lol.gif and also SMS will use free space release to reclaim redundant space in PS and VS datasets.

Another alternative to SMF would be DCOLLECT records.
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 Volume chain using DFSORT DFSORT/ICETOOL 17
No new posts volume mass delete RMM JCL & VSAM 2
No new posts Define default volume for DSN storage... JCL & VSAM 8
No new posts Copy a PDS to a new PDS - why do I ne... TSO/ISPF 8
No new posts How to modify file content using REXX CLIST & REXX 3
Search our Forums:

Back to Top