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
 

 

Help with creation of a number of GDG bases

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
surya4ug

New User


Joined: 08 Jul 2008
Posts: 62
Location: chennai

PostPosted: Thu Feb 18, 2010 9:19 pm    Post subject: Help with creation of a number of GDG bases
Reply with quote

From Creation of a number of GDG bases
Ganesh.Deokar wrote:
Onupz,

It's simple. You can create thousands of GDGs in a single IDCAMS step. Last week I got same requirement for my project and I created 1500 GDGs using a simple REXX program.

1) Create a list of GDG bases in a PS file or If you want to do more automation then write a small REXX program to read your JCL and capture GDG bases names (The dsname will be Between "DSN=" and "(+1)" in your JCL). Store all these GDG base names in a PS file.
2) Write another REXX program or continue in the same REXX above to read above file and create the JCL for creation of GDGs

Code:
/*REXX*/
address tso                                                 
"alloc da('your.jcl.library') fi(jcl) shr reuse"             
"execio * diskr jcl (stem write. finis"                     
write.1 ='//'jclname' JOB PRTY=03,'                         
write.2 ='//            REGION=8M,'                         
write.3 ='//            MSGCLASS=M,'                         
write.4 ='//            MSGLEVEL=(1,1)'                     
write.5 ='//*'                                               
write.6 ='//STEP01    EXEC PGM=IDCAMS'     
write.7 ='//SYSPRINT DD SYSOUT=*'       
write.8 ='//SYSOUT DD SYSOUT=*'                         
write.9 ='//SYSIN DD *'                                 
w = 9                                                       
"alloc da('your.gdg.list') fi(input) shr reuse"   
"execio * diskr input (stem read. finis"                     
do i = 1 to read.0 by 1                                     
   dsname = word(read.i,1)                                   
   w = w + 1                                                         
   write.w = '  DEFINE GDG(NAME('dsname')  -'                                     
   w = w + 1                                                         
   write.w = '  LIMIT(15)  SCRATCH  NOEMPTY)'                     
end                                                                 
"execio * diskw jcl (stem write. finis"     

Ganesh,

Please let me know how the contents of the JCL library and the PS you referred to look like. I thought we just need to mention the GDG bases in a flat file and that should be fine. I could be wrong.

PLease help me understand.
Back to top
View user's profile Send private message

Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Mon Mar 29, 2010 10:25 am    Post subject: Reply to: Help with creation of a number of GDG bases
Reply with quote

surya,

The JCL library(your.jcl.library) can be a blank PS or a blank PDS member with attributes FB 80. The PS (your.gdg.list) should have the list of GDG bases.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Mar 29, 2010 1:14 pm    Post subject:
Reply with quote

Why bother creating the JCL anyway, why not just execute it within the REXX
Back to top
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Mon Mar 29, 2010 2:00 pm    Post subject: Reply to: Help with creation of a number of GDG bases
Reply with quote

The requirement was to create 1500+ GDG bases. Thought submitting thru batch will be efficient. It can be executed thru REXX also as yu've suggested.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Mar 29, 2010 7:36 pm    Post subject: Re: Reply to: Help with creation of a number of GDG bases
Reply with quote

Ranjithkumar wrote:
The requirement was to create 1500+ GDG bases. Thought submitting thru batch will be efficient. It can be executed thru REXX also as yu've suggested.
Pardon my ignorance, but from this thread per se, what do you mean? REXX will also call IDCAMS and the example shown in first post of this thread is, anyways, generating a JCL (batch execution) ... icon_rolleyes.gif
Back to top
View user's profile Send private message
Ranjithkumar

New User


Joined: 10 Sep 2008
Posts: 94
Location: India

PostPosted: Tue Mar 30, 2010 9:13 am    Post subject: Reply to: Help with creation of a number of GDG bases
Reply with quote

@Anuj

Instead of creating a JCL to execute the IDCAMS, we can directly execute IDCAMS thru Rexx.
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 Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm
No new posts How to detect file creation event? vasanthz All Other Mainframe Topics 5 Fri May 20, 2016 1:33 am


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