XPAC Reference Guide

Rules for data file format

Rules for data file format

Previous topic Next topic  

Rules for data file format

Previous topic Next topic  

Data files must follow certain format rules for XPAC to be able to import them. These rules are listed below and include general rules and specific rules for fixed width and delimited files.

If you have a data file that is formatted in a different way to that described below, then it is still possible to transfer the data in the file into XPAC, however this must be done using an XCM. Please contact RPMGlobal for assistance in this area.

General

The file must be a text file.
Record Identifiers must be present in the file, for each record and at each level of the database.
The record identifiers can be either the position in level number or the record name at the level or both. If a level has a position table defined, and both the position in level number and the record name are imported from the file, then the imported position in level number will be ignored and the position table numbers will be used instead.
The data in the file must be in a regular pattern. This pattern will vary according to whether the file is a fixed width or a delimited file.
The maximum file width that can be read is 2400 characters.

Fixed Width

The data for each record represented in the file, must occupy the same number of lines. This can be anywhere between 1 and 999 lines. Typically, the data will be spread over 1 to 10 lines.
Following on from the previous rule, there is a particular point to note in relation to open cut coal deposits. If the waste and coal data is contained in a single file, and the waste and coal are being represented by a single record in the database, then waste and coal data must be present and in the same order for every record in the database. If there is no coal in a particular record, then the coal data should still be present in the file, but reporting zeros. Similarly for waste.
Each new record in the import file must start on a new line.
Each item of common data must be on the same line for every record and in the same range of columns. It is the line number, and the start and finish column numbers that are used to locate the data.

Delimited

There must be the same number of data items or fields for each record represented in the file, even if their value is zero. This can be anywhere between 1 and 255 fields.
Each data item or field must be separated by specified characters called the delimiters. More than one character type may be used to separate the data items, but every occurrence of those characters in the file will be treated as a delimiter. Most delimited files will make use of a single delimiting character.
If two delimiters appear side by side in the file, then this will be read as two fields.