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 / sivakumar sekharannair
Have an output file with 5 fields
Output file layout
field1field2filed3field4field5
MOVE FIELD1 OF FILE1 TO FIELD1 OF OUTPUT
MOVE FIELD2 OF FILE1 TO FIELD2 OF OUTPUT
MOVE FIELD3 OF FILE1 TO FIELD3 OF OUTPUT
MOVE FIELD1 OF FILE1 TO FIELD4 OF OUTPUT
MOVE FIELD2 OF FILE1 TO FIELD5 OF OUTPUT
WRITE OUPUT FILE
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How many sections are there in data division in COBOL?
what is the difference between COBOL2 AND COBOL390?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is the difference between PIC 9.99 and PIC9v99?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
What the difference is between continue and next sentence?
What is the difference between Global and External Variables?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
Define cobol?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What is rmode(24)
example for sub strings ? and refernce modifications whit output pls
How many bytes S(8) comp field occupy and its maximum value?
Have you used comp and comp-3 in your project? And how?
How do you reference the fixed block file formats from cobol programs