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

Help with creation of a number of GDG bases


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 93
Location: India

PostPosted: Mon Mar 29, 2010 10:25 am
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 29, 2010 1:14 pm
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: 93
Location: India

PostPosted: Mon Mar 29, 2010 2:00 pm
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

Superior Member


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

PostPosted: Mon Mar 29, 2010 7:36 pm
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: 93
Location: India

PostPosted: Tue Mar 30, 2010 9:13 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top