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



The first VSAM file V1 has 2 fields A and B . There is a DB2 file which has fields E and f. We nee..

Answer / rookie

I suppose the question is a bit confusing....DB2 deals in
table's and has records...

Open VSAM file and read the records into WS variables,
Fetch DB2 records in host variables
Now write them to file V2.

Is This Answer Correct ?    2 Yes 0 No

The first VSAM file V1 has 2 fields A and B . There is a DB2 file which has fields E and f. We nee..

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

Post New Answer

More VSAM Interview Questions

What is RECOVERY and SPEED parameters in DEFINE CLUSTER command?

1 Answers  


What makes vrrds different from vsam?

0 Answers  


What is a ci split? What is a ca split?

0 Answers  


how can you load a vsam data set with records ?

0 Answers   IBM,


What is the main function of linear dataset?

0 Answers  






What are the optional parameters to the input dataset While loading the empty cluster with the data records?

1 Answers   IBM,


explain how do you define a gdg in vsam?

0 Answers   IBM,


How are different versions of GDG named ?

2 Answers   IBM,


What is the utility program closely associated with VSAM?

1 Answers  


what do you mean by the cobol record key clause in vsam?

0 Answers   IBM,


if not using the 'commit' when closing VSAM file,what will happend

5 Answers   CSC,


What is an alternate index and path ?

2 Answers   Infosys, TCS,


Categories