Data Integration

 View Only
  • 1.  Output ASCII Complex Flat File Differing formats in one job?

    Posted 17 days ago

    Essentially, I need to output an ASCII complex flat file, a few of them actually. These files contain 'record files' of different types that have different column definitions. I can't seem to find a way for the complex flat file stage to accept more than one input, nor merge unlike data into a single link. There is a base set of fields per 'file' type that are the same, RECORD_TYPE being one of them, which should be whats used to separate 'file' data. For example I have the following ASCII definition that includes a Header Record File and Alt Officer Interface Record:

    ASCII File Field Definition
    Currently I can do this with two parallel jobs by creating/replacing the file with the header record definition, then appending to the file for the alt-off-int definition. Using a sequencer to run them in the correct order. This seems contrary to the point of the Complex Flat File stage to me, differing column definitions in a COBOL/ASCII file is pretty common isn't it?
    We've only done COBOL ingest using the Complex Flat File stage so far and those are definitely differening fields depending on certain record values.
    I appreciate any insights!


    ------------------------------
    Jackson Eyton
    ------------------------------


  • 2.  RE: Output ASCII Complex Flat File Differing formats in one job?

    IBM Champion
    Posted 14 days ago

    Hi Jackson,

    I have yet not used the CFF Stage for more than one Record, but if you go to the Stage/Records tab, then in the bottom left, there is a "Single record" checkbox, if you uncheck this, then you can add a an additional Record. I hope this helps.



    ------------------------------
    Ralf Martin
    Principal Consultant
    infologistix GmbH
    Bregenz
    ------------------------------



  • 3.  RE: Output ASCII Complex Flat File Differing formats in one job?

    Posted 14 days ago

    It was my understanding that the complex flat file stage only handled input files.  When we need to write a file with multiple record types, we use the column export stage to consolidate the fields of each record into a single "record" field.  We have a separate flow for each record type, each with column export stage creating a "record".  Then funnel the flows together and write the file into a sequential file stage.

    My two cents.



    ------------------------------
    Jesse Hensarling
    ------------------------------



  • 4.  RE: Output ASCII Complex Flat File Differing formats in one job?

    IBM Champion
    Posted 13 days ago

    I have not spoted that Jackson used the stage to output data, I have always used the CFF stage to read (mostly EBCDIC) files. I agree with Jesse, that it is likely the best way to split the data, if needed use the Column Export stage (or do this in the transformer) to get the desired format in a row, and then use a Sequence Funnel to patch the rows (which all have one column of Sqltype Varchar unbounded) together. I used this in the recent years to get an outputfile where the header line had column names which characters that are not allowed in DataStage (e.g. "-").



    ------------------------------
    Ralf Martin
    Principal Consultant
    infologistix GmbH
    Bregenz
    ------------------------------