Delete or update with wildcards TPX Batch
search cancel

Delete or update with wildcards TPX Batch

book

Article ID: 23890

calendar_today

Updated On:

Products

TPX - Session Management Vman Session Management for z/OS

Issue/Introduction

Trying to delete with wildcard masking fails:

     DELETE TPX USER(A-)                                     
Mask character  - found where not allowed, suppressing action
VSAM GET return code is    8                                 
 means record not found on file                              
  while DELETing UA- 

Environment

TPX® Session Management for z/OS

Resolution

You cannot delete directly with wildcard masking. You must first extract with wildcard masking, then delete using the extracted file.

You can specify an extract file in a DELETE statement when you want to delete user records, user session records, user profile records, profile records, and profile session records.

The same applies to UPDATE.

Important:

    • When deleting users and profiles using an extract file, always use the extract file to print a report first to make sure that you are not deleting records that you do not want to delete.
    • You should also back up the administration data sets before running Batch.
C                                                                        
C Trying to delete directly with a mask will fail
C
DELETE TPX USER(A-)
Mask character - found where not allowed, suppressing action
VSAM GET return code is 8
means record not found on file
while DELETing UA-
C
EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS (UIDXNAME(A-))
3 Records written GIVING (EXTFILE )
C
SET RTITLE1 ' USERID '
SET RTITLE2 ' ========'
REPORT GIVING(RPTFILE) USING (EXTFILE)
((' &UIDXNAME ' ))
3 Records read USING (EXTFILE )
5 Records written GIVING (RPTFILE )
C
C REVIEW report output before executing the DELETE!!
C
DELETE USER USING(EXTFILE)
UA1 DELETed
UA2 DELETed
UA3 DELETed
3 Records read USING (EXTFILE )
22 records read from SYSIN
TERMINATION REQUEST ACCEPTED

USERID
========
A1
A2
A3

Additional Information