Can we call IDCAMS in a COBOL program?

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Shriram
Registered Member
Posts: 21
Joined: Fri Aug 16, 2013 3:13 pm

Can we call IDCAMS in a COBOL program?

Post by Shriram »

Hi,

How can we call IDCAMS in a COBOL program? And by calling it, can we create a cluster from a COBOL program?

Could someone please guide me in this regard.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1885
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Can we call IDCAMS in a COBOL program?

Post by Robert Sample »

Yes, you can call IDCAMS by allocating the appropriate DD names and using a COBOL CALL statement. And yes, you can allocate a VSAM cluster in the IDCAMS statements.

HOWEVER, you may yet be surprised since you typically will NOT be able to use that cluster in your COBOL program -- if that is what you are ultimately wanting to do.
Shriram
Registered Member
Posts: 21
Joined: Fri Aug 16, 2013 3:13 pm

Re: Can we call IDCAMS in a COBOL program?

Post by Shriram »

Thanks Robert.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”