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

Create GDG base from Cobol program?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 55

PostPosted: Sun Jun 01, 2008 7:28 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jun 01, 2008 8:28 am
Reply with quote

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
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 55

PostPosted: Sun Jun 01, 2008 10:10 am
Reply with quote

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
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Sun Jun 01, 2008 7:24 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jun 01, 2008 8:05 pm
Reply with quote

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
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top