Transferring Data to an iSeries, eServer i5, or System i5 Data File and Source File
You can transfer data to the following two types of iSeries™, eServer™ i5,
or System i5™ physical files.
- Physical data file
- The members of a physical data file can contain numeric and
character data of any iSeries™, eServer™ i5,
or System i5™ data type. To transfer data to a physical
data file, use the workstation file-description file to define how data is
stored in a workstation data file. Besides this definition, the file description
of the iSeries™, eServer™ i5,
or System i5™ file is required to ensure correct conversion
of the data.
When data is transferred to an existing iSeries™, eServer™ i5, or System i5™ file, the file description becomes part of the iSeries™, eServer™ i5, or System i5™ file. When data is transferred to a new iSeries™, eServer™ i5, or System i5™ file, the file description is included in the iSeries™, eServer™ i5, or System i5™ field-reference file.
- Physical source file
- Normally, a physical source file stores no data. It contains
only text or source statements, as follows:
- The first part (field) of a source file always contains numbers indicating the order.
- The second part (field) of a source file always contains the date on which the file was created.
- The third part (field) of a source file contains the text of the file. This part can contain data fields of character type or zoned type only. Physical source files provide the optimum means of transferring text or source statements with a workstation.
Note the following considerations when transferring data to and
from an iSeries™, eServer™ i5,
or System i5™ physical source file:
- To transfer text from the iSeries™, eServer™ i5, or System i5™ to a workstation, specify the name of the source file and members in FROM. Specify an asterisk (*) in SELECT. This informs the iSeries™, eServer™ i5, or System i5™ that only text is transferred from the source file, with the order number and date fields excluded.
- The iSeries™, eServer™ i5, or System i5™ text must be stored in the workstation code text file. Normally, a workstation text editing program can be used to manipulate this workstation code text file.
- Specify that the file-description file is not to be stored for that workstation file. Because text is assumed to be a record consisting only of character data, it is not necessary to define fields.
- To return text from a workstation file to an iSeries™, eServer™ i5, or System i5™ file, specify the type of the workstation file containing the text. This is almost always workstation code text. Specification of the file-description file is not required.
- To create a new iSeries™, eServer™ i5, or System i5™ file and its members, specify a valid record length. This record length must be equal to the maximum record length of the workstation file, plus 12 bytes. This is because the transfer function automatically creates the order number and date fields when the file is transferred to the iSeries™, eServer™ i5, or System i5™ members. The order number and date fields together occupy 12 bytes.