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
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
How arrays can be defined in COBOL?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
) how do u code after getting data?
i need a small 3d program using inline and outline.
Name the sections present in data division.
What is the Purpose of Pointer in the string?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What is rmode(24)
What is difference between static and dynamic call in cobol?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What is comp-1 and comp-2?
Can you please let me know the centre name of INS certification in Kolkata.
What is the difference between structured cobol programming and object alternativelyiented cobol?