Processing Inbound Flat Files

You use the file layout definition to read and write from flat files.

To process inbound flat files:

  1. Determine the necessary format of the inbound data.

    If an industry standard exists, use it for your file definition.

    If no industry standard exists, create a file layout object that mirrors your message object.

  2. Identify the inbound process and its standard message.

  3. Analyze the vendor’s file structure and compare it to the standard message.

    Answer these questions:

    • Can you use an existing message, or do you need to create a new one?

    • Can the customer conform to an existing integration point, or do you need to create one (along with corresponding subscription PeopleCode)?

  4. Create the message definition.

  5. Create a file layout definition with the same structure as the message definition to support the vendor file format.

    The hierarchical structure of the data in the File Layout Definition must match that of the message definition. For example, suppose a message has three levels: level zero, containing record A, level one, containing records B and C, and level two, containing record D.

    All file layouts that are associated with this message must also have record A in level zero, record B and C in level one, and record D in level two.

    Note: The file layout does not need to contain the exact same fields as the message definition.

    For every record in your file layout, add a new file field, AUDIT_ACTN, as the first field in the record (except when the field already exists in the application table).

    You can associate more than one file layout with a single message. For example, vendor A may have a different number of fields than vendor B, so you may have two file layouts: one for A and one for B.

    Specify the file ID uniquely to include a row in a file, which is necessary in mapping the data to its proper record. Include start and end points when dealing with more than one record in a file layout.

    Note: Each record in the file layout has a file record ID attribute. Do not confuse this with the file layout ID. The file layout ID determines whether a new layout is encountered for multiple file layout processing.

    When you subscribe to the message and normal inbound data processing begins, you can invoke the SetDefault PeopleCode function to set the default values for fields that were not present in the input file.

  6. Update or create the inbound file rule pages.

  7. Create subscription PeopleCode in PeopleSoft Application Designer to process the message.

    Have the standard inbound process subscribe to and process the message normally. The standard message definition should have a subscription process that initiates the normal inbound processing for the object to which you hook your application logic to process the file data.

  8. Test the inbound flat file processing.

    Note: You can process multiple inbound flat files at one time. Specifying an inbound index file as part of the Flat File utility parameters causes the system to read all input files within the index file and to use the associated file layout object and message to convert the data. Similarly, specify a wildcard in the filename in the inbound file rule component, but make sure that all files that meet the wildcard criteria correspond to the file layout and message mapping that are defined.