i have two file, each file having :
file1 is having 2 fields
field1 field2
file2 is having 3 fields
field1 field2 field3
my req is to make it one file like:
field1 field2 field1 field2 field3
if anyone know please send me syntax, i tried this with
DFSORT but could not succeed.
Answer Posted / visitor
FD FILE1
01 FILE1-REC
05 FIELD1 PIC X(3)
05 FIELD2 PIC X(3)
FD FILE2
01 FILE2-REC
05 FIELD1 PIC X(3)
05 FIELD2 PIC X(3)
05 FIELD3 PIC X(3)
FD FILE3
01 FILE3-REC
05 FELD1 PIC X(3)
05 FELD2 PIC X(3)
05 FELD1 PIC X(3)
05 FELD2 PIC X(3)
05 FELD3 PIC X(3)
PROCEDURE DIVISION
oPEN INPUT FILE1
FILE2
OUTPUT FILE3
READ FILE1
READ FILE2
WRITE FILE3-REC FROM FILE1-REC,FILE2-REC.
STOP RUN.
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Explain how to differentiate call by context by comparing it to other calls?
What is the difference between external and global variables in COBOL?
What is the compute verb? How is it used?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
how do you reference the rrds file formats from cobol programs
What is inspect in cobol ?
) How do u handle errors in BMS macro?
Write a cobol program making use of the redefine clause.
What is the difference between structured cobol programming and object alternativelyiented cobol?
how to refer the data field?
In which area will you utilize 88 level items in cobol?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
Explain what you understand by passing by value.
What are the pertinent COBOL
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks