Combining Fields From Files Without COBOL Pgm?

docdwarf_at_panix.com
Date: 07/14/04


Date: 14 Jul 2004 10:12:10 -0400


All right... platform's an IBM mainframe, MVS (or whatever it is called
nowadays) and standard utilities (e.g., SUPERC); utilities available are
DFSORT and MAXBAT (no FileAid).

I have two versions of a file (key = startpos 2, len 9, character
ascending (actually SNN in display-numeric format), both containing the
same number of records and the same keys. One is 240 characters long and
contains just about everything I need, the other is 480 characters long
and all I need from it is a single character (for each matched record)
from pos 349 to make a new file consisting of the what-I-need records with
this character added at pos 241.

Writing a COBOL program to do this is none-too-difficult... but adding
another program to the jobstream (with associated move-to-Prod overhead)
is something I'd rather avoid.

Given the situation and tools outlined - no SAS, no REXX or CLIST
(knowledge of those tools on this site is minimal and their use is
actively discouraged) - might anyone have an idea how to go about this or
am I doomed to putting into Prod a program which consists, at its heart,
of something akin to

READ FILE1 INTO WK-FILE1-REC.
READ FILE2 INTO WK-FILE2-REC.
IF WK-FILE1-SSN = WK-FILE2-SSN
    MOVE WK-FILE1-REC TO WK-FILE3-MAIN-CHUNK
    MOVE WK-FILE2-POS-349 TO WK-FILE3-POS-241
    WRITE FILE3-REC FROM WK-FILE3-REC
END-IF.

... ?

Thanks much.

DD



Relevant Pages