RESETBR - IBM Mainframe

RESETBR specifies, during a browse, the record in a file, on a local or a remote system, where you want the browse to be repositioned. When browsing a file, you can use this command not only to reposition the browse (which can be achieved more simply by modifying the RIDFLD data area on a READNEXT or READPREV command), but also to change its characteristics from those that are specified on STARTBR. You can do these actions without ending the browse. The characteristics that might be changed are those that are specified by the GENERIC and GTEQ options. The syntax of the RESETBR command is given below:

An example of the RESETBR command is given below:

The various options of the RESETBR command is given below:

  • EQUAL (VSAM only) - Search will only be satisfied when a record containing the same key (complete or generic) as the one specified in the RIDFLD option.
  • FILE (filename) - Contains the name of the user maintained file to be accessed. The FCT entry for the filename will determine where the location (local or remote) of the data set resides. However, when the SYSID option is used, the location of the filename is assumed to exist on a remote system regardless of what the entry has defined in the FCT if one exists on the local system.
  • GENERIC (VSAM only) - The search key contains a generic key with the length value being specified in the KEYLENGTH option. The search condition is satisfied when a record is found that contains the same starting characters from the generic key used. This option is only valid on a KSDS VSAM file, or a path over either a KSDS or an ESDS.
  • CTEQ (VSAM only) - When searching for a record with the same key (complete or generic) specified in the RIDFLD option, if the search is unsuccessful, then the next record having a greater key is retrieved. This option should only be used on a KSDS VSAM file, or a path over either a KSDS or an ESDS.
  • KEYLENGTH (data_value) - Halfword binary length (PIC S9(4) COMP) returning the length of the key specified in the RIDFLD option. This option is invalid when RBA or RRN options specified. It is required when the GENERIC option is used, and also may be used whenever a key is specified. If KEYLENGTH (0) is used with the intent of reading the first record in the file, then the GTEQ option is also required. If EQUAL is specified either explicitly or by default with KEYLENGTH (0), the results of the READ will be unpredictable. An INVREQ condition occurs with either of the following conditions: (a) the length specified is different from the length defined for the data set and the operation is not generic or (b) GENERIC is specified and the KEYLENGTH is not less than that specified in the VSAM definition
  • RBA (VSAM only) - Option when used will identify the record identification field of the RIDFLD option as a relative byte address. This option is only used for reading records directly from an ESDS file, or when reading from a KSDS file and using relative byte addresses instead of keys to identify the records.
  • REQID (data_value) - Halfword binary field (PIC S9(4) COMP) containing the value of the unique request identifier for a browse, used in controlling multiple browse operations on a data set. The default for this option when used is zero.
  • RIDFLD (dataarea) - Fullword binary integer (PIC S9(8) COMP) value specifying the relative record number (starting from zero) of the record for a relative record data set and the operation is not generic. GENERIC is specified and the KEYLENGTH is not less than that specified in the VSAM definition
  • RBA (VSAM only) - Option when used will identify the record identification field of the RIDFLD option as a relative byte address. This option is only used for reading records directly from an ESDS file, or when reading from a KSDS file and using relative byte addresses instead of keys to identify the records.
  • REQID (data_value) - Halfword binary field (PIC S9(4) COMP) containing the value of the unique request identifier for a browse, used in controlling multiple browse operations on a data set. The default for this option when used is zero.
  • RIDFLD (dataarea) - Fullword binary integer (PIC S9(8) COMP) value specifying the relative record number (starting from zero) of the record for a relative record data set. RRN option must also be specified with this option. For a keyed direct data set, RIDFLD should specify a key. The RIDFLD specifies the record identification field. The contents can be one of the following:
    1. A key
    2. A relative byte address, with a format that is a fullword binary integer (PIC S9 (8) COMP) value that can be greater than or equal to zero
    3. A relative record number (for VSAM data sets), with a format that is a fullword binary integer (PIC S9(8) COMP) value that can be greater than or equal to one.
    4. A block reference
    5. A physical key
    6. A deblocking argument (for BDAM data sets)
  • RRN (VSAM only) - Option indicates that the RIDFLD contains a relative record number in the record identification field. This option is required for a relative record data set.
  • SYSID (systemname) - Character field (4 bytes) specifying the name for the APPC connection where the request will be directed to. If this option is used, and both RBA and RRN are not specified, then KEYLENGTH must be specified because it cannot be found in the FCT entry.

The handle conditions are:

  • FILENOTFOUND - Set when a file name specified in the FILE option of the command cannot be located in the FCT. The default action is the abnormal termination of the task.
  • ILLOGIC (VSAM only) - This is set when a VSAM error occurs that is not defined by one of the other CICS response categories. The default action is the abnormal termination of the task.
  • INVREQ - Occurs for any of the following reasons:
    1. KEYLENGTH and GENERIC options are used and the length used with the KEYLENGTH option is greater than or equal to the length of a full key
    2. KEYLENGTH option is used without the GENERIC option and the specified length is not equal to the length defined for the data set to which this file refers
    3. RESETBR command issued on a file when no prior STARTBR command was issued.
    4. KEYLENGTH and GENERIC options are used and the length used with the KEYLENGTH option is less than or equal to zero.

The default action is the abnormal termination of the task.

  • IOERR - Set when an I/O error occurs during the READ. An I/O error can be any unusual event not covered by an existing CICS condition. For VSAM files, IOERR normally indicates a hardware error. The default action is the abnormal termination of the task.
  • ISCINVREQ - Set when the remote system indicates a failure that is not covered by an existing CICS condition. The default action is the abnormal termination of the task.
  • NOTAUTH - Resource security check .failure has occurred on FILE (filename). The default action is the abnormal termination of the task.
  • NOTFND - NOTFND is set when an unsuccessful attempt is made to retrieve a record based on the search argument provided. This error can also occur when a generic RESETBR with KEYLENGTH (0) specifies the EQUAL option. The default action is the abnormal termination of the task.
  • SYSIDERR - Can occur for any of the following reasons:
    1. The SYSID specified cannot be found in the intersystem table, or if the link to the specified system is unavailable.
    2. The remote system specified by SYSID is a LUTYPE6.1-connected system. Distributed program link requests are not supported on LUTYPE6.1 connections.
    3. There is no local queuing in the event of a SYSIDERR.
    4. RESP2 values are not returned for conditions occurring on DPL requests.

The default action is the abnormal termination of the task.

  • SYSIDERR - The SYSID specified cannot be found in the intersystem table, (defined in CICS by defining a CONNECTION), or if the link to the remote system is unavailable or closed. The default action is the abnormal termination of the task.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics