The first VSAM file V1 has 2 fields A and B . There is a
DB2 file which has fields E and f. We need the fields A,
B , E and F to another VSAM file called V2. Kindly mention
the logic in procedure division in cobol..
Answers were Sorted based on User's Feedback
Answer / anoop
One methode is we can first repro the VSAM file into
sequential file and then SORT it into another sequential
file to include only A and B fileds. Then repro it again
into the VSAM file V2.
In cobol open this file in I-O mode and read it sequentialy
and move A & B fileds to a working storage variable.
Read the field E & F from data base and A & B from the
working storage and populate into the V2 VSAM file.
There could be some changes in the logic as per the exact
requirement.
| Is This Answer Correct ? | 0 Yes | 0 No |
How Vsam was evolved? What was the equivalent file for ESDS,KSDS and RRDS prior to evolution? What were their disadvantages of those file which leads to evolution of ESDS,KSDS and RRDS files ?
explain how many ways you can load data in a vsam cluster?
If you wish to use the REWRITE command haw must the VSAM file be opened?
On which datasets You can have ALT INDEX?
Can we copy a sequential file to a VSAM file ? If yes, What will happen of the size of the sequential file is bigger than that of the VSAM file?
Tell about the ams used in vsam?
Differentiate between control interval (ci) and control area (ca)?
what do you mean by idcams? Explain its purpose?
In the COBOL SELECT statement for a KSDS what are the three possibilities for ACCESS?
difference between vsam and database tables
looking at the basic definition of VSAM file how to recognize whether it is a KSDS OR RRDS OR ESDS ?
How are different versions of GDG named ?