> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Mainframe Sysprog
> Sent: Thursday, October 02, 2014 10:33 PM
> To: [email protected]
> Subject: Alias relating to Non-VSAM datasets
> 
> Hi List,
> 
> I am trying to define an alias pointing to a non-VSAM dataset. Such as
> HLQ1.DSN catalogued in CATALOG.UCAT1 pointing to HLQ2.DSN.LOADLIB
> catalogued in CATALOG.UCAT2
> 
> Is this possible?
> 
> I tried following IDCAMS control statements but they failed with the
> following message:
> 
> DEFINE ALIAS -
>  (NAME(HLQ1.DSN) -
>    RELATE(HLQ2.DSN.LOADLIB)) -
>   CATALOG(CATALOG.UCAT1)
> 
> IDC3022I INVALID RELATED OBJECT
> IDC3009I ** VSAM CATALOG RETURN CODE IS 80 - REASON CODE IS
> IGG0CLER-4
> 
> The explanation for the message doesn't really offer much help.

Since the HLQ2 dataset is not catalogued in UCAT1, the explanation seems pretty 
straight forward: "The related object does not exist."
 
> If I remove the CATALOG parm from the control statements above, the alias
> does get defined, but it gets catalogued in CATALOG.UCAT2 (I can't seem to
> understand why!)

It is documented to work that way: "If the entryname in the RELATE parameter is 
non-VSAM, choose an aliasname in the NAME parameter. This is done to ensure the 
multilevel alias facility selects the catalog that has the entryname."
 
> The IBM manual doesn't specifically mention if the two HLQ's should be
> cataloged in the same user catalog, but that's what I have been thinking.
> Is that correct?
> 
> Is it possible at all to define the alias pointing to another dataset in
> another catalog?

You might be able to do it with the multilevel alias facility by first defining 
an alias in UCAT1 for HLQ1.DSN that relates to UCAT2 and defining an alias in 
UCAT2 that relates HLQ1.DSN to the desired HLQ2 dataset.  But if you already 
have a dataset named HLQ1.DSN.ABC, it will become invisible to catalog searches 
as noted in the warning "When you add an alias to the catalog, ensure it does 
not cause existing data sets to become inaccessible."

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to