Can CFF in PX on DS 7.5.2 do redefines?
Posted: Fri Aug 10, 2007 4:10 pm
I have used DataStage for several years now, but this is actually my first foray into the Complex File Format stage - up until now, we have simply used sequential file stages and work arounds. I am trying to see if there is a more efficient way to handle multiple file formats in a single file.
So, with that said, I am doing a simple test. I have the following file layout with a header record and detail records (the CFD below is actually generated from the CFF stage):
I have heard rumors that the CFF stage can do redefines. In fact, I have defined this layout already. I would like the header record to go to one dataset and the detail records to go to another. How do I do this?
Again, I am on DataStage PX 7.5.2.
Brad.
So, with that said, I am doing a simple test. I have the following file layout with a header record and detail records (the CFD below is actually generated from the CFF stage):
Code: Select all
******************************************************************
* COBOL DECLARATION FOR TABLE COMPLEX-FLAT-FILE-36
******************************************************************
01 COMPLEX-FLAT-FILE-36.
02 MCRE-HEADER.
05 TD-RECORD-ID PIC X(3).
05 TD-APPL-CODE PIC X(2).
05 TD-BANK-NUMBER PIC X(6).
05 TD-FILLER1 PIC X(5).
05 TD-DATA-TYPE PIC X(8).
05 TD-FILLER2 PIC X(5).
05 TD-ENTRY-DATE PIC X(6).
05 TD-ACTION-CODE PIC X(1).
05 TD-EXTRACT-DATE PIC X(6).
05 TD-SOURCE PIC X(4).
05 TD-PACKET-ID PIC X(8).
05 TD-FILLER3 PIC X(18).
05 TD-CREATE-APPL PIC X(2).
05 TD-FILLER4 PIC X(4).
05 TD-FORMAT PIC X(1).
05 TD-FILLER5 PIC X(26).
02 MCRE-DATA
REDEFINES MCRE-HEADER.
05 MCRE-SITE-CODE PIC X(1).
05 MCRE-BANK-GROUP PIC X(3).
05 MCRE-CYCLE PIC X(1).
05 MCRE-CYCLE-DATE PIC X(8).
05 MCRE-ENDPOINT PIC X(8).
05 MCRE-STRING-NAME PIC X(24).
05 MCRE-CASH-LETTER-TIMESTAMP PIC X(8).
05 MCRE-ROUTING-TRANSIT PIC X(8).
05 MCRE-AMT-X PIC X(10).
05 MCRE-SEQ-FILL PIC X(2).
05 MCRE-BANK-NUMBER PIC X(6).
05 MCRE-SEQ12 PIC X(12).
05 MCRE-RECORD-SEQ PIC X(9).
05 MCRE-CRD-DBT-FLAG PIC X(1).
05 MCRE-ONUS-TRNST-FLAG PIC X(1).
05 MCRE-SORT-PATTERN PIC X(3).
******************************************************************
* THE NUMBER OF COLUMNS DESCRIBED BY THIS DECLARATION IS 34
******************************************************************
Again, I am on DataStage PX 7.5.2.
Brad.