Record Layout Definition

The record layout Definition screen is used to create new Record Layouts or edit specific layouts.

The fields on this section of the screen are:

Field

Description

Buttons

The buttons at the top of Record Screen Save, Create, Repeat, Delete and reload Record Details to/from the Database.

Record Name & Description

Self Evident

Record Type

There are 3 basic Record Types (+ binary versions of these):

Record Layout

A normal record consisting of a one or more fixed length fields.

Delimited

Standard Delimiter (i.e. Comma or Tab Delimited) Record. Delimiter files are only partially supported (no updates allowed).

Group of Records

The record consists of a Group of other records. Typically there is a field that determines what record to use. It is common for a file to contain

  • A File Header Record
  • Many Detail Records
  • A file trailer record

This would be a good candidate for using a Group of Records. In this case you would define 4 records:

  • File Header Record
  • Detail Record
  • Trailer Record
  • Master Record (Group of Records) that references the three previous (child) records.

See "Child Records" for the Child Record Definition screen section.

System

System this Record Layout belongs to. You can Change Create new systems by updating the System Table via the "Table Edit"

Lines to Insert

This is the lines to insert in the Field Table / Sub-Record Table when the insert button (just below) is pressed.

Table Buttons

The second row of buttons refer to the Field Table / Sub-Record Table immediately below the buttons

Record Details

Lastly we have a Tab Box holding the "Field Records"/"Child Records" tables + the "Extra Panel". These panels define record details.

Note: The "Child Records" panel is displayed when Record Type=Group of Records or Group of Binary records Records otherwise "Field Records" is displayed.

Field Records

This panel is used to define the records fields. Fields in the Table are:


Field Description
Position Position in the Record. The start of the record is Postion=1 and not 0 as in C / Java.
Length Length of the field in bytes. Leave blank for Comma / Tab (etc) delimited files
Field Name Name of the field. This is the column/row name used for this field in the RecorEditor
Description Field Description. This is used as a Column Header Mouse over in the Record editor. For example if the description was entered as

Then if you hold the cursor over the column heading in the RecordEditor you get

Field Type Type of Field. See Appendix A, "Field Types" for details.
Decimal Pos Number of places after the decimal point
Cell Format Formatting to be applied to this field.
Parameter User parameter's. This is a value that can be used by user written types (e.g. for generic Combo or Date Routines).
Default Value Information only, Not currently used (relates to work).
Cobol Name Information only, Cobol Field Name
Field Id Do not Change. It is the field key and is displayed for my testing.

 

Child Records

This panel is displayed when Record Type=Group of Records or Group of Binary records Records. Fields in the Table are:


Field Description
Child Record The child record of the Current parent record
Field Start Not Currently used
Field Field that determines which record to use. In the above example:
  1. The records DCR0470 S11 .. S14, O21 each contain a field Record Type
  2. When editing a file where Record Type="S11" then the RecordLayout of DCR0470 S11 would be used.
    While if Record Type="S13" then the RecordLayout of DCR0470 s13 would be used.
FieldValue Field value that the Field above is tested against.

Extended Record Selection Button - Starts the Extended Record Selection dialog
Tree Parent Logical Parent Record for the record. This can be used to build a Tree using the Record Layout Tree option of the View menu in the RecordEditor

Note: if Field is blank and FieldValue=* then this is the default record.

 

Record Selection Screen

To start the Record selection editor Press the appropriate button on the record group screen:

On the record Selection you enter fields and the criteria

For the Field, operator and value fields just enter the values. For the And / Or value you can change by clicking on the And / Or, it will swap

The screen only supports simple expressions of the form

        (     field1 = value1
          and field2 = value2
          and field3 > value3
         )
      or (    field4 < value4
          and field5 > value5
         )
      or (    field6 = value6
          and field7 > field8
             ..........
 

The system only supports simple Or ~ And boolean expressions. It does not support complicated expressions or And ~ Or boolean expressions.

If Field values are entered at the Group level They will be included as well.

The above will be interpreted as

       Record Type = S1
  and
      (
          (    Case Pack id  = P
           and Pack Qty      > 0
          )
       or (    Case Pack id  = S
           and Pack Qty      < 0
          )
      )
 
 

Extra Panel

On the extra panel contains an adhoc mixture of options


Field Description
Cobol Copybook Cobol Copybook name (if imported from a Cobol/XML Copybook). When a Cobol copybook is imported the LayoutEdit will replace an existing file with the same name.
Font Name Font Name to be used. If it is blank, the System default font will be used. A typical use might be to display Native mainframe data on a PC.
Delimiter Delimiter to use in Delimited files (i.e. comma, tab etc).
Quote Quote character to use in delimited files.
Record Separator Record Separator to use.
default Use the computers normal (or default) line separator.
<crlf> Windows style separator.
<cr> Unix/Linux file separator.
<lf> Macintosh line separator.
File Structure Structure of the files. Controls which IO routines are used to read / write the file. File Structures are defined in Table 5.

Defining Combo Field

To use a Combo List (Say AmsPoDownloadType) you must

  1. Set the Cell Format to Combobox

  2. Enter Combo list in the Parameter Field