IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to delete a user's alias from the system


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
madsanchez

New User


Joined: 27 Jul 2023
Posts: 8
Location: United States

PostPosted: Wed Aug 16, 2023 11:42 pm
Reply with quote

Hi! I was recently instructed to delete a user from the mainframe. I was able to delete the user, but not their alias. I've tried a number of things:
- In ISPF -> 3.4 -> their userID -> 'D' next to their *ALIAS volume -> receive the error 'Not real data set name'.

- Created a JCL and used the IDCAMs utility tool to delete the alias:
//DELALIAS JOB CLASS=A,MSGCLASS=A,MSGLEVEL=
(1,1),PRTY=15,REGION=0M,
// NOTIFY=&SYSUID
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE ALIAS(V000217)
/*
-> When submitted I get this error: IDC3203I ITEM
'ALIAS(V000217.**)'
DOES NOT ADHERE TO RESTRICTIONS
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND. CONDITION
CODE IS 12

- In TSO, I tried the command TSO LISTCAT ENTRY(v000217) to see what
catalog the alias belonged to, received the error:IDC3901I ERROR
QUALIFYING C204700.V000217
IDC3902I ** DEFAULT SERVICE ROUTINE ERROR CODE 20, LOCATE
ERROR CODE 8
IDC0014I LASTCC=4

-I've also tried the tso command: TSO LISTCAT ENTRY(ALIAS) with no luck

Please help!
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Wed Aug 16, 2023 11:55 pm
Reply with quote

Quotation is needed sometimes. How you can delete the User from RACF w/ existing data, I dunno. It basically should be denied by SAF.

So to be sure, no data except the alias exists for that User/Group?
Back to top
View user's profile Send private message
madsanchez

New User


Joined: 27 Jul 2023
Posts: 8
Location: United States

PostPosted: Thu Aug 17, 2023 12:03 am
Reply with quote

Thanks! I just tried adding '' to the alias, and no luck:
IDC3203I ITEM 'ALIAS('V000217')' DOES NOT ADHERE TO RESTRICTIONS
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND. CONDITION CODE IS 12

I'm about 80% sure I'm wrong, but I believe a reason could be because the ALIAS doesn't belong to any catalogs, since I couldn't locate what catalog the alias belonged to using the TSO commands. If that was the case, would I have to add it to a catalog??

I also noticed that the command DELETE ALIAS(V000217) in the JCL views the ALIAS as a dataset. When I researched I found that the IDCAMS JCL is treating the alias as a member and resulting in a condition code of 8, it's likely due to a misunderstanding of the alias structure and how to reference it within IDCAMS. There isn't a utility in z/OS specifically designed to work with aliases in the same way that utilities like IDCAMS work with datasets. Alias management is often closely tied to the underlying datasets, and utilities generally interact with datasets rather than aliases directly.
Back to top
View user's profile Send private message
madsanchez

New User


Joined: 27 Jul 2023
Posts: 8
Location: United States

PostPosted: Thu Aug 17, 2023 12:06 am
Reply with quote

ok So looks like there's some progress.

IKJ56228I DATA SET ALIAS NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
IDC0548I ** MEMBER V000217 NOT DELETED
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Thu Aug 17, 2023 12:11 am
Reply with quote

You want to try the following:
Code:
LISTC LVL(V000217) NAMES

it should bring
Code:
IDC3012I LEVEL V000217 NOT FOUND

If you get something different, something might be wrong. If not, proceed as follows:
Code:
DEL 'V000217' ALIAS


That's it, if you don't have multiple Master Catalogs in use.
Back to top
View user's profile Send private message
madsanchez

New User


Joined: 27 Jul 2023
Posts: 8
Location: United States

PostPosted: Thu Aug 17, 2023 12:23 am
Reply with quote

Youre a literal life saver:

Of course it was as simple as replacing my 'DELETE ALIAS(V000217)' to 'DEL 'V000217' ALIAS' in the JCL. What's weird is that I never saw the 'DEL 'V000217' ALIAS' in any site, even IBM... I geuss that comes from your experience. Here's the rc btw:

13.47.42 JOB48513 $HASP165 DELALIAS ENDED AT JHAPPS2 MAXCC=0000 CN(INTERNAL)

I go to 3.4, to user v000217, and 'No data set names found'...success!

Thanks a ton!
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Thu Aug 17, 2023 12:33 am
Reply with quote

Remember to always check if still data exist before you delete any Aliases. Your Storage Manager is very unhappy to find uncatalogued data without RACF profiles, promised.
That's the primary reason why I have suggested to do a LISTCAT LEVEL(..) NAMES before the DELETE of the Alias.
Back to top
View user's profile Send private message
madsanchez

New User


Joined: 27 Jul 2023
Posts: 8
Location: United States

PostPosted: Thu Aug 17, 2023 12:54 am
Reply with quote

oh ok got it, I will definitely do that in the future. ty!
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Thu Aug 17, 2023 1:36 am
Reply with quote

Why not to read carefully the IBM manual before posting questions?

Delete an Alias Entry in a Catalog: Example 9

Code:
//STEP1     EXEC  PGM=IDCAMS
//SYSPRINT  DD    SYSOUT=A
//SYSIN     DD    *
     DELETE -
            EXAMPLE.NONVSAM1 -
            ALIAS -
            CATALOG(USERCAT4)
/*
Back to top
View user's profile Send private message
madsanchez

New User


Joined: 27 Jul 2023
Posts: 8
Location: United States

PostPosted: Thu Aug 17, 2023 1:39 am
Reply with quote

sergeyken wrote:
Why not to read carefully the IBM manual before posting questions?

Delete an Alias Entry in a Catalog: Example 9

Code:
//STEP1     EXEC  PGM=IDCAMS
//SYSPRINT  DD    SYSOUT=A
//SYSIN     DD    *
     DELETE -
            EXAMPLE.NONVSAM1 -
            ALIAS -
            CATALOG(USERCAT4)
/*


Trust me I looked. This is new to me so I probably didn't know exactly where to look. Plus, how can i delete the alias if I can't find what catalog it belongs to? I may be understanding wrong but i believe the JCL you sent requires the user to know what it's catalog is. I have done commands to find it, with no success. It's highly possible I am just not looking in the right place to find it.

Forums are made for requesting insight of more experienced individuals. I really appreciate all of the advice!
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Aug 17, 2023 8:25 am
Reply with quote

Code:
//STEP1     EXEC  PGM=IDCAMS
//SYSPRINT  DD    SYSOUT=A
//SYSIN     DD    *
     DELETE -
            EXAMPLE.NONVSAM1 -
            ALIAS -
            CATALOG(USERCAT4)
/*


I do not particularly like that example, mainly because I do not think it matches madsanchez's situation. Also, it is not clear in my mind what the command does (I do not like the use of the CATALOG parameter).

Let me think through this... let me start with the beginning:
You would create an entry in the master catalog, which specifies which user catalog the actual datasets will be cataloged in. Something like this:
Code:
DEFINE ALIAS NAME('USER1') RELATE('SYS1.CAT2')

USER1 datasets will be cataloged in SYS1.CAT2, but the alias entry itself is defined in the master catalog. This creates a logical link from the master catalog to SYS1.CAT2 for 'USER1', so that the system knows where to catalog or find USER1 datasets.

I think you would only use the CAT() parameter if you are working on another system's datasets:
Code:
DEFINE ALIAS NAME('USER1') RELATE('SYS1.CAT2') CAT(USERCAT4)

or if you specify the name of the master catalog.

If you delete an alias with:
Code:
DELETE 'USER1' ALIAS

it severs the logicial link between the master catalog and SYS1.CAT2.

If you delete an alias and specify a catalog, like this:
Code:
DELETE 'USER1' ALIAS CAT(USERCAT4)

it severs the logicial link for USER1 between the USERCAT4 and SYS1.CAT2.


In short, I do not think you should use the CAT() parameter unless you have two systems that can access each other's catalogs. If you specify CAT() on DEFINE and DELETE commands for system you are running on, you risk confusing yourself and the system.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Thu Aug 17, 2023 4:53 pm
Reply with quote

Actually my major point was: the original post is using WRONG SYNTAX OF IDCAMS command:
Code:
DELETE ALIAS(V000217)

It is not related to the later discussion about CATALOG parameter, etc.
Unless all syntax errors have been fixed, it makes no sense to discuss whatever else.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts user exit in IBM Infosphere Optim DB2 8
Search our Forums:

Back to Top