View previous topic :: View next topic
|
Author |
Message |
rmd3003
New User
Joined: 03 Jul 2006 Posts: 55
|
|
|
|
I'm not sure if it's possible.
I need to check from Cobol program if GDG base exists and if it's not I need to create it. I know that it's possible to call IDCAMS from Cobol, but can I create GDG base from Cobol using IDCAMS?
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I know that it's possible to call IDCAMS from Cobol, but can I create GDG base from Cobol using IDCAMS? |
As the gdg base should be created once and used for a long tme, what business reason is there to do this in a cobol program? Even if all of the generations are deleted, the gdg base would still exist and be ready for use.
I suggest you go ahead and create the gdg base and be done with it. |
|
Back to top |
|
|
rmd3003
New User
Joined: 03 Jul 2006 Posts: 55
|
|
|
|
Trust me, I wouldn't be asking if it was that simple. There is no JCL - it gets generated on the fly. And GDG base name chages depending on multiple conditions. Yes, I probably can preallocate about 5000 GDG bases or just code logic in Cobol program which creates JCL and checks if GDG bases exists or not. |
|
Back to top |
|
|
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
Are you sure that you need a COBOL program to allocate 5000 GDG Bases?
Quote: |
And GDG base name changes depending on multiple conditions |
Can we have the conditions please, which changes the GDG base names? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
There is no JCL - it gets generated on the fly. |
But if the gdg bases were already pre-defined, the generated part need only be the part of the dsn that might change from run-to-run.
You might also just call IDCAMS and "allocate" the gdg base every run. Other than the first run, it will fail, but if the error is not passed outside the calling program, it wouldn't matter.
As Gautam mentioned, we might offer better suggestions if we better understood the requirement. |
|
Back to top |
|
|
|