View previous topic :: View next topic
|
Author |
Message |
madsanchez
New User
Joined: 27 Jul 2023 Posts: 8 Location: United States
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
madsanchez
New User
Joined: 27 Jul 2023 Posts: 8 Location: United States
|
|
|
|
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 |
|
|
madsanchez
New User
Joined: 27 Jul 2023 Posts: 8 Location: United States
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
madsanchez
New User
Joined: 27 Jul 2023 Posts: 8 Location: United States
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
madsanchez
New User
Joined: 27 Jul 2023 Posts: 8 Location: United States
|
|
|
|
oh ok got it, I will definitely do that in the future. ty! |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2140 Location: USA
|
|
|
|
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 |
|
|
madsanchez
New User
Joined: 27 Jul 2023 Posts: 8 Location: United States
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2140 Location: USA
|
|
|
|
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 |
|
|
|