CICS BROWSE issues for applications running in TXSeries
Nageswararao V Gokavarapu 2700013B8D Visits (2501)
When CICS applications browsing the files using STARTBR FILE or STARTBR DATASET APIs, while performing READNEXT FILE or READNEXT DATASET API operation CICS will return ENDFILE condition even though the FILE or DATASET contains records if TXSeries region is configured with DB2 V9.5 or above as File Manager. The locale configured with the TXSeries/CICS region plays important role while performing BROWSE operations.
The CICS region's locale can be set by the standard LANG variable (for example LANG=en_US or LANG=C), or it can be overridden in the region's environment file. This variable sets the locale in which CICS region runs. A CICS region displays its local code page and the corresponding short code in one of the messages that are written to the console.nnnnnn file during region start-up .
ERZ010135I/0362 01/22/13 18:01:07.578392978 DB2REG 13369834/0001 : CICS region 'DB2REG' is being started with locale categories 'en_US en_US en_US en_US en_US en_US'
When you create a new database using DB2 V9.5 or later and use as a file manager with TXSeries region, the default code page used by the database is Unicode. You might see a failure in TXSeries applications that use BROWSE APIs to fetch the records from DB2 files due to the mismatch in code page of database and application.
Use either of the following methods to resolve the issue
Option 1: Create database with specific code page:
Create the new database by explicitly setting the code set and territory for the database. For example, to create a database "cicsdb" with en_US code page, run the following command:
Option 2: Set TXSeries region environment if database already created:
If the DB2 database is already created with Unicode code page, set the following environment variables to its corresponding locale specific to UTF-8 code sets in region environment file (i.e. /var
You will be required to restart the region to reflect the locale changes. As an example, If the database is created with a default Unicode code page and TXSeries region "REGION01" locale is set to en_US, set the following environment variables in /var
Do drop in comments or questions you may have!