Mainframe COBOL file
Posted: Wed Nov 17, 2004 7:09 am
I have a mainframe file that's been FTP'd to the DataStage server and this data has to go out into a normal Unix flat file. I haven't worked with an EBCDIC mainframe file in DataStage before, and it shows, so I could do with some help please.
I don't have access to the CFD but the file definition has been given me:
As far as I know there is only one level in the file. I used a Complex Flat File (CFF) stage and defined all the above as source columns, typing PIC X's as CHARACTER, PIC 9's as DISPLAY_NUMERIC and the PIC S9(11)V99 as DECIMAL. I couldn't find anything special to do about the packed COMP-3's except for ticking the Verify sign value in DECIMAL COMP-3 data box.
I've defined the data format as EBCDIC and the record style as Binary (CR/LF record style produces a View Data that looks much more chaotic). I've made the level for all columns 02.
When I do a View Data I can see some patterns which look like data but occurring in different fields, e.g. a pattern appears in BALANCE, then a few rows later in UNCL-FUNDS and then in OVERDRAFT-LIMIT so it looks like the rows are too long, but there's also tons of garbage in the view and I can't see all the data I'm supposed to be seeing.
As far as I know the FTP from the mainframe was done by the mainframe guys and as a binary FTP so the file should be OK.
Am I barking up the wrong tree here?
I don't have access to the CFD but the file definition has been given me:
Code: Select all
X72002-CO-ID PIC XX.
X72002-ACCOUNT-NO PIC S9(15) COMP-3.
X72002-PRDCT-CD PIC X(03).
X72002-SUB-PRODUCT PIC X(02).
X72002-CUST-NO PIC 9(15).
X72002-PRIMARY-OFFICER PIC X(05).
X72002-BALANCE PIC S9(15) COMP-3.
X72002-UNCL-FUNDS PIC S9(11)V99 COMP-3.
X72002-OVERDRAFT-LIMIT PIC S9(11)V99 COMP-3.
X72002-UNCLRD-FUNDS-IND PIC X.
X72002-GROUP-NO PIC 9(04).
X72002-GROUP-LIMIT PIC S9(11)V99 COMP-3.
I've defined the data format as EBCDIC and the record style as Binary (CR/LF record style produces a View Data that looks much more chaotic). I've made the level for all columns 02.
When I do a View Data I can see some patterns which look like data but occurring in different fields, e.g. a pattern appears in BALANCE, then a few rows later in UNCL-FUNDS and then in OVERDRAFT-LIMIT so it looks like the rows are too long, but there's also tons of garbage in the view and I can't see all the data I'm supposed to be seeing.
As far as I know the FTP from the mainframe was done by the mainframe guys and as a binary FTP so the file should be OK.
Am I barking up the wrong tree here?