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-
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:
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