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
Write a program that uses move corresponding.
What is the difference between PIC 9.99 and 9v99 in COBOL?
What are the pertinent COBOL commands?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
What is the Purpose of Pointer in the string?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
When is inspect verb is used in cobol?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
Why occurs cannot be used in 01 level in COBOL?
what is the use of outrecord?
How to remove 2 duplicate records and copy only one using job control language?
A table has two indexes defined. Which one will be used by the SEARCH?
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.
I have a File that has duplicate records. I need only those records that occur more than thrice.?
How do you define a variable of comp-1 and comp-2?