Trying to update a user's session definition through TPXBATCH results in 'record not found on file'.
search cancel

Trying to update a user's session definition through TPXBATCH results in 'record not found on file'.

book

Article ID: 54360

calendar_today

Updated On:

Products

TPX - Session Management

Issue/Introduction

Updating user session definitions with TPXBATCH like e.g. 'UPDATE USERSESSION (user_id session_id (UENTROW(5)))'
fails for some users with 'record not found on file' but is successful for other users.
The session to be updated is assigned from a TPX profile.

 

 

Resolution

This behavior is a result on how TPX stores user and session definitions in the ADMIN2 file.

Each 'static' or 'half-dynamic' TPX user is represented by one UIDX user record in ADMIN2.
For each session he has defined there can be a UENT session record stored but this is not a must.

Assume you add a TPX user 'ABCD1234'. You assign him a TPX profile 'PROF6789' containing sessions IMS and CICS.
This will result in the creation of an UIDX record for 'ABCD1234' in ADMIN2. This record has the assigned profile name
appended at the end, here only 'PROF6789'.

Note: There are no UENT records created for the sessions IMS and CICS during this process.

If you now run a TPXBATCH to update e.g. the IMS session like:

UPDATE USERSESSION (ABCD1234 IMS (UENTROW(4)))

will result in:

TPBL1010    VSAM GET return code is    8
TPBL1051    means record not found on file
TPBL1031    while UPDATing UABCD1234 IMS

You must first add the UENT session record here before you can update it with TPXBATCH.
Updating the session online with TPXADMIN does this automatically.

The TPXBATCH statements for this looks like:

 ADD USERSESSION (ABCD1234 IMS)
 UPDATE USERSESSION (ABCD1234 IMS (UENTROW(4)))

Tip: Place always an ADD USERSESSION before the UPDATE USERSESSION.
If the UENT session record already exists it doesn't matter.
You will only get message:
TPBL1032 ADD failed for Utpx_user session_id , already exists