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 / navatha
declare field1,field2(file3rec1) in 1 group then
field1,field2,feild3 in another group(file3rec2) then
declare it as whole record then using reference
modification u can do as
move filerec1 to file3rec1(1:10)
move filerec2 to file3rec2(1:10)
write file3
i think this will get ur answer............
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how to access the file from prodution from changeman tool and to submit a file to production
Explain how you can characterize tables in cobol?
Define cobol?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
Discuss about changing dataset name in proc.
i want a program using by if, evaluate , string, unstring, perform, occurs?
Why occurs cannot be used in 01 level in COBOL?
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 ......
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
How do you reference the fixed block file formats from cobol programs
Write the code to count the sum of n natural numbers.
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How many bytes S(8) comp field occupy and its maximum value?
what is the use of outrecord?