Follow the below steps to ensure the correctness for CICS setup and diagnose the problem if any occurs with CICS
Note: Examples given here are with reference to region USRDEV1
1. Update profile at file ‘$HOME/.profile’
a. Update the ENVHOME environment variable to USR home directory
Ex: export ENVHOME =/dvt/usr/dev1
b. Update or set CICSREGION to the specific region name
Ex: export CICSREGION=USRDEV1
2. Update CICS environment at file ‘/var/cics_regions/
a. Update the ENVHOME environment variable to USR home directory
Ex: export ENVHOME =/dvt/usr/dev1
b. Update DSQUERY which is used to point SYBASE server. This is used by scripts, Sybase tools and Sybase library
Ex: DSQUERY=SYBASE_DB_SERVERNAME
c. Update DB2INSTANCE to point DB2 database allocated to the specific region (Usually this value will be equivalent to region name in lowercase).
Ex: DB2INSTANCE=USRDEV1
3. Ensure that the value given to ENVHOME variable in the above steps is equivalent to the SYG_HOME in SYG table in database which is allocated to region.
Ie; select SYG_HOME from SYG_SYSTEM_GLOBALS
4. Ensure that the connection name in file ‘$ENVHOME /config/utp.ini’ is equivalent to the connection name given for the connection string in file ‘/var/cics_regions/
5. Ensure that the password file used by CICS user to login into database has the correct credentials like Sybase DB server name and DB user name. The file is located at ‘$ENVHOME /usr_pwd/password.txt’
Ex. For USRDEV1 region
USR_DBO db_user_id USR_DBO_PW encrypted_db_user_pwd USR_SQL_SERVER SYBASE_DB_SERVERNAME
6. Ensure that the necessary permissions are given to folder $ENVHOME /log and file $ENVHOME /log/usr
Ex: chmod 777 $ENVHOME /log
Chmod 777 $ENVHOME /log/usr
In the above statement SYG_DT mentions the SYG_STLMNT_DT from SYG table. For example when SYG_DT=’Feb 17 2007’ the file will be named by cics as $ENVHOME /log/usr1702.log
Diagnosing problem
1. Check CICS level error messages at
Usually the errors logged in this file is written by CICS region when it tries to execute a user transaction
Sample errors
1. ENVHOME not found ( when ENVHOME is not setup or pointing to NULL)
2. Connection String not found / Unable to open utp.ini ( When the connection name in utp.ini is different from XAD.stanza)
2. Check CBT Transaction error messages at
$ENVHOME /log/usr
Usually the errors logged here are written by CBTs executed from cicsterminal, ie log messages are generated from CBTs
Sample errors
1. PCHT001: ERROR : Q QCH1 Queue is empty / End of the Queue has reached occured on Tue Mar 6 16:23:33 2007
2. TRANSACTION = 3013: ERROR : Database Error -107 occured in program , The column prefix 'c' does not match with a table name or alias name used in the query. Either the table is not specified in the FROM clause or it has a correlation name which must be used instead.
occured on Tue Mar 6 16:50:56 2007
CICS Jargons
CEMT I TA
- to check all active CICS tasks
CECI IN TDQ(QABC1)
- to check the no of items in the queue QABC1
CECI READQ TD Q(QABC1)
- to read and remove an entry (the first entry) from queue QABC1
CECI WRITEQ TD Q(QABC1) FROM("LAKSHMI")
- to write a string LAKSHMI to queue QABC1
CECI DELETEQ TD Q(QABC1)
- to delete queue QABC1. This will normally be used to completely flush a queue with large no of data. Queue will be emptied at one stroke
Last updated on: 21 Mar 2008