Define File Columns¶
When reading or writing data to file it is necessary to apply some rules defining the file's layout. This you can do from the Migration Job/File Mapping tab. If you entered a view name in the job header, then all columns from this view will automatically be inserted in the file mapping tab. You then define in what order the columns in the file should appear using the Pos column. You can also define the length of each column, how many decimals should be used, specify trimming from the right or the left of a column value, or padding to the right or the left of a column value, etc.
- An file job with direction In or Out must be created.
- File configuration information in Migration Job/Formatting must be decided and entered in order to define the file columns correctly.
If columns has already been created from view name in the job header:
- Enter the correct position for each column as they appear in the file. If the file has fixed column lengths use the combination of Pos and Length to describe the columns position in the file, if the file has a column separator character, use only Pos to describe the columns position.
- For columns present in the IFS view that does not appear in the file, enter 0 in the Pos column if you still want to keep a default value for the column.
- Remove columns that should not be used in this job at all. Do not remove any columns that is a Key column or is a Mandatory column.
- Insert additional columns that are wanted or present in the file, but does not exist in the IFS view.
- Save your changes.
- Optionally add more information about the columns to configure the behavior of reading from / writing to file. More information about this is given in the related window Maintenance/File Mapping.
If the File Mapping tab is blank:
- Choose New.
- Enter the position of the new column in the file. Specify the columns position in the file by using the Pos column (in combination with the Length column if the columns in the file have fixed lengths).
- Enter a name for the column.
- Enter a description of the column.
- Enter the columns data type.
- Save the new column.
- Optionally add more information about the columns to configure the behavior of reading from / writing to file. More information about this is given in the related window Migration Job/File Mapping above.