Previous Topic: Browse a VSAM FileNext Topic: Example


Example

To view the record with the key 'REC001' and the next record, and then to terminate the browse, follow these steps:

  1. Specify the following (or press PF4):
    FUNC= BEGB
    RCID= C`REC001'
    

    Press Enter to display the record with a key of REC001.

  2. Press Enter to display the next record.
  3. Press PF4 to end the browse.

Search for a Data String

To search for a data string, specify the BROWSE operation on the FILE definition.

  1. Specify the following required information:
    FUNC= SRCH
    RCID= id of record where search should begin
    DATA= data string to be located
    LOC a number or the keyword ANY
    

    If a number is entered in the LOC field, FILE looks for the data string only at the specified location. If ANY is entered, FILE searches the entire record for the specified data string.

  2. To search more than one record, enter the number of records that you want to search in the SIZE field.
  3. Specify the following optional information for a KSDS file:
    SRCHTYP= FKGE/FKEQ/GKEQ/GKGE
    
  4. Press Enter. If FILE finds the requested data string, it displays the record in which it is found, starting with the requested string. The RETNRCID field displays the ID of the record and the LOC field displays the record position at which the data was found.

    If the data is not found, the message DATA NOT FOUND opens.