Chapter 16. Segmented Record File Layout Automation
In Chapter 14. "Automating Layout Usage with XREF", you learned about the XREF function (option 7) and how to create an XREF member for automating the selection and usage of record layouts for files with different record types. In this chapter, you learn how to set up an XREF for formatting data records when two or more layouts are needed to describe all of the fields in one record. Files containing segmented records are often found in older application systems such as insurance, government, utilities, and banking.16.1 How to Identify Segments in a Segmented Record File
A file with segmented records looks something like this:RECORD DATA CONTENTS +-------------------------------------------------------------- 1 | BASE-LAYOUT | 01 SEGMENT-01 | 02 SEGMENT-02 | 03 SEGMENT-03 | +-------------------------------------------------------------- +--------------------------------------------- 2 | BASE-LAYOUT | 01 SEGMENT-01 | 03 SEGMENT-03 | +--------------------------------------------- +---------------------------------------------- 3 | BASE-LAYOUT | 01 SEGMENT-01 | 02 SEGMENT-02 | +---------------------------------------------- +----------------------------- 4 | BASE-LAYOUT | 01 SEGMENT-01 | +----------------------------- +----------------------------- 5 | BASE-LAYOUT | 02 SEGMENT-02 | +----------------------------- +----------------------------- 6 | BASE-LAYOUT | 03 SEGMENT-03 | +----------------------------- +---------------------------------------------- 7 | BASE-LAYOUT | 02 SEGMENT-02 | 04 SEGMENT-04 | +---------------------------------------------- +-------------------------------------------------------------- 8 | BASE-LAYOUT | 03 SEGMENT-03 | 03 SEGMENT-03 | 01 SEGMENT-01 | +--------------------------------------------------------------In a typical segmented record file, each segment of a record is defined by a unique data structure or record layout. There are also data field(s) in the file that identify the presence of each segment. This data field is referred to as a segment identifier. Sometimes segment identifiers are located in the beginning, or base, portion of each record.
Often, segment identifiers are found within each segment, as a self-identifying field. In still other instances, segments may be chained by having a segment identifier at the end of one segment which identifies the next segment. Regardless of which of these methods applies to your segmented record file, File-AID provides a way for you to define an XREF to automate the selection of a layout as you view each record segment when using Browse or Edit or in other File-AID functions including:
- Browse - formatted display mode: NEXT and FPRINT command
- Edit - formatted display mode: NEXT and FPRINT command
- Print - formatted data record printing
- Selection - formatted selection criteria specification
- Reformat - source record selection
- Compare - formatted field comparison and differences reporting.
Specifying XREF Layout Status
When defining an XREF for segmented files, each layout is defined as either a BASE or a SEGMENT. A BASE layout defines the first portion of each data record. The BASE is then followed by one or more SEGMENT layouts to form a group. Multiple groups (BASE followed by one or more SEGMENTs) are supported where each BASE has a unique data condition.During XREF definition, the SEG line command is used to mark a layout as a SEGMENT.
Understanding the XREF Logic Processing Technique
When browsing or editing a segmented record file using the segmented XREF definition, File-AID examines each record to be formatted and attempts to determine which BASE layout to use for displaying the first part of the record. An information line at the end of the BASE layout indicates additional data in the record like:*** END OF LAYOUT - DATA EXCEEDS LAYOUT BY 107 BYTES ***
Using the NEXT Command to See the Next Segment
When additional data remains to be formatted beyond the end of the BASE, you use the primary command NEXT (available only in formatted mode) to trigger the XREF logic to determine the layout to use to format the next portion of record data. Each SEGMENT layout in the XREF is then examined and tested against the current position in the data record to determine which layout to select to format the next segment of record data.Using the PREV Command to See the Previous Segment
After a NEXT has positioned you to a new segment, you can use the PREV command to return to the previous segment (or BASE). You may go backwards until you have returned to the base layout.Using the TOP Command to Return to the BASE Segment
If the record contains additional segments, invoke the NEXT command repeatedly to trigger the XREF logic to determine each subsequent layout until there is no more data to format in the record. The TOP primary command redisplays the beginning of the file (positioning the file at the BASE segment). Whenever you move to a new record in the formatted mode (scrolling using the RIGHT command, for example), formatting begins with the BASE segment at byte 1.Editing Commands for Segmented Records
When editing a segmented record, you can use the primary commands ADD and REMOVE to insert or delete segments in the current record.Manual Layout Selection
At any time when using an XREF, you can issue the USE command to see a list of all referenced layouts. You can select and use a layout from the list to format the data from any starting point in the record. Refer to the File-AID Reference Summary for syntax of the NEXT, TOP, ADD, REMOVE, PREV, and USE commands.16.2 Review the Sample Segmented Record XREF
In this chapter you review the sample XREF member, SEGFILE, in your sample XREF dataset, FASAMP.XREF. The SEGFILE member is already set up to format the sample file FASAMP.SEGFILE. It contains a BASE and several potential segments. Each segment is identified by a segment type indicator field located at the second data byte within each segment. Table 16-1 summarizes the SEGFILE XREF definition:Table 16-1. SEGFILE XREF Definition
Layout Member | 01 Level Name | Status | Record-Type Field - Value |
---|---|---|---|
SEGRECS | INS-BASE-FILE | BASE | (always used) |
SEGRECS | CLI-BOAT-DATA | SEGMENT | BOAT-RECORD-TYPE-01 |
SEGRECS | CLI-BUSINESS-DATA | SEGMENT | BUSINESS-RECORD-TYPE-02 |
SEGRECS | CLI-CAR-DATA | SEGMENT | CAR-RECORD-TYPE-03 |
SEGRECS | CLI-HOME-DATA | SEGMENT | HOME-RECORD-TYPE-04 |
SEGRECS | CLI-LIFE-DATA | SEGMENT | LIFE-RECORD-TYP-05 |
16.3 Viewing an Existing XREF Member
You access the XREF function and select sample XREF member SEGFILE.Figure 16-1. Record Layout Cross Reference (XREF) Function Entry Screen
+------------------------------------------------------------------------------- | File-AID -------------- Record Layout Cross Reference -----------------------| | COMMAND ===> | | | | Specify Cross Reference Dataset to be Created or Edited: | | XREF dataset name ===> FASAMP.XREF | | Member name ===> SEGFILE (Blank or pattern for member list) | | | | Specify Record Layout Information: | | Record layout dataset ===> FASAMP.LAYOUTS | | | | | | | | | | | | | | | | | | | | -------------------------------------------------------------------------------| | This function creates and maintains existing File-AID Record Layout Cross | | References. These XREF's are used to match record layouts to data records in | | File-AID functions that use formatting. | | | +-------------------------------------------------------------------------------
Steps:
- From the File-AID Primary Option Menu (not shown here), select option 7 (XREF).
- Press <Enter>. File-AID displays the Record Layout Cross Reference screen as illustrated in Figure 16-1.
- Type FASAMP.XREF in the XREF dataset name field under the Specify Cross Reference Dataset information section.
- Type SEGFILE in the Member name field
- Type FASAMP.LAYOUTS in the Record layout dataset field.
- Press <Enter>. File-AID displays the Define XREF screen as illustrated in Figure 16-2.
16.4 Using the VIEW Command
The Define XREF screen (Figure 16-2) shows the entries already established for formatting the segmented record file FASAMP.SEGFILE. Notice the status of BASE for the first layout (INS-BASE-FILE) and a status of SEGMENT for all other layout usages.In order to see all of the conditions that have been specified for all layout references, you can use the primary command, VIEW, to see a list of the XREF control statements for this XREF member.
Figure 16-2. Define XREF Screen (VIEW Command)
+------------------------------------------------------------------------------- | File-AID ----- Define XREF - SEGFILE ------------------------ ROW 1 TO 6 OF 6 | | COMMAND ===> VIEW SCROLL ===> PAGE | | XR105-Valid line CMDS: C/M, B/A, I, R, D, EX, S, SF, SU, DEF, BAS, SEG | | Member list description ===> SEGFILE XREF | | | | Long ===> FILE CONTAINS INS-BASE FOLLOWED BY ANY NUMBER OF ADDITIONAL | | Description ===> TRAILER SEGMENTS IN ANY ORDER - BOAT CAR BUSINESS ETC. | | | | Generated filler length ===> 0 (0 to suppress filler) | | | | Cmd Member Beginning Data-Name/Line Number Description Status | | --- ---------- ------------------------------ --------------- ----------------| | ___ SEGRECS INS-BASE-FILE BASE | | ___ SEGRECS CLI-BOAT-DATA SEGMENT | | ___ SEGRECS CLI-BUSINESS-DATA SEGMENT | | ___ SEGRECS CLI-CAR-DATA SEGMENT | | ___ SEGRECS CLI-HOME-DATA SEGMENT | | ___ SEGRECS CLI-LIFE-DATA SEGMENT | | ************************** END OF SELECTION CRITERIA **************************| | | | | | | | | | | +-------------------------------------------------------------------------------
Steps:
- Type VIEW in the COMMAND field.
- Press <Enter>. File-AID displays the View Criteria screen as illustrated in Figure 16-3.
16.5 Browsing the XREF View Criteria
XREF criteria are stored internally in keyword form. The View Criteria screen lets you examine the internal format. You can scroll up and down to see all specified conditions.Figure 16-3. XREF Function - View Criteria Screen
+------------------------------------------------------------------------------- | File-AID ------------------------ View Criteria ----------- ROW 1 TO 20 OF 60 | | COMMAND ===> SCROLL ===> PAGE | | Use END to exit View Display | | | | ******************************* TOP OF CRITERIA ***************************** | | DEFINE BLOCKS=XREF, | | | | DESCRIPTION =SEGFILE XREF, | | DESCRIPTION1=FILE CONTAINS INS-BASE FOLLOWED BY ANY NUMBER OF ADDITIONAL, | | DESCRIPTION2=TRAILER SEGMENTS IN ANY ORDER - BOAT CAR BUSINESS ETC., | | | | XREF_DSNAME=FASAMP.XREF, | | XREF_MBRNAME=SEGFILE, | | | | LAYOUT_DSNAME=XXXXXXX.FASAMP.LAYOUTS | | | | SELECT SET=1,LAYOUT=INS-BASE-FILE, | | LAYOUT_MBRNAME=SEGRECS, | | LAYOUT_TYPE=BASE | | IF | | FIELD_NAME=CLI-NUMBER, | | POSITION=1,LENGTH=5,OPERATOR=NE, | | TYPE=T,VALUE=XXXXX | | | +-------------------------------------------------------------------------------
Steps:
- Use the scroll PF keys (PF8 DOWN, PF7 UP) to review the criteria for the SEGFILE member.
- Notice that the POSITION value for each SEGMENT is 2 meaning the 2nd byte of data at the beginning of each segment.
- Use the END command THREE TIMES to return to the File-AID Primary Option Menu.
More About Segment Definitions
- If the presence of a segment is indicated by a field in the base, the XREF must use Unformatted criteria and a Location of *n (asterisk "n") where n is the actual data byte in the record where the segment presence indicator is located. This notation only supports 0 or 1 occurrence of the segment. The order of SEGMENTS in the XREF determines the order of formatting segments of this type. An absolute (*n) segment, once used to format a portion of the record is marked as "used" and is not selected again until you leave the current record and view a different record.
- Generated filler is not permitted with SEGMENTS.
16.6 Using the XREF to Browse a Segmented Record File
You now use the SEGFILE member of your XREF dataset to browse the SEGFILE segmented record data file using different layouts for each segment of a record.Figure 16-4. Using the XREF for Browsing a Data File With Segmented Records
+------------------------------------------------------------------------------- | File-AID -------------- Browse - Dataset Specification ----------------------| | COMMAND ===> | | | | Browse Mode ===> F (F=Formatted; C=Char; V=Vertical) | | | | Specify Browse Information: | | Browse dataset ===> FASAMP.SEGFILE | | Member ===> (Blank or pattern for member list) | | Volume serial ===> (If dataset is not cataloged) | | | | | | Specify Record Layout and XREF Information: | | Record layout usage ===> X (S = Single; X = XREF; N = None) | | Record layout dataset ===> FASAMP.LAYOUTS | | Member ===> ________ (Blank or pattern for member list) | | XREF dataset ===> FASAMP.XREF | | Member ===> SEGFILE (Blank or pattern for member list) | | | | Specify Selection Criteria Information: (E=Use existing; M=Modify existing | | Selection criteria usage ===> N T=Create temporary; N=None) | | Selection criteria DSN ===> | | Member ===> (Blank or pattern for member list) | | | | | +-------------------------------------------------------------------------------
Steps:
- Type 1 in the OPTION field of the Primary Option Menu (not shown).
- Press <Enter>. File-AID displays the Browse - Dataset Specification screen, as illustrated in Figure 16-4.
- Type F (Formatted) in the Browse Mode field.
- Type FASAMP.SEGFILE in the Browse dataset field.
- Type X in the Record layout usage field.
- Type FASAMP.LAYOUTS in the Record layout dataset field.
- Blank out the record layout member field.
You do not need to specify the record layout member when you are using an
XREF, because the record layout member is already defined in the XREF dataset.
- Verify the XREF dataset is FASAMP.XREF.
- Verify the XREF member is SEGFILE.
- Make sure the value in the Selection criteria usage field is N.
- Press <Enter>.
16.7 Viewing the Next Segment Using the NEXT Command
File-AID displays the first record of the SEGFILE formatted with the INS-BASE-FILE (BASE) layout. File-AID displays an information line at the end of the layout, DATA EXCEEDS LAYOUT, indicating that additional segment(s) are present as illustrated in Figure 16-5.To view the segment following the current segment (in this case, the base segment), issue the NEXT command.
Figure 16-5. Browsing the Segmented File - FASAMP.SEGFILE
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ------------------- INVALID COMMAND | | COMMAND ===> NEXT SCROLL ===> PAGE | | RECORD: 1 INS-BASE-FILE LENGTH: 231 | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+---2----+---3----+---4| | 1 CLI-NUMBER 1 09876 | | 2 FILLER 6 | | 3 CLI-FIRST-NAME 7 GEORGE | | 4 CLI-MID-INIT 17 C | | 5 CLI-LAST-NAME 18 SCOTT | | 6 CLI-OCCUPATION 33 ACTOR | | 7 CLI-SMOKER 53 N | | 8 CLI-PHONE-NUMBER 54 9005680284 | | 9 CLI-ADDRESS SYNC 64 | | 10 CLI-STREET 64 54 MOVIE RD | | 11 CLI-CITY 79 LOS ANGELES | | 12 CLI-STATE 94 CA | | 13 CLI-ZIP-CODE 96 510807054 | | 14 FILLER 105 | | ************* END OF LAYOUT - DATA EXCEEDS LAYOUT BY 107 BYTES ****************| | | +-------------------------------------------------------------------------------
Steps:
- Type NEXT in the COMMAND field.
- Press <Enter>.
16.7.1 Understanding NEXT Command Processing
When the NEXT command is issued, File-AID examines the criteria stored in the XREF member and tries to find a matching SEGMENT.As shown in Figure 16-6, the next segment of record data for record 1 of the SEGFILE is defined by the CLI-BOAT-DATA layout.
Notice that the "record type field", BOAT-RECORD-TYPE-01, contains a value of "01". This is the condition specified in the XREF that is used to determine that the layout for this segment is in fact the CLI-BOAT-DATA layout. The second data byte of each segment contains the "segment identifier" used to determine which layout to select for this portion of the record.
Notice that the column offset of the CLI-BOAT-DATA layout has the first field (FILLER) starting at location 125. When formatting segmented records it is a good idea to set up your formatted display to SHOW OFFSET and OFFSET COLUMN so that you can be sure of where in the record you are currently positioned. In this example, the CLI-BOAT-DATA segment is the second and last segment of data in this record as indicated by the information line at the end of the layout:
*** BOTTOM OF DATA ***Figure 16-6. NEXT Command Results. Displaying the CLI-BOAT-DATA Segment.
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ----------------------- COL 125 231| | COMMAND ===> SCROLL ===> PAGE| | RECORD: 1 CLI-BOAT-DATA LENGTH: 231 | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+---2----+---3----+---4| | 1 FILLER 125 | | 2 BOAT-RECORD-TYPE-01 126 01 | | 3 BOAT-DATE-INSURED 128 071973 | | 4 BOAT-REGISTER-NO 134 91380 | | 5 BOAT-INSURED-AMT 139 75000.00 | | 6 BOAT-DOCK-NO 143 300 | | 7 BOAT-MARINA-NAME 146 BLUE WATERS | | 8 BOAT-NAME 176 | | 9 FILLER 196 | | ****************************** BOTTOM OF DATA *********************************| | | +-------------------------------------------------------------------------------Notes:
- If you wish to return to the previously viewed segment, use the PREV command.
- Another way to issue the NEXT command is to assign the command NEXT to a PF key. Use the KEYS primary command to access your PF key settings to review or change your PF key command defaults.
16.8 Jumping to Another Record with the LR (Locate Record) Command
You now move to record 13 by using the command: LR 13. Record 13 is a record that contains many segments and gives you a better idea of the functioning of the NEXT command and the logic defined in the XREF.Figure 16-7. Move to record 13 - LR 13 Command
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ------------ | | COMMAND ===> LR 13 | | RECORD: 1 CLI-BOAT-DATA | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+ | | 1 FILLER 125 | | 2 BOAT-RECORD-TYPE-01 126 01 | | 3 BOAT-DATE-INSURED 128 071973 | +-------------------------------------------------------------------------------
Steps:
- Type LR 13 in the COMMAND field.
- Press <Enter>.
Result of LR 13
File-AID displays the BASE (layout INS-BASE-FILE) for record 13, as illustrated in Figure 16-8.Notice that the information line at the end of the layout, DATA EXCEEDS LAYOUT, indicates that 555 bytes of additional segment data still remains to be formatted.
Figure 16-8. Browsing Record 13 (BASE Segment)
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ------------------------- COL 1 124| | COMMAND ===> SCROLL ===> PAGE| | RECORD: 13 INS-BASE-FILE LENGTH: 679 | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+---2----+---3----+---4| | 1 CLI-NUMBER 1 67890 | | 2 FILLER 6 | | 3 CLI-FIRST-NAME 7 THOMAS | | 4 CLI-MID-INIT 17 L | | 5 CLI-LAST-NAME 18 PAINE | | 6 CLI-OCCUPATION 33 WRITER | | 7 CLI-SMOKER 53 N | | 8 CLI-PHONE-NUMBER 54 4159803458 | | 9 CLI-ADDRESS SYNC 64 | | 10 CLI-STREET 64 17 PEN LANE | | 11 CLI-CITY 79 TALAHASSEE | | 12 CLI-STATE 94 FL | | 13 CLI-ZIP-CODE 96 80973 | | 14 FILLER 105 | | ************* END OF LAYOUT - DATA EXCEEDS LAYOUT BY 555 BYTES ****************| | | +-------------------------------------------------------------------------------
16.9 Keeping a Command On the Command Line with & (Ampersand)
Most File-AID commands are cleared from the command line after processing. However, if you precede a command with an & (ampersand), the command remains on the command line.In this example, you enter the &NEXT command to leave the command &NEXT on the command line so that you only need to press <Enter> to view each subsequent segment.
Figure 16-9. Using & (ampersand) to Retain Command. The &NEXT Command.
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ------------ | | COMMAND ===> &NEXT | | RECORD: 13 INS-BASE-FILE | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+ | | 1 CLI-NUMBER 1 67890 | +-------------------------------------------------------------------------------
Steps:
- Type &NEXT in the COMMAND field.
- Press <Enter>.
16.9.1 Continue Reviewing Segments in Record 13
File-AID automatically displays the correct layout (CLI-BOAT-DATA) for the next segment of record 13 as illustrated in Figure 16-10.The &NEXT command remains on the command line so that you need only press <Enter> to continue to examine segments in record 13. The information line (END OF LAYOUT) now shows that 448 bytes of record data follow the current segment.
Step:
- Press <Enter>.
Figure 16-10. Browsing Record 13. CLI-BOAT-DATA Segment.
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ----------------------- COL 125 231| | COMMAND ===> &NEXT SCROLL ===> PAGE | | RECORD: 13 CLI-BOAT-DATA LENGTH: 679 | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+---2----+---3----+---4| | 1 FILLER 125 | | 2 BOAT-RECORD-TYPE-01 126 01 | | 3 BOAT-DATE-INSURED 128 021194 | | 4 BOAT-REGISTER-NO 134 70392 | | 5 BOAT-INSURED-AMT 139 6000.00 | | 6 BOAT-DOCK-NO 143 999 | | 7 BOAT-MARINA-NAME 146 THOMAS MARINA | | 8 BOAT-NAME 176 ALMANAC | | 9 FILLER 196 | | ************* END OF LAYOUT - DATA EXCEEDS LAYOUT BY 448 BYTES ****************| +-------------------------------------------------------------------------------
16.9.2 Continue Reviewing Segments
File-AID automatically displays the correct layout (CLI-BUSINESS-DATA) for the next segment of record data for record number 13 as illustrated in Figure 16-11.As before, since &NEXT remains on the COMMAND line, just press <Enter> to continue your review of segments. If you wish to return to the previously viewed segment, use the PREV command.
Figure 16-11. Browsing Record 13. CLI-BUSINESS-DATA Segment.
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ----------------------- COL 232 356| | COMMAND ===> &NEXT SCROLL ===> PAGE | | RECORD: 13 CLI-BUSINESS-DATA LENGTH: 679 | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+---2----+---3----+---4| | 1 FILLER 232 | | 2 BUSINESS-RECORD-TYPE-02 233 02 | | 3 BUS-DATE-INSURED 235 021194 | | 4 BUS-NAME 241 WRITERS CAMP | | 5 BUS-INSURED-AMT 271 3000.00 | | 6 BUS-ADDRESS 277 32 BOOK STREET | | 7 BUS-PHONE-NUMBER 307 4159809852 | | 8 FILLER 317 | | ************* END OF LAYOUT - DATA EXCEEDS LAYOUT BY 323 BYTES ****************| +-------------------------------------------------------------------------------
Step:
- Press <Enter>. Note: If you wish to return to the previously viewed segment, use the PREV command.
16.9.3 Continue Reviewing Segments
File-AID automatically displays the correct layout (CLI-CAR-DATA) for the next segment of record data for record number 13 as illustrated in Figure 16-12.Figure 16-12. Browsing Record 13. CLI-CAR-DATA Segment.
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ----------------------- COL 357 499| | COMMAND ===> &NEXT SCROLL ===> PAGE | | RECORD: 13 CLI-CAR-DATA LENGTH: 679 | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+---2----+---3----+---4| | 1 FILLER 357 | | 2 CAR-RECORD-TYPE-03 358 03 | | 3 CAR-DATE-INSURED 360 021194 | | 4 CAR-VEHICLE-NUMBER 366 2225439047 | | 5 CAR-INSURED-AMT 376 100.00 | | 6 CAR-MFG 380 FORD | | 7 CAR-STYLE 390 MODEL T | | 8 CAR-OWNER-NAME 420 THOMAS PAINE | | 9 FILLER 460 | | ************* END OF LAYOUT - DATA EXCEEDS LAYOUT BY 180 BYTES ****************| | | +-------------------------------------------------------------------------------
Step:
- To view the next segment, press <Enter>.
16.9.4 Continue Reviewing Segments
File-AID displays the next segment of record data for record number 13. The next segment is the CLI-HOME-DATA segment as illustrated in Figure 16-13.Figure 16-13. Browsing Record 13. CLI-HOME-DATA Segment.
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ----------------------- COL 500 578| | COMMAND ===> &NEXT SCROLL ===> PAGE | | RECORD: 13 CLI-HOME-DATA LENGTH: 679 | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+---2----+---3----+---4| | 1 FILLER 500 | | 2 HOME-RECORD-TYPE-04 501 04 | | 3 HOME-DATE-INSURED 503 021194 | | 4 HOME-ADDRESS 509 0000000032 | | 5 HOME-PROPERTY-AMT 519 14000.00 | | 6 HOME-CONTENTS-AMT 524 3500.00 | | 7 HOME-STYLE 529 COLONIAL | | 8 FILLER 539 | | ************* END OF LAYOUT - DATA EXCEEDS LAYOUT BY 101 BYTES ****************| | | +-------------------------------------------------------------------------------
Step:
- To view the next segment, press <Enter>.
16.9.5 Viewing the Last Segment
File-AID displays the next segment of record data for record number 13. The next segment is the CLI-LIFE-DATA segment as illustrated in Figure 16-14.The information line at the bottom of the layout changes to read:
**** BOTTOM OF DATA ****This indicates that the last byte of data has been formatted. If you try to use the NEXT command, you receive an error message like: ALREADY AT LAST SEGMENT.
The PREV command lets you back up to the segment preceding the currently displayed segment. The TOP command displays the base layout at data byte 1.
Figure 16-14. Browsing Record 13. CLI-LIFE-DATA Segment (BOTTOM OF DATA Label).
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ----------------------- COL 579 679| | COMMAND ===> RETURN SCROLL ===> PAGE | | RECORD: 13 CLI-LIFE-DATA LENGTH: 679 | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+---2----+---3----+---4| | 1 FILLER 579 | | 2 LIFE-RECORD-TYP-05 580 05 | | 3 LIFE-POLICY-NUMBER 582 325476 | | 4 LIFE-DATE-INSURED 588 021194 | | 5 LIFE-INSURED-NAME 594 THOMAS PAINE SR | | 6 LIFE-INSURED-AMT 634 40000.00 | | 7 LIFE-BENE-NAME 640 MRS. PAINE | | 8 FILLER 670 | | ****************************** BOTTOM OF DATA *********************************| | | +-------------------------------------------------------------------------------
16.10 Exiting File-AID with the RETURN Command
You may return to this example to browse the FASAMP.SEGFILE whenever you need to review the segmented XREF function. Try using Edit and the ADD and REMOVE commands to learn more about inserting and deleting segments of a segmented record.Look at the data records in CHAR format and see if you can understand where each segment is in the data record as you scroll right and left and up and down.
This is the end of this chapter.
Use the RETURN command to exit File-AID.
Figure 16-15. Using RETURN to Exit File-AID
+------------------------------------------------------------------------------- | FILE-AID - BROWSE - USERID9.FASAMP.SEGFILE ------------ | | COMMAND ===> RETURN | | RECORD: 13 CLI-LIFE-DATA | | ---- FIELD NUMBER/NAME ------ COLUMNS- ----+---1----+ | | 1 FILLER 579 | | 2 LIFE-RECORD-TYP-05 580 05 | +-------------------------------------------------------------------------------
Steps:
- Type RETURN in the COMMAND field.
- Press <Enter>.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.