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
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 |
How to open and see copy book ?
I have a sequential file of 100 records. How do I load the records into a two dimensional array ?
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
how do you reference the variable block file formats from cobol programs
What is rmode(24)
How to use the same COBOL program in Batch and CICS on lines? explain with an example
I have a file it contain 10 records.i got abend at 8th record because of soc7.how do you know that perticular record got abend?
In a program, there are 2 sections defined say SECTION-A and SECTION-B. There is a paragraph say CALC-INT in both the sections. If this para has to be called directly for SECTION-A, then PERFORM CALC-INT will not work as it is present in both sections. How the PERFORM statement has to be coded here?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
How do you define a variable of comp-1 and comp-2?
what happens if we dont close cursor in db2-cobol pgm?
How many sections are there in data division?.