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


Please Help Members By Posting Answers For Below Questions

HOw can I get the negative sign while deduct high value from low value

1779


How many sections are there in data division in COBOL?

674


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

701


how do you reference the variable block file formats from cobol programs

674


What kind of error is trapped by on size error option?

733






what is s000 u4087 error? please give the all error codes in cobol,jcl.

17015


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.

5049


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

679


Why would you use find and get rather than to obtain?

673


Differentiate between structured cobol programming and object-oriented cobol programming.

659


explain sorting techniques in cobol program?

682


What is the default value(s) for an initialize and what keyword allows for an override of the default?

686


What is the difference between perform … with test after and perform … with test before?

868


For rewrite, why is it mandatory that file needs to be opened?

616


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

2096