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

Create around 4000 PS datasets using RExx


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

New User


Joined: 09 Aug 2007
Posts: 15
Location: mysore

PostPosted: Fri Oct 22, 2010 4:40 pm
Reply with quote

Hi,
Every month we would be having a testing requirement that requires us to create about 4000+ ps files. I wanted to automate it using a Rexx code and create the datasets. I have created the below rexx code that creates the datasets. But I am not able to create more than 253 datasets when i submit the rexx code from a jcl.
Do we have a restriction for the number of datasets that can be created from rexx code.

RExx Code :
Code:
/* REXX - TO CREATE DATASETS */
 DSNAME = 'XXXMF01.TESTFILE.PS'

DO I = 1 TO 4000
     DS1 = DSNAME || I
    SAY DS1
    ADDRESS TSO "ALLOC DA('"DS1"') LIKE('XXXMF01.BABU.PS3')"
END

EXIT
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Oct 22, 2010 4:49 pm
Reply with quote

You need to allocate the dataset with a given DD name, and then after it is created, FREE the DD name.

All within the same loop.

Why do you need to preallocate, why isn't this done within the jobs that run ?
Back to top
View user's profile Send private message
babuprashad
Warnings : 1

New User


Joined: 09 Aug 2007
Posts: 15
Location: mysore

PostPosted: Fri Oct 22, 2010 5:38 pm
Reply with quote

It worked......I am able to create the datasets......actually we were working on a tool that could look for all the JCL datasets and check if it is already present if not present create them.....this part of the tool had an issue while creating more than 4000 ps......now...it is working fine.... I changed it as below :

Code:
DO I = 1 TO 600
     DS1 = DSNAME || I
    SAY DS1
ADDRESS TSO "ALLOC DDNAME(DD1) DA('"DS1"') LIKE('TPGMF01.BABU.PS3')"
                "FREE DDNAME(DD1)"
 END
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Oct 22, 2010 10:56 pm
Reply with quote

And what is anticipated when the jobs that allocate these data sets with DISP=NEW are run?
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 Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top