QAD 2017 Enterprise Edition > User Guides > EDI eCommerce > Setting Up EDI eCommerce > Defining the EC Subsystem
  
Defining the EC Subsystem
Use EC Subsystem Definition Maint (35.13.1) to define the format and content of the control records exchanged with an EC subsystem. The values you enter must correspond to values used in the SNF file by the EC subsystem you are defining.
Create a separate EC Subsystem Definition Maint record for each direction—inbound and outbound. The combination of subsystem and direction is a unique identifier, so you can use the same subsystem name for both.
The program consists of three frames. Use the first frame to define basic EC subsystem data.

EC Subsystem Definition Maint (35.13.1), First Frame
Subsystem
Enter up to 20 characters to identify an EC subsystem that exchanges data with your system. Use any name that makes the subsystem easy to identify. For example, if you use the same subsystem for both imports and exports, you can add the suffix “In” or “Out” to the end of the subsystem name.
Format
Specify whether the fields in the EC subsystem records are fixed or variable lengths. Enter a question mark (?) to indicate XML format.
Field Delimiter
If you specify variable-length fields for this EC subsystem, enter the ASCII code for the character the EC subsystem uses to separate fields.
Record Code Length
Enter the number of characters the EC subsystem uses to indicate the type of record it is sending. This value must be from 1 through 20.
Record Code Position
Enter the number of the character position where the record code begins.
Enter zero to indicate that the record code is in the last position in the document.
Quote Character
Enter the ASCII code for the quote character used by the EC subsystem. If no quote character is required, enter zero.
File Extension
Enter the three-character file extension that the EC subsystem uses to identify its inbound files. For outbound files exported from your system, the system appends this extension to identify the files to the EC subsystem. The name of the file is based on data you define in Transmission Group Maint.
Additionally, the load function uses this extension to determine which EC subsystem definition to use for interpreting control records.
See Defining Transmission Groups.
Remote Host Name
If this EC subsystem runs automated activities on a host computer, enter the name of that host computer. For example, you can run an e-mail program on this system to process messages containing exported files.
To specify the program that the remote host runs, use the Processing Program field in the Transmission Group record for the transmission group that accesses this host.
Logfile Extension
If the computer specified in Remote Host Name creates a log file related to its processing activities, enter its file extension.
Logfile Directory
If the computer specified in Remote Host Name creates a log file related to its processing activities, enter the directory that contains the log file.
Process Log Directory
Enter the complete path to the directory where the system creates log files when processing documents using this subsystem. The system verifies that the specified directory is valid. This value defaults from eCommerce Control, if a value is specified.
Process log files can be used for two purposes:
As a record of what took place during a processing session, including warning and error messages.
As source information for system-generated e-mail messages. When processing errors occur, the system automatically notifies the user by adding the process log file to an e-mail message, if e-mail system and address information is defined in User Maintenance. Additionally, it sends status information from the log to other e-mail addresses specified for individual location cross-reference records in Trading Partner Maintenance.
Unless it is blank, the subsystem definition value overrides the eCommerce Control value. If both are blank, logging is disabled, and process control functions do not create permanent log files. Instead, the system creates temporary log files in the user’s startup directory. After sending process status e-mail messages, the system deletes the temporary logs.
Direction
Specify whether this EC subsystem definition is for inbound or outbound records. In eCommerce, direction is always relative to your system—inbound for imports and outbound for exports.
Each EC subsystem must have separate definitions for inbound and outbound records.
Application
Enter a code representing the application to which this subsystem definition applies. The default is EDI.
Source Code Page
Optionally, specify the code page for inbound files. This field defaults from eCommerce Control.
During import processing, the system converts the data to the system code page using the specified code page.
This field is not validated. Be sure that the value you enter is included in the Progress file DLC/convmap.cp. Otherwise, the conversion program returns an error.
Parsing Program
For an inbound subsystem definition, optionally specify the Progress program name of a procedure that runs before the system attempts to load the imported document.
A primary use of this field is to specify a program that sets default token values in situations where the inbound document does not provide such values.
Example: When you import bank statements for use by QAD Financials, the inbound document does not provide values required for the control record to set the tokens. Parsing Program can reference a program that rewrites the incoming document to an SNF file that provides a record code on each line. When it reads this file, the system can use these record identifiers to correctly interpret the document so that it loads without errors.
Use the second frame to define the control records for this EC subsystem.

EC Subsystem Definition Maint, Control Records Frame
Seq
Enter a sequence number identifying the order in which control records are received from or sent to the EC subsystem.
Record Name
Enter the name of this control record.
Requirement
Specify whether this control record is mandatory or optional for the receiving system—your system for inbound documents or the EC subsystem for outbound documents. When mandatory records are not included in a document being processed, the system generates an error.
Record Code
Enter the alphanumeric code the EC subsystem uses to define this type of record.
Token
A token is a critical variable used to populate the exchange file master record during the load process. It provides such information as the trading partner identifier or the document type. Tokens determine the specific way data is transformed between the EC subsystem and your system.
If applicable, enter the name of the token associated with this record. Valid tokens are:
tp-id (mandatory for transformation processing)
tp-document-id (mandatory for transformation processing)
tp-document-nbr
tp-message-nbr
tp-func-grp-nbr
tp-interchange-nbr
tp-address
tp-site
app-table
app-table-index
app-table-value
app-document-id
app-document-vers
app-address
app-site
To assign multiple tokens to one field, separate them with commas.
The system treats any other values in this field as reference information.
Omit Record
Enter Yes to prevent the system from writing this record to the output file. This field applies to exported files only.
Omit Record Code
Enter Yes to prevent the system from writing the record code to the output file. To prevent the record itself from being added to the file, set Omit Record to Yes.
This field applies to exported files only.
Fields
Enter Yes to display an additional frame that lets you enter or edit the fields contained in this record.
Use the last frame to define each field included in the control records for this EC subsystem.
Note: This frame displays only when Fields is Yes for the selected record.

EC Subsystem Definition Maint, Control Record Fields Frame
Seq
Enter the numerical sequence in which this field occurs in the record.
Field Name
Enter a descriptive name for this field. See here.
Token
If applicable, enter the token that applies to this record.
Req
Specify whether this field is mandatory (Man) or optional (Opt) for the receiving system—your system for inbound documents or the EC subsystem for outbound documents.
Min
Enter the minimum length of this field. The system validates that data included in the field is greater than or equal to the minimum required number of characters.
Max
Enter the maximum length of this field.
If the field lengths are variable and separated by the specified delimiter, the system validates that the field length is between the Min and Max values.
If the field lengths are fixed, the system uses this value as the actual length to calculate where each field starts and ends.
Default Value
Optionally enter a default value for the system to place in this field if no other value is specified. For example, this field could be used on an outbound transaction when the receiving EC subsystem requires a value in a field that generally is blank.
Use EC Subsystem Report (35.13.2) to review the structure of the records and fields in an existing subsystem definition.