RESETBR


Reset the browsing position. RESETBR specifies the browse to be repositioned when browsing a file on a local or a remote system. RESETBR command used to reposition the currently active browse or changing its characteristics of the browse without ending it.

GENERIC, GTEQ and RBA options characteristics can be changed with RESETBR. RESETBR is similar to an ENDBR–STARTBR sequence. If a RESETBR request specifies the key to specify where the browse is to start. The following READNEXT (or READPREV) command might not get the same record pointed by the RESETBR command for a file opened in VSAM NSR or RLS mode.

This might occur because the initial record specified on the RESETBR command can be deleted by another transaction in between the RESETBR completing and a READNEXT or READPREV commands. In VSAM LSR mode, the initial record cannot be deleted between the RESETBR and the READNEXT.

Syntax -


RESETBR Syntax

Parameters -


EQUAL -

Specifies the search is satisfied only by a record having the same key in the RIDFLD option.

FILE(file-name) -

Specifies the name of the file to be accessed. If SYSID is specified, the data set is on a remote system irrespective of the name is defined to CICS.

If SYSID is not specified, the data set assumed to be on the local system. Otherwise, the resource definition is used to find out whether the data set is on a local or a remote system.

GENERIC -

This option is valid for VSAM KSDS only. Specifies the search key is a generic key with a length specified in the KEYLENGTH option. The search for a record is satisfied that has the same starting characters (generic key) specified.

GTEQ -

This option is valid for VSAM only. Specifies the first record that has a greater key than the specified key in the RIDFLD option if the exact match not found. If the exact match found, it retrieves the matched record. Use this option only with keyed or RRN.

KEYLENGTH(data-value) -

data-value is a halfword binary value. Specifies the key length. KEYLENGTH is not valid when RBA or RRN is specified. KEYLENGTH must be specified if GENERIC is specified or key is specified.

If the length specified is different from the length defined for the data set and the operation is not generic, the INVREQ condition occurs. The INVREQ condition also occurs if RESETBR command specifies GENERIC and the KEYLENGTH is not less than the length specified in the VSAM definition.

If KEYLENGTH(0) and GETQ must be specified to read the first record in the data set. If EQUAL is specified with KEYLENGTH(0) the results of the STARTBR are unpredictable.

For remote files, specify the KEYLENGTH in the FILE definition. If KEYLENGTH is not defined and is not specified in the application program and the key is longer than 4 characters, the default value is 4.

RBA -

This option is for VSAM KSDS or ESDS base data sets only. Specifies the RIDFLD option field contains a relative byte address. Use this option only when browsing an ESDS or KSDS base and using rba instead of keys to identify the records.

REQID(data-value) -

data-value is a halfword binary value. Specifies a unique request identifier for a browse, used to control multiple browse operations on a file. If this option is not specified, a default value of zero is assumed.

RIDFLD(data-value) -

data-value is a halfword binary value. Specifies unique request identifier for a browse, used to control multiple browse operations on the same or different data sets.

If this option is not specified, a default value of zero is assumed. The contents can be a key or a relative byte address, or relative record number (for VSAM data sets), or a block reference, a physical key, and a deblocking argument (for BDAM data sets).

The field is full word binary for a relative byte address or a relative record number. If RBA is specified, the RIDFLD can be greater than or equal to zero. If RRN is specified, the RIDFLD can be greater than or equal to 1.

RRN -

This option is valid for VSAM RRDS. Specifies the RIDFLD option contains a relative record number. This option should use with files referencing relative record data sets.

SYSID(system-name) -

Specifies the system name to which the request is directed. If SYSID specified and omit RBA and RRN, KEYLENGTH must be specified.

XRBA -

Specifies the RIDFLD option field contains an extended relative byte address. This option should be used when browsing records from an ESDS extended addressing data set. If XRBA on a RESETBR command specified, the associated STARTBR command specified XRBA.

Error Conditions -


Below are the list of error conditions may occur in combination. If more than one occurs, only the first is passed to the application program.

Error ConditionRESP2, Description & SolutionSystem Action
12 FILENOTFOUND
1 - A file name in the FILE option is not defined to CICS.
Solution -Contact support team to define the FILE in CICS region.
Task abnormally terminated
21 ILLOGIC
110 - VSAM error occurs that is not in one of the other CICS response categories.
Solution -This might be due to the non-sequence of file operations. Debug the program to correct the logic.
Task abnormally terminated
16 INVREQ
25 - The KEYLENGTH and GENERIC options are specified. The length specified in the KEYLENGTH option is greater than or equal to the length of a full key.
Solution -When a KEYLENGTH and GENERIC options specified, it is a generic key and the length value should be less than the length of the full key. Change the program to modify the length value.

26 - The KEYLENGTH option is specified and the length does not equal the length defined for the data set.
Solution -If only KEYLENGTH option specified, the length value should match the dataset full key. Change the program to modify the length value.

36 - The REQID, SYSID or file name does not match that of any successful STARTBR command.
Solution -Modify the programming logic to pass the correct values to RESETBR command that matches with previous STARTBR command.

37 - The type of record identification used to access a data set during the browse has been changed.
Solution -The record identification used for browse should be same until the browse completion. Modify the programming logic to resolve the issue.

42 - The KEYLENGTH and GENERIC options are specified. The length specified in the KEYLENGTH option is less than zero.
Solution -When a KEYLENGTH and GENERIC options specified, it is a generic key and the length value should be less than the length of the full key and should be greater than zero. Change the program to modify the length value.

51 - A RESETBR command to a KSDS file accessed in RLS mode specifies the RBA keyword.
Solution -RBA option is not valid for KSDS file accessing in RLS mode. Modify the program to remove RBA option for files which are accessing in RLS mode.
Task abnormally terminated
17 IOERR
120 - There is an I/O error during the RESETBR operation.
Solution -An I/O error is any unusual event that is not covered by a CICS condition. For VSAM files, IOERR usually indicates a hardware error.
Task abnormally terminated
54 ISCINVREQ
70 - The remote system indicates a failure that does not correspond to a known condition.
Solution -Contact remote system support team to resolve the issue.
Task abnormally terminated
70 NOTAUTH
101 - A resource security check has failed on FILE (filename).
Solution -Contact system administrator team to check whether the appropriate access added for the user or group. It will resolve the problem.
Task abnormally terminated
53 SYSIDERR
130 - The SYSID name specified is neither the local region nor a remote system or the link to the remote system is closed.
Solution -The specified SYSID name is not related to any system. Correct it.If the link to the remote system is closed, that might be due to the remote system is not up and running. Contact remote system support team.
Task abnormally terminated
13 NOTFND
80 - An attempt to retrieve a record based on the search argument provided is unsuccessful.
Solution -This might occur due to the record already gets deleted or the record doesn’t exist. Handle the error programmatically.

81 - XRBA was specified and the value of RIDFLD was greater than 4 GB but the data set is not an extended addressing ESDS.
Solution -XBRA option only used for extended ESDS. If the dataset is not extended ESDS, do not use XBRA. Modify program to remove the XBRA.
Task abnormally terminated