Adding a new field to
a record
Select File>New>Field.
The New Field window displays. There are two tabs pages: Fields and Options.
Enter the following in the Fields tab:
Field Name – the name of the field.
Field Description – a brief textual description of the field. (If you do not enter a description, the field name is used to populate this field.)
Start Position – the number of the column in which the field begins in a record in a fixed-length file. ECMap automatically calculates this based on the previous field lengths.
In fixed-length files, multiple fields can have the
same “columns”- two fields can share a location.
In delimited files and table definitions, fields may NOT overlap
column positions.
Field Length – the size of the field in bytes. Fixed-length records are made up fixed-width fields. Variable-length records are made up of variable-width fields.
Field Type – describes the type of data in the field. Enter the field type or select it from the drop-down list. Depending on the field type you select, additional text boxes appear in which information must be entered:
AN – Alphanumeric. Field where the characters consist of the letters A – Z, numbers 0 – 9, and special characters (-/,). (ex. ABC12-3D)
DE – Decimal Explicit. Numeric field containing an actual decimal point (ex. 123.45). In the No. Decimals text box, enter the number of places to the right of the actual decimal point.
DI – Decimal Implicit. Numeric field with the position of an implied decimal point defined by the number of characters following the decimal point. (ex. 12345 with 3 decimal places = 12.345)
In the No. Decimals text box, enter the number of places to the right of the implied (not actual) decimal point.
Before any calculation or assignment, a DI field type
is changed to a DE field type internally by ECMap.
DT – Date. Numeric field containing the date in a specified format.
For the Date Format, choose from the following entries in the drop-down list:
YYMMDD
YYYYMMDD
MMDDYY
DDMMYY
JULIAN – ECMap supports 7-digit (4-digit year + 3-digit days) Julian dates.
MMDDYYYY
MM/DD/YY
DD/MM/YY
MON DD YYYY
DD MON YYYY
YYYY MON DD
Century Minimum Type – defines the way in which 2-digit years in specified date fields are handled. Select one of the following three choices from the drop-down list:
Global century minimum – to change all 2-digit years to 4-digit years, use value specified when map was defined. (All years prior to global century year are treated as next century. All years including and after global century year are treated as current century.)
Field century minimum – specify a year to be used as global century year (overriding value specified when map was defined) to change all 2-digit years to 4-digit years. An additional text box appears. Enter the year you want to use as the global century year for this date field in the Field Century Minimum text box that appears. The Field Century Minimum is a numeric value between 0 and 99 used to determine the century when translating a 2-digit year to a 4-digit year. Every 2-digit year less than or equal to this value is assumed to have a century of 20 and every 2-digit year greater than this value is assumed to have a century of 19. Enter the numeric value in the text box.
No century minimum – specify that no century type logic is to be used. (2-digit years are not converted to 4-digit years.)
TM – time. Numeric field containing time in 24-hour format—HHMM (for example, 9 pm = 2100).
PD – packed decimal. Decimal field with compressed notation.
R – real number. Numeric field that allows for a floating decimal.
SD – signed decimal. Decimal field with the last character corresponding to an overpunch field (for COBOL-based systems).
In the No. Decimals text box, enter the number of places to the right of the implied decimal point:
SI – signed integer.
UI – unsigned integer. Numeric field without a plus or minus sign.
The Web Parameter is used to link the data in a field to an HTML form, when the form is being read or written.
The Attributes and Edits text boxes contain the information that you enter on the Options tab of this window. The choices for attributes and edits are entered on the Options tab of the New Field window and are explained below.
The XML text box contains either an A or a D, based on the choice you made on the Options tab under XML Options—A for Attribute and D for Data.
Enter the following information under Attributes on the Options tab
Key Field – reserved for future use.
Trade Partner ID – checked if this field contains the value that identifies the business entity with which data is being exchanged. On outbound maps, you must have a field with this attribute in the master record because this field is used to search the trading partner database for the receiver code to put on the EDI envelope. (In addition to providing required information for the EDI envelope, the trading partner lookup is used for routing and dynamic map selection.) On inbound maps, this field is used to search the trading partner database for your application’s internal sender code for this trading partner.
Protected – specifies that this field is not cleared when the “clear unprotected” rule command is applied. This attribute is used primarily in the data looping structure when you need to clear records between loops received but you want some application fields to remain uncleared.
Today’s Date +/- n Days – used to indicate that this field contains today’s date plus (+) or minus (-) the number of days indicated in the text box next to the check box. The date is derived from the system, not from data received. (The minus (-) appears in the text box, but the plus (+) does not appear.)
Date Timestamp – used in many ODBC record definitions where the date column is a timestamp. Note that each database from a vendor (for example, Sybase) is interpreted on a case-by-case basis and is not always interpreted the same way. After a database is converted into ECMap, you should analyze how the database was converted and make adjustments if needed. In some cases, there are some consistent interpretations. For example, an Oracle Date-Time field is converted to a DT field with a time stamp attribute and a TM field.
Auto Increment – used when an SQL table has an auto increment column, and ECMap should not update the field. The field is not passed back to the database when an insert or an update is performed. This allows the database to continue to automatically populate key fields. [TIP: This attribute can be set on any fields that should not be updated in an SQL Select and Update command.]
Fixed String – lets you specify the default for this field as the value entered in the text box to the right. It is used on records that are written (output records).
Record Type – specifies that this field contains the record type identifier entered in the text box to the right. This attribute is used for files that contain multiple record types which each have different record definitions.
SQL Stored Procedure Parameter attribute indicates that this field is accessed during the rule execution in an SQL Stored Procedure Call command. If this box is checked, a text box appears to the right of it.
In the text box, choose from a drop-down list to specify whether the data in this field is used as:
INPUT to the stored procedure
OUTPUT of the stored procedure
INPUT to and OUTPUT of the stored procedure
The choice you make here is used in conjunction with the Marked Field in Rec are Parameters check box in the Record Field Parameters section of the SQL Procedure Call window. (See the Rules chapter for a detailed explanation of how this works.)
Right-click the bottom text box, and a list of possible SQL field attributes displays. Double-click an attribute, and it is entered in the bottom text box.
Enter the following information under Edits on the Options tab:
Justification for a field:
L – left-justification. The data in the field begins in the leftmost column of the field.
R – Right-justification. The data in the field ends in the rightmost column of the field.
N – No justification. The program uses default justification rules for data in the field.
Mandatory fields must contain data or a warning is generated on inbound maps.
If Zero Fill is checked, the program fills all empty spaces with zeroes. This applies only to data with a field type of Decimal Implicit (DI) or Signed Decimal (SD). (These are the two primary types of fields used by COBOL-based environments, which is where zero-filling fields is most important.)
Enter the following information under XML Options on the Options tab:
Attribute – the field contains an XML attribute.
Data – the field contains actual XML data.
You must choose one of these two options if the information in the field needs to be read from or written to an XML document. Otherwise, this information is not required.
Select Next to enter information for another field.
If you have entered all the fields in the record, select OK to return to the New Record window.
Deleting a field in a record
Select a and choose Field>Delete.
You are asked to confirm the deletion.
Select Yes to delete the field.
Modifying a field in a record
Select a record and choose Field>Properties.
The Field Properties window displays.
Make the necessary changes on the The Field Properties as described in “Adding a new field to a record”.
Recalculating the starting
column of fields in a record
Use this function when a field length has changed or when a field is deleted or added.
Select a field and choose Field>Recalculate Columns.
The start column is recalculated for the highlighted field and all subsequent fields.