Browse

Overview

The IOF Browse panel is used to review sysout data sets. It can be invoked from the IOF Job Summary display for a sysout data set or from the Job List Menu for an entire job. IOF browse is very similar to ISPF browse, and most of the commands are identical to ISPF browse commands.

The IOF Browse panel displays data that was generated to be printed. Printed data contains printer control information such as top-of-form and blank line skips. Printed position is typically described with page and line numbers.

IOF Browse preserves the page orientation of line mode sysout data. Printer control characters are honored so that data is presented on the screen as it would appear on paper. IOF keeps track of the page and line number where each record is destined to be printed and displays this information on the browse panel.

-------------------------------------------------------------------------------- BROWSE - SYSPRINT WEEKLY PRINT - Page 1 Line 1 Cols 1-80 COMMAND ===> SCROLL ===> CURSOR ******************************** TOP OF DATA ********************************* Weekly Sales Report Summary Page 1 Week Ending January 18, 1997 Region Office Total Sales New England Boston 221,433.97 New England Hartford 34,977.00 New England ** Total ** 256,410.97 New York Albany 45,932.44 New York Buffalo 23,439.19 New York New York 1,434,912.56 New York Rochester 72,545.14 New York Syracuse 33,167.99 New York ** Total ** 1,608,997.32

The top line of the IOF Browse panel shows:


Browse Scroll Types

Because of the page orientation of the data being browsed, IOF scroll types are slightly different than ISPF types. The IOF scroll types are:


IOF scroll types can be set temporarily in the SCROLL field at the top of the browse screen. To permanently set a scroll type in the IOF profile for use across IOF sessions, it must be set in the User Profile Options panel as discussed in Chapter 6.

Primary Commands

The basic IOF Browse primary commands are identical to ISPF browse commands. IOF Browse does have some additional facilities and small differences that are noted below.

Up or Down

Scroll the browse window up or down. The up and down commands are normally associated with PF Keys 7 and 8, or 19 and 20.

Syntax

Up / Down [ nnn ] [ Max / Pages / Lines / RECords / DS ]

nnn. Number of rows, printed pages, lines, records or data sets to scroll up or down. If not specified then scroll will be based on the current scroll type.

Max. Scroll up to the top of the data set or down to the bottom.

Pages. Scroll the specified number of printed pages.

Lines. Scroll the specified number of lines. Note that scrolling by lines will not scroll past the current printed page boundary unless you scroll by more than the current screen size.

RECords. Scroll the specified number of records without regard to page boundaries.

DS. Scroll up or down the specified number of data sets.

Examples

         UP MAX                     (or U M to go to the top of data set)
         D 3 DS                     (skip down three data sets)
         D 50 P                     (skip down 50 printed pages)

Top or Bottom

Scroll to the top or bottom of the data being browsed.

Syntax

TOP / BOTtom

Right or Left

Scroll the browse window right and left.

Syntax

RIght / LEft [ nnn / Max ]

nnn. The number of columns to scroll.

Max. Scroll to the right or left margin.

Select Next Data Set in Job

Skip to the next data set in the job. This is identical to DOWN 1 DS.

Syntax

NExt

Select Previous Data Set in Job

Skip to the previous data set in the job. This is identical to UP 1 DS.

Syntax

PREVious

Skip Directly to Specific Page, Line, Record, or Data Set

Skip directly to a specific page, or a specific line on the current page, or a specific record or a specific data set.

Syntax

Page / LINe / RECord / SEGment nnn

nnn. The page number, line number on the page, record number, or segment (data set).

Examples

            P20             (jump to page 20)
            LIN47           (jump to line 47 on the current page)

Define a Label

Establish a label (or IOF index entry).

Syntax

.label [comments]

comments. Optional comments that will appear in the data index.

Locate a Previously Defined Label

Reposition to a previously defined label.

Syntax

Locate label

label. The name of a previously identified label.

Find

Find a string in the data set. Find is like ISPF find with two significant exceptions. The ALL operand of FIND produces theIOF Find All Menuel of all detected occurrences, and IOF find is limited by the find limit value that controls the number of records that will be searched with an individual FIND command.

Syntax

Find string [ FIRST / LAST / NEXT / PREV ]

[ WORD / PREFIX / SUFFIX ] [ ALL ]

[ beg-col] [end-col}


          string.  The string to be found which can be specified as:
                 - any number of alphanumeric characters
                 - 'quoted string which can contain blanks'
                 - "double quoted string which can contain quotes"
                 - X'hex string'
                 - C'case sensitive text string'
                 - P'picture string' (like ISPF)

FIRST/LAST/NEXT/PREV. Find the first, last, next or previous occurrence of the string in the data set.

WORD/PREFIX/SUFFIX. The string must be delimited on both ends if WORD, the left if PREFIX, and the right if SUFFIX. Acceptable delimiter characters are: left margin, right margin, space and the special characters comma, period, open parenthesis, close parenthesis, quote and double quote.

ALL. All occurrences of the string should be found and displayed on the IOF Find All Menu. See "The Find All Panel" on page ? for more information about FIND ALL.

beg-col. The column number to begin the search.

end-col. The column number to end the search.

Repeat Find

Repeat the last find command. RFIND is normally stored on PF Key 5 or PF Key 17.

Syntax

RFIND

Set a Find Limit

Limit the find command to a specified number of records. The find limit value is stored in the profile for use in subsequent IOF sessions.

Syntax

FINDLIM nnn

nnn. The number of records to be searched on a find command before the FINDLIM error condition is raised. The find can be continued from the point it was interrupted by entering the RFIND command.

Repeat Find in Next Data Set

Repeat the last find command in the next data set.

Syntax

NF

Repeat Find in Previous Data Set

Repeat the last find command in the previous data set.

Syntax

PRF

Snap Data to Target Data Set

Snap a copy of part or all of the current data set to a target data set. The target output data set can be explicitly defined by an SD or SS command, or can be defaulted.

Syntax

SNAP [ nnn [ Lines / Pages / Records ] ] [ ALL ]

nnn. The number of lines or pages to copy, beginning at the top of the current screen. If nnn is not specified, then the data displayed on the current screen is copied.

Lines. Snap nnn lines or until the bottom of the page, whichever comes first. If condense is on, then ignore the check for bottom of page.

Pages. Snap nnn printed pages.

Records. Snap nnn records, ignoring printed page boundaries. Records is the default if neither lines, pages nor records is specified.

ALL. Snap entire data set.

Define a Sysout Snap Target Data Set (SS)

Explicitly define a sysout target data set for snap.

Syntax

SS [ sysout characteristics ]

[ sysout characteristics ]. Any valid sysout characteristics may be specified directly on the SS command. If no parameters are specified then an SS interface panel is displayed to assist in defining the desired sysout characteristics. See Chapter 16 for more information about SS.

Define an MVS Snap Target Data Set

Explicitly define a non-vsam MVS target data set for snap.

Syntax

SD [ MVS data set characteristics ]

[ MVS data set characteristics ]. Any valid non-VSAM characteristics can be specified directly on the SD command. If no parameters are specified, then an SD interface panel is displayed to assist in defining the desired data set characteristics. See Chapter 16 for more information about SD.

Close the Target Snap Data Set

Explicitly close a target snap data set. Note that the snap data set will automatically be closed when the Job Summary for the job is terminated.

Syntax

SNAPCLOS

Edit All or Part of a Sysout Data Set

Copy all or part of the data set being browsed to a temporary data set and invoke the ISPF editor to edit the copy (ISPF only). The editor CREATE or REPLACE commands can be used to save the edited copy.

Syntax

EDit [nnn]

nnn. Number of records to edit beginning at the top of the current screen. If not specified, then the whole data set being browsed will be edited if sufficient temporary space is available.

Request Horizontal Compression

Enable or disable horizontal compression. When compress is on, then multiple blank spaces are removed from each displayed line so that more data can be displayed on each row of the screen.

Syntax

COMPRESS [ON / OFF ]

ON. Enable horizontal compression.

OFF. Disable horizontal compression.

Request Vertical Compression

Enable or disable vertical compression. IOF printed page orientation is disabled when vertical compression is requested.

Syntax

CONDENSE [ ON / OFF ]

ON. Enable vertical compression and disable IOF page orientation.

OFF. Disable vertical compression.

Display Columns Heading

Display a columns heading line on the screen.

Syntax

COLS

Remove Columns Heading

Remove columns heading line from the screen.

Syntax

RESET

Line Folding

Enable or disable line folding. When line folding is enabled, each line of output is folded at the right boundary of the screen and displayed as two lines.

Syntax

FOLD [ ON / OFF ]

ON. Enable line folding.

OFF. Disable line folding.

Hexadecimal Display

Enable or disable hexadecimal display mode.

Syntax

HEX [ ON / OFF ]

ON. Enable hexadecimal display mode.

OFF. Disable hexadecimal display mode.

Display Carriage Control

Enable or disable the display of printer carriage control information.

Syntax

DISPLAY [ CC / NOCC ]

CC. Enable display of printer carriage control characters.

NOCC. Disable printer carriage control character display.

Lookup Text in BookManager or Other Reference System

Pass the word under the cursor to the IBM BookManager (or other text reference system) for lookup. This is normally used to lookup error messages. IOF isolates the word under the cursor and passes it to the text reference system as a parm. This command is available only under ISPF. It will not function from TSO READY or IOF/CICS.

Syntax

TEXTREF

Set Text Reference Shelf Name

Define the personal bookshelf name to be used by the TEXTREF command when the system default shelf name is not wanted.

Syntax

SHELF shelf_name

shelf_name. The bookshelf name to be used. The name is saved in the user's profile.

Add a Block Header to the Target Snap Data Set

Explodes text to block letters and writes it to the previously defined target snap data set. See Chapter 16 for a complete description of the SNAPHDR command.

Add Text to the Target Snap Data Set

Adds carriage control and text to the target snap data set. See Chapter 16 for a complete description of the SNAPTEXT command.

Build a Customized Index

Build a customized index to the data set being browsed. Special indexing facilities are available for assembler listings, SYSUDUMP data sets, and CICS transaction dumps. When running under ISPF, a full-screen panel is presented to assist in defining the way the data should be indexed. The BI command is not available under IOF/CICS.

Syntax

BI

Save Internal Browse Index

Save the internal browse index into a disk data set. The saved index can be used later to restart this browse session.

You may have noticed that once you have read to the bottom of a large sysout data set you can then very quickly position to any point, no matter how large the data set. This is because the internal browse index contains pointers to all sysout data that has already been referenced in this browse session.

The internal browse index also contains any LOCATE symbols that you have defined during the browse session. The SAVEINDX (SI) command allows you to save all of that information in a disk data set so that you can easily restart the browse session later with all of the saved index information.

Once you have entered an SI command, you can terminate your browse session and go on about your business. At any time later you can enter V beside the same job on the Job List and your old browse session will be restarted with all of the saved index information.

You will be able to immediately position to any location in the sysout data set and you will have available any LOCATE symbols that you defined in the previous browse session.

The easiest way to use save index is to enter the SI command with no operands.

Syntax

SaveIndex [ DA (index-dsn ) ] [ CMD ('command-string') ] [ VOL ( volume ) ] [ UNIT ( unit ) ]

DA(index-dsn). Explicit index data set name. If no data set name is specified, a default data set name of jobname.jobid. IOFINDEX is used with your data set prefix as the high level. Jobname and jobid are taken from the job for which the index is being saved.

CMD('command-string'). String of IOF commands that should be issued whenever the browse session is restarted with a VIEW command.

VOL(vol). Volume Serial.

UNIT(unit). I/O unit Type.

Examples

         SI
         SI CMD('INDEX')
         SI DA(WORK.IOFINDEX)
         SI DA('SYSIOF.CICS.STC01255.IOFINDEX')  CMD('D M.RI 10')

Display IOF Indices

Display an IOF data index or list of indices. Indices must have previously been built by the label command or a define index command. See Indexing Tutorial below for a tutorial of IOF indexing facilities.

Syntax

INDex [ /indexname ]

/indexname. If specified, then only the named index will be displayed. If not specified and multiple indices are present, then the IOF Data Indices Menu listing all indices will be displayed.

Define an IOF Data Index

Define an index. See Indexing Tutorial below for a full description of IOF data indexing.

Syntax

DEFINDEX /indexname [title]

/indexname. The one to eight character index name. You place entries in this index by specifying this name in DEFENTRY commands.

title. The index description for display on the IOF Data Indices Menu (maximum of 50 characters).

Examples

       DEFINDEX /DEPT Departmental Report Index
       DEFINDEX /SALES Sales report index by region and state 

Define an Entry in an IOF Data Index

Define an index entry. This command associates a label with the sysout record that is currently displayed on the top of the screen and adds the label to one or more previously defined indices.

Syntax

DEFENTRY [label] /index1 [ /index2 ] [ description ]

label. One to eight character index label name to be associated with the current sysout record. This label can subsequently be used on LOCATE commands.

/index1. The name of an index to which this entry is to be added. This name should match the name of a previously defined index (see DEFINDEX above).

/index2. Another index name. A maximum of eight index names can be included. The entry will added to each of the named indices.

description. The 1-to-8 character index entry description that will be displayed in the data index.

Examples

            DEFENTRY /DEPT Purchasing Department
            DEFENTRY calif /sales/calif State of California Summary

Define a Field

Define a field for use in defined conditions, and as a variable in DEFENTRY or SETVAR statements. This command will primarily be used in IOF clists and execs. See Chapter 18 for a full description of IOF clist and REXX facilities.

Syntax

DEFFLD fldname COLS ( begcol */endcol )

COLS ( b2 */e2 ) ... COLS ( bn */en )

fldname. The name of the field being defined.

COLS(begcol */endcol). The beginning and ending column number for the segment of each sysout record that is to be associated with this field name. If an asterisk ( * ) is specified as the end column, then the end column is assumed to be the right margin.

Multiple column definitions may be included in a field definition.

Examples

             DEFFLD  MSGNBR COLS(57 63)
             DEFFLD  C_10_AND_72  COLS(10 10) COLS(72 72)

Several fields are pre-defined and always available for use:

        LINENUM          The current line number on the page.
        PAGENUM          The current page number.
        RECDNUM          The current record number.
        RECDLEN          The length of the current record.

Define a Condition

Define a SCAN condition. This command will primarily be used by IOF clists and execs. See Chapter 18 for a full description of IOF clist and REXX facilities.

Syntax

DEFCON name condition

name. The condition name that will be referenced in SCAN commands.

Condition. Describes a logical comparison that is to be done against the sysout records being scanned by the SCAN command. The condition can compare specific fields (ranges of columns) from sysout records to constant data. For example, the condition:

          COLS(15 19)  EQ   'SMITH'
would be true for any sysout record which contained the string SMITH in columns 15 through 19. Since the DEFFLD command can define field names as ranges of columns, the same condition could also look like:

              USERNAME  EQ  'SMITH'

where USERNAME is a field that has been defined with a DEFFLD command:

              DEFFLD  USERNAME  COLS(15 19)

In addition to EQ for equal, the following comparison operators are supported by DEFCON:

EQ
Equal
NE
Not equal
LT
Less than
GT
Greater than
LE
Less than or equal to
GE
Greater than or equal to
CT
Contains<
NC
Does not contain

The logical operators AND, OR, and NOT can be used to combine simple comparisons to form a more complex condition:

             USERNAME  EQ  'SMITH'   OR   USERNAME  EQ  'JONES'

This condition would be true for a sysout record if columns 15 through 19 of the record contained either SMITH or JONES.

The predefined fields LINENUM, PAGENUM, RECDNUM, and RECDLEN also can be used:

          DEFFLD DEPTNAME COLS(5 13)
          DEFCON DEPTBRK DEPTNAME EQ 'Personnel' AND   +
          LINENUM EQ 2

Parentheses can be used to group comparisons together as shown below.

         (COLS(1 3) EQ 'ABC' AND COLS(4 5) EQ 'YZ') OR +
         (COLS(8 9) EQ 'QQ' AND COLS(25 48) NC 'ERROR')

Thus, a condition can be a simple comparison or a very complex combination of many comparisons.

Scan for Defined Conditions

Scan the sysout data set for defined conditions. This command will primarily be used by IOFclists and execs. See the Chapter 18 for a full description of IOF programmable facilities.

The SCAN command begins with the record that is currently displayed on the top of the screen and continues until it finds a record that satisfies one of the specified conditions. If the end of the data set is reached before any condition is satisfied then a return code of 255 will be returned.

A return code of 254 will be displayed if the end of the data set is reached but the data set is still being written by a running job.

Syntax

           SCAN  [ nnn RECords/Pages ]   ACTIVE
                        / UNTIL(conditions) /
                        / FOR condition /
                        / EXIT(rc) /

nnn RECORDS/PAGES. Limit the scan to nnn records or pages. If nnn records are scanned without satisfying one of the conditions, then return with return code 253.

ACTIVE. Scan using all active conditions. All defined conditions that have an active "on condition" (see Specifying Action when Condition is Satisfied below) will be used for the scan, and the actions defined in the corresponding ONCOND statements are taken whenever a condition is satisfied. The scan command will then resume and continue uninterrupted unless a SCAN EXIT command is executed in an ONCOND block.

UNTIL(conditions). A list of up to 250 condition names. SCAN will search for all of the named conditions, and when a specific condition is satisfied, it will display a return code that is the number of the condition (from left to right) in the list of conditions.

FOR condition. Scan for an explicitly defined condition. This scan option is designed to be used by a user at the terminal. It provides a comprehensive and more powerful version of the FIND command.

EXIT(rc). Terminate SCAN ACTIVE with return code rc. This option is used only from within an ONCOND block to terminate a SCAN ACTIVE loop. Normally, SCAN will continue a SCAN ACTIVE with the next sysout record after an ONCOND block is executed. This option allows you to terminate a SCAN ACTIVE loop based upon some condition being satisfied.

Note that if a SCAN command is entered with no parms, then the previous SCAN command is resumed from the next logical record.

Examples

              SCAN ACTIVE
              SCAN 8000 RECORDS UNTIL(DEPT SUMMARY)
              SCAN 30 PAGES FOR COLS(30 50) CT 'Bingo'

Specifying Action When Condition is Satisfied

Define the actions (an ONCOND block) that will take place when a SCAN ACTIVE condition is satisfied. Several ONCOND statements can be specified for each defined condition.

Syntax

ONCOND * condition command

condition. The name of a specific condition from a DEFCON command.

* An asterisk represents the last condition that was defined.

command. Any of the IOF commands DEFINDEX, DEFENTRY, SETVAR, UP, DOWN, DOWNCTRL, SCAN (including SCAN EXIT), # (MVS command), or $ (JES2 command) and all the acceptable parameters to any one of these commands.

Example

Define an index entry that contains the error type from columns 60 to 77 whenever the word ERROR is found in columns 20 through 40. Also, send a message to user SUPVSR1 that the error was found.

         DEFFLD  ERRFLD  COLS(20 40)
         DEFFLD  ERRTYPE COLS(60 77)
         DEFCON  ERROR  ERRFLD  CT 'ERROR'
         ONCOND  * DEFENTRY  /ERRS Error of type: %ERRTYPE
         ONCOND  * # SE 'Error detected in system',U=(SUPVSR1)

Assign a Value to a Variable

Assign a value to an internal IOF variable. The variable can then be referenced in DEFCON, DEFENTRY, DEFINDEX and other SETVAR statements. This command is particularly useful when these commands are used in ONCOND statements.

Syntax

SETVAR variable value

variable. The name of the variable to be set to a value. This variable may not be a name that has been previously defined with a DEFFLD command. The variable will be implicitly defined by setting it with a SETVAR command.

value. The value to be assigned to the variable. Value can be a constant, or the contents of a previously defined field from the current line being browsed. A constant value is specified by enclosing the value in single quotes. The contents of a field is specified by a percent sign ( % ) followed by the field name.

Examples

          SETVAR  NAME  'JOHN SMITH'
          DEFFLD  DEPT  COLS(20 40)
          SETVAR  DEPTNAME  %DEPT  (Cols 20-40 from current line)
          SETVAR  CURRPAGE  %PAGENUM  (Current page number)

Stack a Command When Condition is Satisfied

Only the DEFINDEX, DEFENTRY, and SETVAR commands are scanned for variable substitution in ONCOND statements. The STACKCMD command is used in an ONCOND statement to execute any IOF command with variable substitution.

Syntax

STACKCMD iof-command

Example

          ONCOND  *  STACKCMD  DOWN  %AMOUNT

Set a Condition Active or Inactive

Make a condition active or inactive.

Syntax

SETCOND */condition/(condlist) ACTIVE/INACTIVE/PUSH/POP

* Set the condition that was most recently defined.

condition. Name of condition to be set.

(condlist). List of condition names to be set.

ACTIVE. Set condition(s) active.

INACTIVE. Set condition(s) inactive.

PUSH. Push down current active/inactive status.

POP. Pop up previously pushed status.

Example

Set the last previously defined condition inactive.

         SETCOND  *  INACTIVE

Display Action Messages

Display the current system action messages at the bottom of the current browse display. Entering ACTION with no operands will terminate the action message display.

Syntax

ACTION [ n1,n2,... ] [ ALL / MVS / USER / DEFAULT ]

[ DISABLE / ENABLE / INITIAL ]

n1,n2,... List of route codes for which messages are to be displayed.

ALL. Show messages with route codes 1 through 28.

MVS. Show messages with route codes 1 through 12.

USER. Show messages with route codes 13 through 28.

DEFAULT. Show default route codes from user's IOF group definition.

DISABLE. Shut down action display but leave all current options in place so that action processing can be restarted with an ACTION ENABLE command.

ENABLE. Restart action processing that has been suspended with an ACTION DISABLE command.

INITIAL. If this is the first time the ACTION command has been entered during this IOF session, start up action processing with the options from the user's IOF group definition. Otherwise, start up the action processing using the current options in effect.

Define the Browse Title

Specify the format of the title display row for IOF browse. The format is defined as a skeleton that can contain constant data and/or variable data about the data set being browsed. The title definition will remain in effect for the remainder of the current browse session.

Syntax

TITLEDEF 'title-data'

title-data. The data to be displayed. Variable names must be preceded by the percent ( % ) character. Any variables defined by a TITLEVAR statement can be included in the title. The following built-in variable names also are available:

          Name        Len    Description
          JOBNAME       8    Name of job being browsed
          JOBID         8    Job id of job being browsed
          DDNAME        8    DD name of data set being browsed
          STEPNAME      8    Step name of data set
          PROCSTEP      8    Procstep name of data set
          DSKEY         4    JES2 data set key for data set
          POS           37   Page/line if not CONDENSE mode Record
                             number if in CONDENSE mode
          COL           12   Current columns being displayed
          CL1           3    Low column number being displayed
          CL2           3    High column number being displayed
          PAGE          6    Current page number
          LINE          7    Current line number on the page
          RECORD        7    Current record number
          MSG                Position indicator for short messages

Example

          TITLEDEF '---Status Report-----%MSG%POS----'

Define a Title Variable

Assign the value of any clist or REXX variable to a title variable.

Syntax

TITLEVAR ttlvar( ttllen ) &clvar

ttlvar. Title variable name.

ttllen. Title variable length.

clvar. The clist variable whose value is to be assigned to the title variable.

The Find All Menu

The IOF Find All Menu panel is displayed when the ALL operand of the FIND command is specified. It displays a menu of all the occurrences of the find string and allows you to re-enter browse at a specific occurrence of the string.

Entering the menu number for an occurrence will cause the IOF Find All Menu Panel to return to browse with the current line pointer set to the selected occurrence.

After returning to Browse from the IOF Find All Menu, you can re-enter the IOF Find All Menu by hitting the RFIND key. The IOF Find All Menu will then display the current screen full of occurrences and allow you to select another occurrence.

You can scroll up and down through the list of occurrences using the normal scrolling keys.

From the IOF Find All Menu, enter NF (for Next Find) to restart the Find All process in the next sysout data set. PRF will restart the Find All in the previous sysout data set.

Indexing Tutorial

IOF indexing facilities enhance the ability to browse data interactively. Indexing reduces the time required to access specific pages or lines, and it provides pointers to data that may need to be accessed frequently.

IOF automatically builds an internal index to each page of data when the data is first browsed. The internal index is used to allow subsequent immediate repositioning to any page.

User defined labels are also saved in the index so the labeled positions can later be quickly redisplayed with the LOCATE command. Defining a label with the label command ( . ) is the most direct way to define an IOF data index. Labels can be referenced with the LOCATE command just as in ISPF browse. IOF also provides the INDEX command which displays all defined labels in the IOF Data Index menu. Labels can be selected from the index menu as an alternative to using the LOCATE command.

Assume that when browsing a report, an error condition is found and labeled by entering .ERR1 in the command area at the top of the browse screen. Later a second error is labeled .ERR2, and the start of the summary report for the Chicago region is labeled .CHICAGO. Entering INDEX (or IND) produces the IOF Data Index for these entries.

------------------------------------IOF-DATA-INDEX---------------------------- _ 1 ERR1 _ 2 ERR2 _ 3 CHICAGO

Labels can be selected from the data index by entering S in the action area to the left of the item, or by entering the label's menu number in the command area. Selecting a label causes immediate re-entry in browse to the line where the label was defined, just as entering a LOCATE command with the label name would do.

IOF also allows comments to be included on the label command. If comments are included on a label command, they are displayed in the IOF Data Index instead of the label name. Entries are selected as before. In the example above, the labels could have been defined with comments:

.err1 Error 1, missing address field

.err2 Error 2, wrong region

.chicago Chicago summary report

In that case, entering IND would produce the following display:

---------------------------IOF-DATA-INDEX-------------------------------------- COMMAND ===> SCROLL ===> SCREEN ----------------------------------------------------------------------------- _ 1 Error 1, missing address field _ 2 Error 2, wrong region _ 3 Chicago summary report

Adding commentto labels is very useful when many items are being indexed, or when the index will be used by another person. Sophisticated index entries can be built automatically with IOF clists for specific applications.

The DEFENTRY command is a more formal way of defining labels. DEFENTRY is essentially an alias for the label command. It provides better documentation when coded in clists and execs.

Multiple Indices

IOF allows more than one index to sysout data. Each index can be displayed independently, or the indices can be merged and displayed together. This capability allows sophisticated indices to be developed for important sysout data.

To establish multiple indices, use a DEFINDEX command to define each index before any index entries are created with DEFENTRY commands. DEFENTRY commands then specifically name the index (or indices) to which they are adding an entry.

Let's assume that we have a large report that is organized by city offices within state divisions. We will build an index that makes it easy to find specific states or specific cities within a state in this report.

For reasons of brevity, our example will only deal with two states. But in practice a report would normally have many more divisions and subdivisions. We first will define an index for each state:

           DEFINDEX  /CALIF  California Division
           DEFINDEX  /TEXAS  Texas Division

In IOF browse, perform the following steps:

  • Position to the first record in the section of the report for San Francisco, California.

  • To add a pointer to the California index for this record, enter:

               DEFENTRY  /CALIF  San Francisco Office
    

  • Position to the first record for Los Angeles and enter:
               DEFENTRY  /CALIF  Los Angeles Office
    

  • Position to the first record for San Diego and enter:
               DEFENTRY  /CALIF  San Diego Office
    

  • Position to the first record for Houston, Texas and enter:
               DEFENTRY  /TEXAS  Houston Office
    

  • Position to the first record for Dallas and enter:
               DEFENTRY  /TEXAS  Dallas Office
    

    We now have added entries to both the California and Texas indices. Of course these commands would normally be executed from an IOF clist that creates the indices and saves them for later reference by other users (see Save Index).

    Once these indices have been created, enter INDEX to see the IOF Data Indices Menu.

    --------------------------IOF-DATA-INDICES-MENU--------------------------- COMMAND ===> SCROLL ===> SCREEN ------- NAME --- COUNT ---- DESCRIPTION ---------------------------------- _ 1 CALIF 3 California Division _ 2 TEXAS 2 Texas Division

    Each index that was defined by a DEFINDEX command will be described by a row on this menu. You can see that there are three index entries in the California index and two entries in the Texas index.

    To see the California index place an S beside it on the menu.

    ----------------------IOF-DATA-INDEX---------------------------------- COMMAND ===> SCROLL ===> SCREEN ---------------------------------------------------------------------- _ 1 San Francisco Office _ 2 Los Angeles Office _ 3 San Diego Office

    This is the IOF data index for the California offices. To see the section of the report for Los Angeles, place an S in the line command area. You will enter IOF browse at the record corresponding to that index entry, which you will remember from above was the first record in the Los Angeles section of the report.

    Once in browse, you can use any browse features to reposition within the report or find character strings. When you press END, you will return to the IOF Data Index for California, where you can select another index entry or press END again to return to the IOF Data Indices Menu.

    An indexed item can also be snapped by using the N line command on the Data Index Menu. In the example above, entering the N line command for the Los Angeles Office entry causes the data from that entry through the next indexed entry (San Diego Office) to be snapped.

    We have created a two level index for this report that allows you to go directly to the section of the report for a particular city. If you wanted to select the Texas index directly without going through the IOF Data Indices Menu:

             IND  /TEXAS
    

    This would produce the Texas index directly without needing to display the IOF Data Indices Menuou can select more than one index at a time from the Data Indices Menu.Place an S beside multiple indices and press ENTER. The selected indices will be merged and displayed as a single Data Index.

    Saving the Index

    IOF indices normally survive only for the duration of a browse session. When the browse is ended, all the indices are lost. Indices can be saved for use in subsequent browse sessions with the SAVEINDX command.

    SAVEINDX allocates and writes all IOF indices to an MVS sequential data set. The default data set name is:

             prefix.jobname.jobid.IOFINDEX 

    where prefix is the user's data set prefix, jobname and jobid are the name and id of the job being browsed, and IOFINDEX is an installation definable suffix. See the SAVEINDX command description for parameters, including explicitly specified data set names on page 14.

    Using a Previously Saved Index

    The VIEW command is used to cause a previously saved index to be fetched. Enter V beside a job on the IOF Job List Menu or V in the command area of the IOF Job Summary to restart a browse session with a saved index.

    A batch job can build an index to one or more of it's own sysout data sets and save the index for later interactive viewing. Several sample indexing clist applications are available in the IOF clist library for use as a guide in developing index applications.

    Scan Overview

    The SCAN command is an extension of the FIND command. FIND can only search for exact matches, but SCAN can perform very complex comparisons. SCAN can also search for up to 250 independent conditions on one pass of the data.

    Scan For an Explicitly Defined Condition

    The SCAN FOR option is the simplest form of the scan command, and is probably the only form that will normally be used directly by a user at a terminal. It can be used to search for a compound condition. For example, SCAN can find a line that has Europe in columns 1 through 6 without France in the rest of the line with the command:

    SCAN FOR COLS(1 6) EQ 'Europe' AND COLS(7 *) NC 'France'
    

    More complicated scan commands are difficult to enter in the command area from a terminal. The define field (DEFFLD) and define condition (DEFCON) commands can be used to simplify scan statements.

    Scan Until One of Several Conditions is Satisfied

    The full power of SCAN can be realized only when it is used in clists and execs. Sophisticated compound conditions can be defined, and multiple conditions can be scanned on a single pass of the data. Index entries can be established based on the data found by SCAN.

    The SCAN UNTIL option scans for a maximum of 250 conditions. When a matching condition is found, the return code indicates which of the conditions was found. Return code 1 means the first condition was found, return code 2 means the second was found, and so forth. Return code 253 means the scan limit was reached without finding a match. Return code 254 means that a soft end-of-file was encountered (see SCAN command), and return code 255 means that a hard end-of-file was encountered. The UNTIL option of scan would normally only be used from a clist or exec which would interpret the return code.

    For example, assume you are scanning a report that has many lines of detailed entries, separated by subtotals and department totals. You might define two conditions:

    DEFCON      SUBTOTAL  COLS(12 20) EQ 'SUB-TOTAL'
    

    DEFCON      DEPTOTAL  COLS(10 33) EQ '*** DEPARTMENT TOTAL ***'
    

    You could then scan for both conditions at once with:

    SCAN UNTIL(SUBTOTAL DEPTOTAL)
    

    If you enter this scan command from a terminal, the found condition will be positioned to the top of the screen. If the scan command is issued from a clist, it sets a return code in clist variable &LASTCC to indicate which condition was detected. Return code 1 indicates that condition SUBTOTAL was detected, and return code 2 indicates DEPTOTAL. Return codes 253, 254 and 255 indicate scan limit or end-of-file.

    You can resume the SCAN UNTIL or SCAN ACTIVE from the current line by entering SCAN with no operands to find the next occurrence of one of the two defined conditions.

    Scan for All Active Conditions

    Using the ACTIVE option of SCAN allows you to scan a complete data set, performing specified actions when individual conditions are satisfied. With this option the SCAN command does not terminate when a condition is satisfied. It executes the commands in the ONCOND block (see ONCOND command) for that condition and then continues the scan.

    SCAN ACTIVE will use all conditions that have been defined with DEFCON commands and have not been set inactive (see SETCOND command). So you would normally define each condition with a DEFCON command, followed by its ONCOND block. Then, SCAN ACTIVE would scan the entire data set.

    SCAN ACTIVE is the most efficient way to use SCAN from a clist or exec. The SLAMDEF clist in the distributed IOF clist library provides an excellent example of using the ACTIVE option of SCAN. Many different ONCOND options are demonstrated in this clist. Variable data from the next or preceding lines is assigned using the SETVAR command. This information along with variable information from the current line is used in defining index entries.

    The IOF$BI1A, IOF$BI1B, and IOF$BI1C clists in the IOF clist library provide additional examples of SCAN ACTIVE.

    Table of Contents