Creating a Delimited Flat File Guideline with EDISIM

Steps include:

1.    Starting the Guideline   

2.    Setting Guideline Properties   

3.    Creating the TRLR Record    

4.    Setting Guideline Properties   

5.    Assembling other Records   

6.    Adding Records to the Layout   

7.    Setting Requirements  

8.    Setting Repeat Counts   

9.    Specifying Values    

Starting the Guideline

  1. Open EDISIM Standards Editor.

  2. Choose File > New > Empty Guidelines.

  3. For data that will have delimited fields, choose +UDELIM:

  4. Click Open.

  5. Click Save and use this Name and Description:

    Save.

Setting Guideline Properties

  1. Choose File > Properties > User-Defined Standard.

  2. Type these delimiters:

    Record    $
    Field    |
    Sub-Field    #

  3. Click OK and then save.

Creating the HEAD Record

Header and trailer records are optional but our particular file format has them.

Creating the Fields in the HEAD Record

We will now create the fields in the first record in the file. In this guideline, we are labeling it HEAD:

  1. Open Dictionary Objects and click Fields:

    Dictionary objects are pieces that can be assembled to create file layouts.

  2. Choose Edit > Create new item > Dictionary Field.

  3. Fill out the following information about the FNUM field and then click OK. The field ID can be up to 128 alphanumeric characters and underscores. Do not use spaces or other special characters in the ID.

  4. Click on Fields again, and create DATE and then TIME:

  5. Save.

Assembling the HEAD Record

We now assemble the HEAD record itself:

  1. Under Dictionary Objects, click Records:

  2. Choose Edit > Create new item > Dictionary Record.

  3. For ID, type HEAD.
    For Description, type Start of each file.
    Click OK.

    Record IDs can be up to 20 alphanumeric characters with no spaces or other special characters except underscores.

  4. With HEAD highlighted, choose Edit > Add Item > Field.

  5. From the list of fields, select FNUM and click OK.

  6. With FNUM highlighted, choose Edit > Add Item > Field and choose DATE.

    Be sure it says After:

    Click OK.

  7. Add TIME below DATE.

  8. Save.

Creating the TRLR Record

  1. Click on Records.

  2. Choose Edit > Create new item > Dictionary Record.

  3. For ID, type TRLR.
    For Description, type Trailer record.
    Click OK.

  4. With TRLR highlighted, choose Edit > Add Item > Field and chose FNUM.

  5. Save.

Assembling other Records

We will now create fields needed for the other records, and then assemble them into records.

  1. For each field in the table below, click on Fields under Dictionary Objects and choose Edit | Create new item | Dictionary Field.

  2. Fill out the information for these fields:

ID

Description

Type

Min

Max

FNAM

First name

AN

1

100

LNAM

Last name

AN

2

100

ADDS

Street address

AN

5

100

CITY

City name

AN

2

100

STAT

State - 2 character

AN

2

2

ZIPC

5 or 9-character ZIP, no hyphen

N

5

9

SPEC

Pet Species

AN

2

20

COLR

Color

AN

3

20

BYER

Birth year in YYYY format

N

4

4

  1. Highlight Complex Fields:

    

We are going to assemble the CZIP complex field, which includes CITY, STAT, and ZIPC. This is a typical example of a complex field, which is a set of fields that always appear in the same order.

  1. Choose Edit > Create new item > Dictionary Complex Field, fill out this information, and click OK:

  2. With CZIP highlighted, choose Edit > Add item > Field and choose CITY. Click OK:.

  3. With CITY highlighted, choose Edit > Add item > Field and choose STAT and be sure After is selected. Click OK.

  4. Add ZIPC below STAT.

  5. Assemble the NAME record:

    Highlight Records.

    Choose Edit > Create new item > Dictionary Record and fill out the information about the NAME record:

    Use Edit > Add item > Field to add FNAM and then LNAM:

  6. Create the ADDR record and add the ADDS field twice (to accommodate 2-line street addresses).

    Then use Edit > Add item > Add Complex Field and choose CZIP.

  7. Create the PETS record with these fields.

  8. Save.

Adding Records to the Layout

The layout is the set of records, in order, that define the flat file structure. In a flat file guideline, it includes all records including any header and trailer records.

  1. Close Dictionary Objects and Click on LAYOUT:

       

  1. Choose Edit > Add item > Record and choose HEAD.

  2. Add the rest of the records in this order:

Setting Requirements

  1. Click on the NAME record and make it required:

     

  1. Make these records and fields required.

Setting Repeat Counts

To specify that the PETS record can appear multiple times:

  1. Click the PETS record.

  2. In the Repeat Count field in the bottom pane, type >1.

  3. Be sure that View > Show Unused is selected:

Specifying Values

You can use code values or application values with flat file guidelines. Here, we specify a list of pet species.

  1. Open the PETS record.

  2. Right-click on SPEC and choose Application Values.

  3. Fill out the top like this:

  4. In the bottom Value line, type DOG and press Enter.

    Type BIRD and press Enter.

    Also add CAT and REPTILE.

  5. Click Attach and then Save.