STARTBR


Start browse of a file. STARTBR specifies where the record browsing to start in a file on a local or a remote system. No records are read until a READNEXT command is executed. A direct browse is a browse of the base data set by using the primary key.The below types of browse operations are possible using STARTBR -

  • A direct browse of a key sequenced data set (KSDS) by record key.
  • A direct browse of an entry sequenced data set (ESDS) by relative byte address (RBA).
  • A direct browse of a relative record data set (RRDS) by relative record number (RRN).
  • A browse of a key sequenced data set (KSDS) using an alternate index path.
  • A browse of an entry sequenced data set (ESDS) using an alternate index path.
  • A browse of a KSDS by RBA.

If GENERIC or GTEQ are specified, they are used whenever the value of RIDFLD is changed before issuing a READNEXT command. If the RBA option specified, it applies to every READNEXT or READPREV command in the browse and causes CICS to return the relative byte address of each retrieved record.

None of these options can be changed during a browse except by the RESETBR command. If a STARTBR request specifies the key at which the browse is to start the record returned on the following READNEXT or READPREV. A browse can end by using the ENDBR, SYNCPOINT or SYNCPOINT ROLLBACK commands.

Syntax -


STARTBR Syntax

Parameters -


EQUAL -

Specifies the search is satisfied only by a record having the same key in the RIDFLD option. This option is the default field for a direct ESDS browse.

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. This option is the default for directly browsing through a KSDS or an RRDS. It is not valid for directly browsing an ESDS, browsing through an ESDS using a path.

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 STARTBR 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 READ 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.

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. RIDFLD should specify if the GENERIC option specified.

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 STARTBR command specified, all other commands within the same browse must specify XRBA. KSDS data sets cannot be accessed by 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
84 DISABLED
50 - A file is disabled.
Solution -Check the file status and enable the file using SET FILE or CEMT SET FILE
Task abnormally terminated
12 FILENOTFOUND
1 - A file name in the FILE option is not defined to CICS and SYSID has not been specified.
Solution -Contact support team to define the FILE in CICS region.If the file belongs to the remote region, modify the program to specify the SYSID.
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
20 - Browse operations are not allowed according to the resource definition.
Solution -Change the resource definitions if the deletion is valid or do not perform delete if the file definitions are correct.

25 - The KEYLENGTH and GENERIC options are specified and the length 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 and the specified 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.

33 - An attempt is made to start a browse with a REQID already in use for another browse.
Solution -One REQID for one browse and should not use for multiple browses. Modify the program to resolve the issues.

42 - The KEYLENGTH and GENERIC options and 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 - STARTBR command to a KSDS file that is being 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.

59 - XRBA was specified but the data set is not an extended ESDS.
Solution -XBRA only for extended ESDS. Modify the program to remove XBRA option for writing the files other than extended ESDS.
Task abnormally terminated
17 IOERR
120 - There is an I/O error during the READ 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
19 NOTOPEN
60 - Below are the reasons for NOTOPEN
  • The requested file is CLOSED and UNENABLED.
    Solution -Open and enable the file using SET FILE or a CEMT SET FILE command. If no access, contact support team to enable the file.
  • The requested file is OPEN and in use by other transactions, but a CLOSE request against the file has been received.
    Solution -The CLOSE request might for using the file in batch environment. Wait for some time and try again later once the file enabled.
  • The requested file is CLOSED and ENABLED, so CICS has tried to open the file as part of executing the request.
    Solution -Open the file using SET FILE or a CEMT SET FILE command. If no access, contact support team to open the file.
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 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