Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Creating an ALIAS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1002
Location: Oostende, Belgium

PostPosted: Sun Jun 05, 2011 9:23 pm    Post subject: Creating an ALIAS
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    Post subject:
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: 1002
Location: Oostende, Belgium

PostPosted: Sun Jun 05, 2011 11:42 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Mon Jun 06, 2011 1:15 am    Post subject: Reply to: Creating an ALIAS
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: 1002
Location: Oostende, Belgium

PostPosted: Mon Jun 06, 2011 1:26 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Mon Jun 06, 2011 1:40 am    Post subject: Reply to: Creating an ALIAS
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Creating an 'Enter' event with IMS MF... dileep chirasani Java & MQSeries 1 Sat Aug 06, 2016 2:23 am
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts creating a physical sequential file i... Shaheen Shaik JCL & VSAM 8 Wed Jun 29, 2016 3:46 pm
No new posts Faccing issues while creating a GDG V... sravindra_s JCL & VSAM 5 Thu Jun 23, 2016 11:26 am
No new posts Define Alias for multiple Data sets u... sandy98669 JCL & VSAM 4 Fri May 27, 2016 1:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us