A NEW TODAY IS DAWNING!

Standard File Format Guidelines

 

Introduction

The OCS application has several standard file formats which are used in generating or importing files to be exchanged between yourself and external trading partners such as suppliers, vendors or for internal usage. Further formats will be added in the future to allow for integration with E-commerce servers such as Biztalk server.

The format to be used for a particular trading partner such as a manufacturer, supplier or vendor is set in the Interfaces Parameters screen which is accessible from the Interfaces tab from their respective maintenance screens.

This standard format gives the standard rules about the file format but not what is contained within the file. The actual contents (ie. the individual field elements) of the file are determined by each specific interface. 

An example of this is that you send out both request for quotations and auto matched invoice documents to a supplier/vendor. The interface parameters screen is set up so that both these interfaces use the fixed format. Therefore both files use the same standard format and guidelines or rules but the actual field contents will differ. The auto match document will have information about the deliveries and purchase orders the invoice relates to whereas the quotation file will have information about the parts that need to be quoted on.

There are separate knowledge base articles for specific contents of each specific interface. These documents may give examples of the data file. These examples will generally only be for one of these standard formats. Using these guidelines though this can easily be converted to a different format.

Each of the formats are described below. Each of these descriptions will also give an example that relates to the following example interface:

Field Length Comments
Field1 12  
Field2 10  

This example will have 4 records/rows of data:

Field1 Field2
Item 1 abc123
Item 2 abc,123
Item 3 abc"123
Last Item abc123"

All formats use the standard ASCII character set.

NOTE: The use of some special characters may cause problems on some systems and with some trading partners so should be avoided. Generally characters that can be entered a US keyboard (without using control or escape sequences) will be fine. Some trading partners/programs may impose further restrictions.
 

Fixed File Format

In this format each record is 1 line in the file, with each line being separated by an operating system dependant new line character(s). When generating these files the OCS application will write the new line character(s) depending on the operating system it is running on. (If you are running OCS on linux/unix then these lines are separated by the linux/unix new line character(s) and if running OCS on windows then these lines are separated by the windows new line character(s).) When importing/reading files then OCS will successfully read in either type of new line character no matter what operating system it is running on.

Each field within the line always occupies a fixed amount of room defined by the specific interface. The last field is truncated by the new line character(s). Although it can be read/imported into OCS regardless of whether it is truncated or space filled to occupy the length defined for that field in the specific interface. This format will leave trailing or leading spaces on left or right justified fields.

The example data would be formatted as:

	Item 1      abc123
	Item 2      abc,123
	Item 3      abc"123
	Last Item   abc123"


Comma Delimited (CSV)

This uses the standard comma delimited format as used by Excel and other programs. This is very useful where a computer system is not in place at the trading partner and the file can be generated/edited in excel and saved out as a comma delimited file.

In this format each record is 1 line in the file, with each line being separated by an operating system dependant new line character(s). When generating these files the OCS application will write the new line character(s) depending on the operating system it is running on. (If you are running OCS on unix then these lines are separated by the unix new line character(s) and if running OCS on windows then these lines are separated by the windows new line character(s).) When importing/reading files then OCS will successfully read in either type of new line character no matter what operating system it is running on.

Each field within the line is separated by a comma (,). The field length cannot be greater than that defined for the field in the specific interface.

If the actual data is contains either a comma (,) or double quotation marks ("). Then the whole field is wrapped by double quotation marks ("). Any double quotation marks (") within the data is converted to 2 double quotation marks (""). This format will not leave any trailing or leading spaces fields no matter how they are justified.

The example data would be formatted as:

	Item 1,abc123
	Item 2,"abc,123"
	Item 3,"abc""123"
	Last Item,"abc123"""

Delimited

The delimited format has an additional delimiter character defined for it.

This format is the same as the Comma Delimited (CSV) format except that the delimiter character can be defined by the user. No special field conversions takes place. This means that the data cannot contain the delimiter field otherwise an error will occur. This allows for faster and simpler processing by the trading partner.

NOTE: With this format no special validation will occur to ensure that the delimiter does not exist in the data. If the character does occur in the data then unexpected results will occur.

The example data would be formatted as (In this example we use the | character as the delimiter):

	Item 1|abc123
	Item 2|abc,123
	Item 3|abc"123
	Last Item|abc123"