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

Creating an ALIAS


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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sun Jun 05, 2011 9:23 pm
Reply with quote

I can do this, e.g. by

Code:
//PRINOIDC JOB (PRINO),
//             'ROBERT AH PRINS',
//             CLASS=A,
//             MSGCLASS=H,
//             MSGLEVEL=(2,0),
//             NOTIFY=&SYSUID
//******************************************************************
//* CREATE ALIAS
//******************************************************************
//IDCAMS  EXEC PGM=IDCAMS
//*
//SYSPRINT  DD SYSOUT=*
//*
//SYSIN     DD *
 DEF ALIAS (NAME('PRINO.Y110601.DATA') -
 RELATE('PRINO.Y110501.DATA')) -
 CATALOG('CATALOG.SYS.USER'))


But how do I make 'PRINO.Y110601.DATA' visible? Tried about everything, but I cannot find it on the system, which makes the whole exercise a bit useless.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Jun 05, 2011 10:39 pm
Reply with quote

is the related 'data' in the same catelog as the the alias?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Sun Jun 05, 2011 11:42 pm
Reply with quote

dbzTHEdinosauer wrote:
is the related 'data' in the same catelog as the the alias?

No, it's not, is that the problem?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 06, 2011 1:15 am
Reply with quote

just tested...
You will have to create an alias from the master catalog to the user catalog

Code:
DEF ALIAS (NAME('PRINO') -
 RELATE('CATALOG.SYS.USER'))


steps to test

1) define a user catalog
2) create an alias TEST
3) allocate a TEST.SAMPLE.PRi
3a) 3.4 shows TEST/TEST.SAMPLE.PRI
4) deleted the alias
4a) 3.4 show nothing
4b) a directed listcat shows TEST.SAMPLE.PRI
5) created an alias TEST.SAMPLE.ALIA of TEST.SAMPLE.PRI
5a) 3.4 shows noting
5b) a directed listcat shows TEST.SAMPLE.PRI / TEST.SAMPLE.ALIA
6) recreated the TEST alias pointing to the user catalog
6a) 3.4 shows TEST/TEST.SAMPLE.PRI/TEST.SAMPLE.ALIA
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Jun 06, 2011 1:26 am
Reply with quote

Enrico,

I have created an user catalog
Code:
def ucat(name('catalog.z110.user') tracks(30 30) vol(prino1))

and two aliases
Code:
def alias (name('pli') relate('catalog.z110.user'))
def alias (name('prino') relate('catalog.z110.user'))

And all my own datasets show up very happily.

However, after a
Code:
DEF ALIAS (NAME('PLI.V3R7M0.SOURCE') RELATE('IEL370.SOURCE')) -
 CATALOG('CATALOG.Z110.USER'))

PLI.V3R7M0.SOURCE is nowhere to be found.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jun 06, 2011 1:40 am
Reply with quote

Hi Robert!
IIRC the base dataset and it's aliases must be cataloged in the same catalog

checked with
Code:
000008    DEFINE ALIAS( -
000009           NAME('TEST.IEL370.SIBMZCMP') -
000010           RELATE('IEL370.SIBMZCMP') ) -
000011           CATALOG(CATALOG.USER.ZAUSR0)


and I get
Code:
IDCAMS  SYSTEM SERVICES                                           TIME: 14:07:59

DEFINE ALIAS( -
NAME('TEST.IEL370.SIBMZCMP') -
RELATE('IEL370.SIBMZCMP') ) -
CATALOG(CATALOG.USER.ZAUSR0)
IDC3022I INVALID RELATED OBJECT
IDC3009I ** VSAM CATALOG RETURN CODE IS 80 - REASON CODE IS IGG0CLER-4
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12
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 How to delete a user's alias from the... JCL & VSAM 11
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Creating CSV file from Variable recs ... DFSORT/ICETOOL 11
No new posts Creating a VB file PL/I & Assembler 10
Search our Forums:

Back to Top