View previous topic :: View next topic
|
Author |
Message |
surya4ug
New User
Joined: 08 Jul 2008 Posts: 62 Location: chennai
|
|
|
|
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 |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why bother creating the JCL anyway, why not just execute it within the REXX |
|
Back to top |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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) ... |
|
Back to top |
|
|
Ranjithkumar
New User
Joined: 10 Sep 2008 Posts: 93 Location: India
|
|
|
|
@Anuj
Instead of creating a JCL to execute the IDCAMS, we can directly execute IDCAMS thru Rexx. |
|
Back to top |
|
|
|