Record layout options


The following subjects related to record layouts are discussed below:

  • Record layout data set
  • Source statement selection
  • Panvalet library record layout data set
  • XREFs for multiple record layout support
  • Segmented records
  • Variable length record layouts
  • Eliminating unwanted fields.

If you specify formatted or vertical formatted mode and do not specify a record layout data set, File-AID will prompt you for the record layout data set name.

Record layout data set

The record layout data set is a data set containing source code record layouts. A record layout data set can be a sequential, partitioned, CA Panvalet (COBOL or PL/I), or CA Librarian (COBOL or PL/I) data set.

A record layout can be a separate data set or member, or can be embedded in a source code data set that also contains program statements, comments, etc. A record layout embedded in a source code data set can be extracted by specifying either line number intervals or level 01 data names. For more information, see Source Statement Selection.

Warning

The record layout must be a valid Assembler, COBOL or PL/I declaration, or the displayed data may not be valid.

PDS processing options can help you tailor your member list display. If no member is specified, a list of members is displayed. You can select a member with the S line command or the SELECT primary command. If the selected member contains multiple record layouts, the first record layout is used. Then, during the edit or browse session, enter the USE primary command to select other record layouts from the List Of Available Record Layouts.

Concatenated record layout libraries

You may also specify a concatenation list to be used in place of the Record Layout data set. In the Record Layout Dataset field, enter a plus sign followed by the member name (+membername) of the member containing the list. For example, if the member RLPROD contains the list to be used, enter +RLPROD instead of the Record layout data set name. You specified the name of the concatenation list in Option 0.1, File-AID system parameters (see Concatenation List DSN).

The concatenation list is used in place of the single Record Layout data set name. If the concatenated libraries contain duplicate member names, File-AID will always select the first occurrence of the member name.

Source Statement Selection

The following figure is displayed when a data set that contains records that are not record layouts is entered in the record layout dataset field.

Source Statement Selection screen

XFAMU384 ------------------- SOURCE STATEMENT SELECTION --- ERROR NEAR LINE 12
COMMAND ===>                                                                   
                                                                              
"CURRENT" source dataset: USERID9.FASAMP.LAYOUTS(COBERR)                  
                                                                              
    For entire member, enter blanks in top two sections.                       
    For partial member, enter line numbers or beginning and ending string.     
                                                                              
Record layout selection by full dataname or full word character string:        
    Beginning string     ===>                                                  
    Ending string        ===>                                                  
                                                                              
Record layout selection by Source Statement line number:                       
    Beginning number     ===>                                                  
    Ending number        ===>                                                  
    Number type          ===>          (Standard ISPF;  COBOL;  or Relative)   
                                                                              
Compiler options:                                                              
    Language             ===> COBOL    (COBOL, PL/1 or ASM)                    
    Starting level nbr   ===> 01       (COBOL or PL/1 only)                    
    Use 48 character set ===> NO       (Yes or No; PL/1 only)                  
                                                                               

Panvalet library record layout data set

When a CA Panvalet library is specified as a record layout data set and no member name is entered, File-AID displays a Panvalet Processing Options screen, as shown in the following figure 43. Use this screen to specify the source members to include in the Record Layout Member List.

Important

The CA Panvalet library support must be installed for File-AID to access Panvalet source libraries.

Panvalet Processing Options screen

File-AID ---------------- Panvalet Processing Options -------------------------
COMMAND ===>

 Dataset:






Specify Member Selection Options (Blank for All Members)
    Member name mask              ===>
    Member name range             ===>            to ===>
    Modification date             ===>            to ===>          (YY/MM/DD)
    Members with language type    ===>
    Members with status of        ===>



    Display member selection list ===>          (Y = Yes; N = No)  

Use ENTER to continue, END to return to dataset specification screen

XREFs for multiple record layout support

XREFs describe how record layouts are to be associated with individual data set records or record segments. If a data set has more than one record type and requires more than a single record layout to describe it, you can create an XREF to automate the record layout selection process.

XREFs are created with the XREF function, option 7, as described in Record-Layout-Cross-Reference-function. XREF layouts are compiled as needed.

An XREF examines the contents of specific locations in each data record or record segment and loads an appropriate record layout (from the record layout data set) based on the record contents. When an XREF is in use, the correct record layout is automatically selected each time a new record or segment is selected.

When a record or record segment cannot be matched against any entry in the XREF member, the data is displayed in hexadecimal.

New record layouts may be selected manually with the USE primary command. When a new record layout is selected, display attributes associated with the previously selected record layout are reinstated when that record layout is again selected.

The display position of a data item at the top of the screen is saved, so that the display returns to that position when the record layout is selected again. If the previously displayed data item is part of a variable record in which there are fewer occurrences than in the new selected record, the data item at the top of the screen may not be the same.

Field display and formatting instructions entered with the DISPLAY primary command are associated with the record layout and recalled each time the record layout is selected.

Segmented records

A segmented record is a single physical record that is divided into multiple logical records called segments. Each segment occupies a different portion (different column position) of the record. There is no overlap of columns between segments.

Each segment can be thought of as a distinct record that is described by a different record layout. The segments do not have a pre-specified location or sequence. In records, segments can occur many times or in any order. Indicators within each record identify which segments are contained in that particular record.

Segmented records are similar to data sets with multiple record types. However, with segmented records, the different record types occur within the same physical record.

Many products use segmented records in their applications. Some applications refer to the segments with a name other than segments, such as headers, trailers, data groups, etc. File-AID calls the first segment in a record the base segment; any segments that follow the base are called subordinate segments.

When File-AID formats segmented records, it displays one segment at a time. The first segment displayed is the base segment, which is formatted according to its layout. The NEXT primary command formats the next subordinate segment. When formatting a subordinate segment, File-AID displays only that segment formatted according to its layout. Successive NEXT commands format the rest of the subordinate segments. Use the PREV command to view the preceding segment.

Example

This example demonstrates how File-AID edits a segmented record. The data set is variable-length and contains segmented records. The base segment is 40 bytes long, resides in columns 1-40, and is formatted by BASE-LAYOUT.

Columns 41 through the end of the record contain the subordinate segments. There are three types of subordinate segments, which are identified by an A, B, or C in the first byte of the segment:

  • Segment A is 10 bytes long and is formatted by layout REC-A.
  • Segment B is 20 bytes long and is formatted by layout REC-B.
  • Segment C is 30 bytes long and is formatted by layout REC-C.

The following figure illustrates the segment sequence for two sample records.

Segmented record layout samples

image2021-5-26_9-45-35.png

The format sequence for the first record, shown in Segmented Record Layout Samples, is as follows:

  1. If the FMT command is not in Format mode, it displays the base segment.
  2. NEXT command displays a type B segment formatted according to layout REC-B.
  3. NEXT command displays a type A segment formatted according to layout REC-A.
  4. NEXT command displays a type C segment formatted according to layout REC-C.
  5. NEXT command displays a type A segment formatted according to layout REC-A.
  6. NEXT command displays a type B segment formatted according to layout REC-B.

When formatting the second record, shown in Segmented Record Layout Samples, the format sequence is as follows:

  1. FORWARD or RIGHT command displays the base segment.
  2. NEXT command displays a type A segment formatted according to layout REC-A
  3. NEXT command displays a type C segment formatted according to layout REC-C
  4. NEXT command displays a type B segment formatted according to layout REC-B
  5. NEXT command displays a type A segment formatted according to layout REC-A
  6. NEXT command displays a type A segment formatted according to layout REC-A.

Record layout cross references (XREFs) are used to identify each segment and tell File-AID which layout to use to format it. See Record-Layout-Cross-Reference-function. Segmented record support is not limited to a single base segment type. Multiple base segment types, and the subordinate segments that pertain to them, can be defined.

Select groups are special XREF entries that define how File-AID identifies a base segment and all the subordinate segments for that record type. Selection of segments can also be accomplished manually with the USE primary command.

Segmented record primary commands are used to edit segmented records. The commands ADD, NEXT, REMOVE, TOP, and USE let you move from segment to segment, while automatically or manually selecting the record layout to use in formatting each segment. You can insert or delete segments while preserving the contents of surrounding segments. See Primary commands for more information on these commands.

Segmented records consist of a BASE layout followed by one or more segment (SEG) layouts. In this scenario, multiple BASE layouts are allowed when INDEPENDENT SEGMENT=N, and each BASE layout has its own set of segments. Segments are exclusively associated with the immediately preceding BASE layout.

For INDEPENDENT SEGMENT records (INDEPENDENT SEGMENTS=Y), the structure consists of a BASE layout followed by one or more segment (SEG) layouts. These SEG layouts are not required to directly follow the BASE layout in the XREF because they are considered independent. In this case, you can associate any segment with any base in the same record. When using INDEPENDENT SEGMENT, you must define all BASE layouts first, followed by all the segments.

Variable length record layouts

Variable length records can be displayed. The value of the objects for every OCCURS DEPENDING ON (COBOL) or REFER (PL/I) clause in the data description determines the length of a variable length record. Record limitations for each object are displayed at the right of the Field Value area. If an object defines the size of more than one variable item, the most restrictive limitations apply. Layouts with OCCURS DEPENDING ON (COBOL) or REFER (PL/I) with target fields past the end of record are supported (previously they resulted in a PS005 OBJECT NOT IN RECORD error).

Eliminating unwanted fields

The DISPLAY command (see DISPLAY (DIS) ) can be used to simplify layout viewing by eliminating unwanted fields from the formatted and vertical formatted edit display. Fields can be eliminated from (or restored to) the display by using the field number. Field selections can be changed as needed throughout a Browse or Edit session. These selections are preserved when switching between formatted and vertical formatted modes and different layouts.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*