The Batch component of TPX allows you to report on and update information in the administration database.
I am trying to clean up obsolete sessions/applids from multiple profiles. Do I need a separate statement for each? Is there a way to use a masking character?
For example:
DELETE TPX PROFILESESSION (* AAAAAA)
-or-
DELETE TPX PROFILESESSION (------- AAAAAA)
TPX® Session Management for z/OS
You cannot delete directly with wildcards. See Delete or update with wildcards TPX Batch.
To delete sessions from multiple profiles directly, you need to provide the profile name and session id:
DELETE TPX PROFILESESSION (PROFILE1 AAAAAA
PROFILE2 AAAAAA
PROFILE3 AAAAAA)
Another way to address this is to extract the profile session records based upon your requirements:
If AAAAAA is the session id, PENTUSER:
EXTRACT GIVING(EXTFILE) PROFILE AND MATCHING SESSIONS
(PENTUSER(AAAAAA))
DELETE PROFILESESSION USING(EXTFILE)
If AAAAAA is the applid, PENTAPPL:
EXTRACT GIVING(EXTFILE) PROFILE AND MATCHING SESSIONS
(PENTAPPL(AAAAAA))
DELETE PROFILESESSION USING(EXTFILE)
If you have more than one session/applid to delete across multiple profiles, here are a few more options:
To delete profile sessions directly, you need to provide the profile name and session id, without any wildcards:
DELETE TPX PROFILESESSION (PROFILE1 AAAAAA
PROFILE1 AAABBB
PROFILE2 AAAAAA
PROFILE2 AAABBB
PROFILE3 AAA999)
You can extract with wildcards:
If AAA* is the session id, PENTUSER:
EXTRACT GIVING(EXTFILE) PROFILE AND MATCHING SESSIONS
(PENTUSER(AAA-----))
DELETE PROFILESESSION USING(EXTFILE)
If AAA* is the applid, PENTAPPL:
EXTRACT GIVING(EXTFILE) PROFILE AND MATCHING SESSIONS
(PENTAPPL(AAA-----))
DELETE PROFILESESSION USING(EXTFILE)
Delete Sessions From Users and Profiles
Using Extract files - Delete Users, Profiles and Sessions
Delete or update with wildcards TPX Batch
We recommend producing a REPORT on the extracted file prior to executing the DELETE so that you can confirm what will be deleted. In addition, we recommend repeating the EXTRACT and REPORT after the delete.