Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I hv ten records in ps file and i hv say some 15 records in
vsam file .i hv empno and age in ps file n
empno,empname,dept n desig in vsam file. i hv 2 read the ps
file n check wid matching empno in vsam file and then
insert all fields from ps and vsam into db2 table....plz
help in writin the procedure division

Answer Posted / vaneesh

File FD for PS
01 PS-FILE
05 PS-EMP-NO
05 PS-EMP-AGE
File FD for VSAM
01 VSAM-FILE
05 VSAM-EMP-NO-------->RECORD KEY
05 VSAM-EMP-NAME
05 VSAM-EMP-DEPT
PROCEDURE DIVISION

PERFORM UNTILL END OF PS FILE
READ PS FILE

READ VSAM-FILE KEY IS PS-EMP-NO
IF VSAM-FILE-STAUTS = '00'

EXEC SQL
INSERT INTO TABLE EMPLOY WITH VALUE 'PS-EMP-NO', 'PS-EMP-
AGE', 'VSAM-EMP-NAME' 'VSAM-EMP-DEPT'
END-EXEX
END-PERFORM.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between external and global variables in COBOL?

1542


What is the difference between Global and External Variables?

1434


How many bytes S(8) comp field occupy and its maximum value?

2190


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

2491


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

1481


) what is the difference between AID and HANDLE AID?

2200


How do you get the data to code the BMS macro?

2016


Name some of the examples of COBOl 11?

3196


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

8025


What is the use of intialize verb?

1298


What rules are to be followed while using the corresponding options?

1125


What is a scope terminator give example?

1155


Explain how to differentiate call by context by comparing it to other calls?

1244


How are the next sentence and continue different from each other?

1338


What is static and dynamic call in cobol?

1115