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 can I get the negative sign while deduct high value from low value
How many sections are there in data division in COBOL?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
how do you reference the variable block file formats from cobol programs
What kind of error is trapped by on size error option?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
Why would you use find and get rather than to obtain?
Differentiate between structured cobol programming and object-oriented cobol programming.
explain sorting techniques in cobol program?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What is the difference between perform … with test after and perform … with test before?
For rewrite, why is it mandatory that file needs to be opened?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc