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
What are the different rules of SORT operation?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What are the cobol coding sheets?
) how do u code after getting data?
Why would you use find and get rather than to obtain?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
How do get the result of your program directly on your pc?
Can we redefine the field of x(200) to less than 200?
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...)
i want a program using by if, evaluate , string, unstring, perform, occurs?
How to remove 2 duplicate records and copy only one using job control language?
Write a program to enter and display the names of students in a class using the occurs clause.
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What is the compute verb? How is it used?
What are the rules of the move verb?