Field Information
The primary objective of this package is data entry, updation and retrieval of records. To Create/Update data, field information that defines the property of a field should be existing somewhere. This property of a field that needs to be existing should be stored in a file. The storing of entire field information in a file allows the user to retrieve and modify the same as and when required. The name of the file has been left for user's choice with only the extension part being retained by the program. The name of the file can be any windows file name. The extension is always maintained as "FMT". The information existing under this file allows the user to create/update records moreover used for file manipulation purposes.
The field file entries consist of following items:
1. Field Name:2. Field Type:Name of the field stands as a reference for further utilization. The field name should always start with an alpha character. The characters that are allowed are A-Z, 0-9, '-' and it can consist of combination of any of these set of characters. Each field should be uniquely named and OdEan does not allow duplicate field names. The naming convention has been restricted to this in order to provide direct COBOL compatibility with the created field names. Maximum length of the field name is 32 characters.
The type of fields supported under OdEan and its COBOL equivalent are provided below.
OdEan Field Type | COBOL Equivalent |
---|---|
A - Alphabetic | A |
G - General (Alphanumeric) | X |
N - Numeric | 9 |
D - Date | X |
3. Field Sub Type:The program is designed in such a way that all the fields are compatible with COBOL.
This is associated only with field of type numeric. In case if the field type is of Numeric and Signed then appropriate information has to be entered. When Signed is selected, it implies it is a numeric field consisting of sign information. The Signed field operations comprises of four types:
SIGNED LEADING (Embedded)
SIGNED LEADING SEPARATE
SIGNED TRAILING (Embedded)
SIGNED TRAILING SEPARATE
When user indicates a signed field under the signed field only characters that are accepted under this are Plus (+) and Minus (-). The default sign is always retained as positive. This feature is provided mainly for COBOL.
The above signed options are taken care only during Export to Cobol format. While entering the data in any data entry mode, the signed field operators is always Signed Leading Separate.Detailed description of Signed field storage: The storage type behavior for signed field is described in detail here in order to help the user to know whether user can use a foreign file under this package after creating field information. This detailed description will help the user in understanding the behavior of signed field feature under OdEan.
For SIGNED LEADING SEPARATE and SIGN TRAILING SEPARATE the '+' and '-' signs are stored as it is:
Example: SIGNED LEADING SEPEARATE
Length 10 Characters (Bytes)
Value stored 123456789+
123456789-SIGNED LEADING and SIGNED TRAILING which are embedded is stored as follows: The trailing or leading character is taken as the one that has to be embedded with the sign information. The following table shows how the sign and the digits are combined and represented as single entity
Digit | Positive | Negative |
---|---|---|
0 | { | } |
1 | A | J |
2 | B | K |
3 | C | L |
4 | D | M |
5 | E | N |
6 | F | O |
7 | G | P |
8 | H | Q |
9 | I | R |
Examples:
To provide examples for the various sign specifications the following table has been illustrated which represents all the possible combinations of signed field information. For clear understanding from the programmer/system analyst point of view even COBOL equivalent is also provided.COBOL Description:
02 L-S PIC S9999 SIGN LEADING SEPARATE CHARACTER.
02 T-S PIC S9999 SIGN TRAILING SEPARATE CHARACTER.
02 E-LS PIC S9999 SIGN LEADING.
02 E-TS PIC S9999 SIGN TRAILING.
OdEan Equivalent Description under field Information:
S -- Leading Separate
S -- Trailing Separate
S -- Leading
S -- Trailing
Numeric Value | L-S | T-S | E-LS | E-TS |
---|---|---|---|---|
+0 | +0000 | 0000+ | }000 | 000} |
123 | +123 | 123+ | }123 | 123} |
123 | -123 | 123- | }123 | 12C |
4. Starting Column Number:The starting column number for a specific field can be termed as a positional number within a record from where this field should start. The first column is always taken as one (1). The next starting column will be Previous field starting column number plus previous field number of characters plus one. The starting column numbers are calculated automatically by the program.
5. Number of characters:The number of characters for a field is the maximum number of character and/or digits the user may enter as input to this field. The physical storage may not always be equal to the number of characters in the case of date since separate storage type is provided
The maximum number of character for each type of field is as follows:
Field Type | Maximum number of characters |
---|---|
Alphabetic | 512 |
General | 512 |
Numeric | 18 |
Date | Dependent on type of storage |
Date Field:The date field basically comprises of three components:
- Date Field visible on the screen
- Date Field that has to be stored in the file.
- Base year for validation and also for Year-2000 Conversion facility
The Date field format that is visible on the screen consists of thirty-two types. Any one of the available types can be chosen by the user
No | Format | Date | Month | Year |
---|---|---|---|---|
1 | DdMmYy | 2 | 2 | 2 |
2 | Dd/Mm/Yy | 2 | 2 | 2 |
3 | Dd:Mm:Yy | 2 | 2 | 2 |
4 | Dd-Mm-Yy | 2 | 2 | 2 |
5 | DdMmYyyy | 2 | 2 | 4 |
6 | Dd/Mm/Yyyy | 2 | 2 | 4 |
7 | Dd:Mm:Yyyy | 2 | 2 | 4 |
8 | Dd-Mm-Yyyy | 2 | 2 | 4 |
9 | MmDdYy | 2 | 2 | 2 |
10 | Mm/Dd/Yy | 2 | 2 | 2 |
11 | Mm:Dd:Yy | 2 | 2 | 2 |
12 | Mm-Dd-Yy | 2 | 2 | 2 |
13 | MmDdYyyy | 2 | 2 | 4 |
14 | Mm/Dd/Yyyy | 2 | 2 | 4 |
15 | Mm:Dd:Yyyy | 2 | 2 | 4 |
16 | Mm-Dd-Yyyy | 2 | 2 | 4 |
17 | YyMmDd | 2 | 2 | 2 |
18 | Yy/Mm/Dd | 2 | 2 | 2 |
19 | Yy:Mm:Dd | 2 | 2 | 2 |
20 | Yy-Mm-Dd | 2 | 2 | 2 |
21 | YyyyMmDd | 4 | 2 | 2 |
22 | Yyyy/Mm/Dd | 4 | 2 | 2 |
23 | Yyyy:Mm:Dd | 4 | 2 | 2 |
24 | Yyyy-Mm-Dd | 4 | 2 | 2 |
25 | YyDdMm | 2 | 2 | 2 |
26 | Yy/Dd/Mm | 2 | 2 | 2 |
27 | Yy:Dd:Mm | 2 | 2 | 2 |
28 | Yy-Dd-Mm | 2 | 2 | 2 |
29 | YyyyDdMm | 4 | 2 | 2 |
30 | Yyyy/Dd/Mm | 4 | 2 | 2 |
31 | Yyyy:Dd:Mm | 4 | 2 | 2 |
32 | Yyyy-Dd-Mm | 4 | 2 | 2 |
The storage type determines the way the entered date is to be stored in the file. This consists of five storage types and these are as follows:
· As it is
· DoyYy
· DoyYyyy
· YyDoy
· YyyyDoy
As it is | This option stores the date in the same way it is keyed-in. |
DoyYy | This stores the date by converting the date and month into day of the year with two digits YY. |
DoyYyyyy | This stores the date by converting the date and month into day of the year with four digits Yyyy. |
YyDoy | This is exactly similar to that of DoyYy except that Doy and Yy places are interchanged. |
YyyyDoy | This is exactly similar to that of YyyyDoy except that the storage places are interchanged. |
The table provided below shows the input type and different type of storage that takes place under the program.
Date type chosen is DD/MM/YY and the value that is entered is 17/08/95. The following depicts the storage information for each type that is chosen:
As it is | DoyYy | DoyYyyy | YyDoy | YyyyDoy |
---|---|---|---|---|
17/08/95 | 22995 | 2291995 | 95229 | 1995229 |
Base Year: The base year is used primarily for two purposes:
· Validation of year
· Transmigration facility for year-2000The following are the base years that are supported under the program: 1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980,1990, 1995, 2000, 2005 and 2010. The user can also edit the date field in addition to above mentioned base years.
The following paragraph describes the purpose of base year concept provided under the package.Validation of year: Year 99 is taken as the concluding year for two-character year irrespective of base year chosen. In case of four-character year it is 1999 or 2000 depending upon the base year chosen. Hence for minimum value of the year, always base year is taken into account. Validation is performed when user enters the year field with keeping base year as Minimum value.
Transmigration facility for year 2000: By selecting a file where year is of two-character size and setting the output file year to four characters transmigration facility can be accomplished through export option with remarkable ease. Detailed description for the same is provided under the chapter Data Entry.
Number of Decimal(s):
This is the number of decimal characters (digits) that the user can enter under a numeric field.
From the point of COBOL the decimal is only an assumed decimal position. Hence the decimal position from the point of OdEan becomes immaterial except in the case of reformatting which helps for calculation of significant digits. However, if user intends to export the same into xBase format or for the data entry operator to analyze properly for digits after decimal or digits before decimal it may be advisable to use the concept of decimals. Hence, when decimal concept is utilized the user should be cautious while entering the number of character for the decimals. For example if user needs a numeric field of size 10 and decimal point is two digits The appearance of two digits from right on the screen will be as follows:Number of characters: 10 Decimal 2
Value: 1234567890
Visible on the screen: 12345678.90While entering the number of character information for numeric field user should never consider the decimal point for size of field since it is only a virtual entity.
6. Justified:Three types are accepted. "L" indicates Left Justified and "R" indicates Right justified and "C" indicates Center Justification. While entering the data after completion of the field if justification is specified then the fields are shifted Left or Right as specified. The default justification is always left for alphanumeric field and alphabetic field.
7. Duplicate:
8. Mandatory Entry:A "Y" has to be entered to indicate that, this is a field of duplicate type. This actually means that the data contained in this field will consist of information's that are identical or nearly similar to that for all records. This is primarily helpful when the data that is being entered at present record field consists of information exactly similar to that of previous record or somewhere near by that. In case of identical data user will have to enter just
to move into next field and in case of near by that, only those information that needs to be changed, should be changed and moved to next field either by keying in a or a Right-Tab. This newly created data will become part of data for future records. 9. Maximum Value:A "Y" signifies that this field should not be left blank while data entry. This indicates that some valid information has to be entered during the data entry process. If nothing is entered during the data entry process under this field it does not allow the operator to move into the next field.
10. Minimum Value:This is applicable only to Numeric fields. If nothing is entered here, the maximum value that is entire field will be filled with 9s (HIGH VALUES)
This is applicable only to Numeric fields. If nothing is entered here, the entire field will be filled with zeroes (LOW VALUES).
Note: The convention Field Information is used here in order to help data entry operators to easily understand the concepts and also to avoid using technical jargons like schema definition, data dictionary etc. From the point of view of a regular IT professional this is left for his or her own personal interpretations.
- Create / Update Field Information
- Inquire Field Information
- Print Field Information
- Create Source
- Exit
During the field creation process the cursor moves appropriately to its locations under a single field. Maximum number of fields that can be created is 128. The field information entered is displayed in the grid which has been positioned in the bottom portion of the screen. A field present can be updated by selecting that particular field from the grid or by using First, Last, Prev & Next command buttons. The bottom portion of the main screen consists of status line. The first panel in the status line describes the work being done ex.(Field Information, Data Entry etc.), second panel describe the nature of the work ex.(Create / Update, Inquire etc.)which cursor is currently positioned & third panel gives the currently opened file. The Field create/update screen also contains a status line. The first panel in the status line displays the filename & the second panel gives brief description describing the nature of the field attribute on which cursor is currently positioned. In the above displayed figure since the cursor is positioned on name attribute description of name is seen on this line.
Dialog box may appear whenever appropriate. For example when user wants to modify the starting column number other than what is computed and displayed by the program, there will be a need of FILLER field name attribute. The reason behind this is that a record cannot have unidentified hole. Hence it displays a dialog box of the following nature:
In this case if the answer is affirmative (Yes) it goes ahead, Creates a field with name FILLER with number of characters which is equal to number of characters that falls in-between. If a wrong entry is made while creating attribute information it gets back into the same field displaying the appropriate error message.
The record information is actually a structure information that falls into the category of 01 Level under COBOL. All the defined fields are set for 02 level. Refer to Appendix A for example.
FILLER: This is a unique identifier provided under the package. User can introduce any number of FILLER fields. This is the only FIELD Name where duplicate names are allowed. User can incorporate any number of FILLER fields. While trying to create the data the FILLER fields are not displayed and this fields will be converted into spaces while storing the data.
Field Deletion: A field can be deleted by selecting the field and clicking on the Delete Command button Field Insertion: A field can be inserted in between two fields by using Insert command button. When user either Inserts or Deletes a field the field starting column gets automatically adjusted for every field. FILLER: This is a unique identifier provided under the package. User can introduce any number of FILLER fields. This is the only FIELD Name where duplicate names are allowed. User can incorporate any number of FILLER fields. While trying to create the data the FILLER fields are not displayed and this fields will be converted into spaces while storing the data. |