Previous Topic: Operand ExplanationsNext Topic: Example 2: Deleting User Sessions


Example 1: Deleting User IDs

An administrator has discovered some user IDs that have not been used for a long time. The user IDs were named using an old naming convention and all begin with HSP. The administrator executes the following statements in a batch job:

EXTRACT GIVING(DELUSRS) USER AND NO SESSIONS (UIDXNAME(HSP-----)) 
DELETE USER USING(DELUSRS)

The EXTRACT statement produces the extract file named DELUSRS, which contains the merged user definition for each user ID in the list of extraction criteria. The DELETE statement deletes the user records, user session records, user profile records and maintenance authorization group names for each user.