Hi,
As in case of a COBOL DB2 program we include SQLCA and DCLGEN member etc. in program, which tells about the structure of the table to program however while using VSAM what we do? Can we generate the layout of the VSAM likewise?
COBOL VSAM and DB2.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: COBOL VSAM and DB2.
No. Unlike a data base, a VSAM data set consists of records just like a sequential file. Unless you have something giving the layout of the records (such as the program writing the data or application documentation), there is no way to look at a VSAM (or sequential) record and know the fields and their format.
- Anuj Dhawan
- Founder
- Posts: 2824
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: COBOL VSAM and DB2.
You should also note that having DCLGEN in a program is not a necessity. You could just use any other COBOL copybook to define the structure of your DB2 table and refer the variables from this copybook in program and it'll work. Using DCLGEN had been a choice rather than a mandate...
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- New Member
- Posts: 7
- Joined: Tue Apr 01, 2014 8:59 pm
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