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

Modifying the size of the data set using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Sun Feb 22, 2009 1:46 pm
Reply with quote

Hi

I am trying to write a code in REXX which will modify the primary and secondary size of the PS file. code is getting executed successfuly but data set size is not getting changed.could you please help me out with this .since i m executing huge spufi files about 20000 insert output fie always gets space abend and every time i have to delete the data set and create a new one with more size

Following is my code which i have written by referring to REXX user guide

PULL BASEDS
PULL NEWDS
IF SYSDSN(BASEDS) = 'OK' THEN
DO
X=LISTDSI(BASEDS)
IF X = 0 THEN
CALL ALLC
ELSE
SAY 'RETURN CODE IS' X
END
ELSE
SAY DSNAME 'NOT AVAILABLE'
EXIT

ALLC:
NEWPRIMARY = 5 * SYSPRIMARY
SAY SYSPRIMARY
NEWPRIMARY = 10
"ALLOC DA("BASEDS") MOD SPACE("NEWPRIMARY SYSSECONDS")"

IF RC = 0 THEN
SAY 'SUCESSFULL ALLOCATION'
ELSE
SAY RC 'ERROR ENCOUNTERED'
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sun Feb 22, 2009 2:04 pm
Reply with quote

Why not use a large allocation to start with and use the RLSE parameter to release unused space at step completion.

The only way that the secondary space can be altered is by using the different space allocation in the job step that writes to the dataset that pre exists.
Back to top
View user's profile Send private message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Sun Feb 22, 2009 2:17 pm
Reply with quote

Sir, Thanks for reply
but i wanted know is there any way I can handle it using rexx
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Sun Feb 22, 2009 2:28 pm
Reply with quote

Not unless you delete and redefine the dataset or use the space override in the same step
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top