Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Check for authorization to access a PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Akash Sharma

New User


Joined: 13 Jan 2009
Posts: 36
Location: India

PostPosted: Tue Jan 27, 2009 1:33 pm    Post subject: Check for authorization to access a PDS
Reply with quote

Hi all,

I am using a CLIST to write into a PDS. But before writing any records to the PDS, the program should check if the user has the authorization to acces the PDS. i.e to check for access to some High Level Qualifiers.

Is there any command that can help me out here?

A similar CLIST is shown below.

Code:


PROC 0                                                           
ALLOCATE FILE(RTSTR) DA('NUP.RT.SRCH.Q') MOD REU   
OPENFILE RTSTR OUTPUT                                           
SET RTSTR = &SYSNSUB(1,ABCDEFG)                                   
PUTFILE RTSTR                                                   
CLOSFILE RTSTR                                                 
EXIT CODE(0)                                                     



The o/p im getting currently is:
Code:

OPENFILE RTSTR OUTPUT             
INTERNAL COMMAND PROCEDURE ERROR+   
EXEC ERROR CODE S913               


Could you please help me here?
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Tue Jan 27, 2009 1:49 pm    Post subject: Reply to: Check for authorization to access a PDS
Reply with quote

see http://ibmmainframes.com/viewtopic.php?t=30182&highlight=authorization+checking
Back to top
View user's profile Send private message
Akash Sharma

New User


Joined: 13 Jan 2009
Posts: 36
Location: India

PostPosted: Tue Jan 27, 2009 3:52 pm    Post subject: Re: Reply to: Check for authorization to access a PDS
Reply with quote

enrico-sorichetti wrote:
see http://ibmmainframes.com/viewtopic.php?t=30182&highlight=authorization+checking


Do the same commands(mentioned in the thread provided) work for CLIST as well? I guess not.
Back to top
View user's profile Send private message
Akash Sharma

New User


Joined: 13 Jan 2009
Posts: 36
Location: India

PostPosted: Tue Jan 27, 2009 3:52 pm    Post subject: Re: Reply to: Check for authorization to access a PDS
Reply with quote

enrico-sorichetti wrote:
see http://ibmmainframes.com/viewtopic.php?t=30182&highlight=authorization+checking


Do the same commands(mentioned in the thread provided) work for CLIST as well? I guess they dont.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jan 27, 2009 4:14 pm    Post subject:
Reply with quote

I guess you ought to try icon_rolleyes.gif
Back to top
View user's profile Send private message
Akash Sharma

New User


Joined: 13 Jan 2009
Posts: 36
Location: India

PostPosted: Tue Jan 27, 2009 4:17 pm    Post subject:
Reply with quote

expat wrote:
I guess you ought to try icon_rolleyes.gif


I just did.
It then tells to include /* REX */ as the first command.
Without /* REX */ it does not recognize the commands.....
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Tue Jan 27, 2009 4:44 pm    Post subject: Reply to: Check for authorization to access a PDS
Reply with quote

the link was not about the code, but about the logic,
if You are not authorized You will get an error,

the best thing would be to run three tests
1) dataset exists
2) datasets does not exist
3) dataset exist but You are not authorized to it

watch the return code decode it and act accordingly!
Back to top
View user's profile Send private message
Akash Sharma

New User


Joined: 13 Jan 2009
Posts: 36
Location: India

PostPosted: Tue Jan 27, 2009 5:30 pm    Post subject: Re: Reply to: Check for authorization to access a PDS
Reply with quote

enrico-sorichetti wrote:
the link was not about the code, but about the logic,
if You are not authorized You will get an error,

the best thing would be to run three tests
1) dataset exists
2) datasets does not exist
3) dataset exist but You are not authorized to it

watch the return code decode it and act accordingly!


I have tried couple of commands in CLIST including LISTDSI, SYSDSN...
These do tell about the dataset availability...but cannot tell if i have authority to access a PDS or not.

There is a High Level Qualifier for which i can access the PDS characteristics but donot have read or write access. Im getting RC0 for above listed commands, hence unable to handle the error...

I am very new to CLIST and have not coded in REXX too...can u please tell if there is a way to execute REXX commands in CLIST?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jan 27, 2009 5:39 pm    Post subject:
Reply with quote

The commands are TSO commands and therefor common to both REXX and CLIST.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jan 27, 2009 5:59 pm    Post subject:
Reply with quote

Quote:
But before writing any records to the PDS, the program should check if the user has the authorization to acces the PDS. i.e to check for access to some High Level Qualifiers.
You'll need to invoke the API for the security package used on site -- RACF, TOP SECRET, ACF2 -- and pass it the appropriate data to get back the access authorization. You'll probably want to get with your site security team to determine the best way to achieve your goal.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Tue Jan 27, 2009 6:00 pm    Post subject: Reply to: Check for authorization to access a PDS
Reply with quote

Quote:
I am very new to CLIST


since You are new You better start with rexx,
more possibilities, more interfaces, more samples, more skills
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts User access certification In Mainfram... Virendra Shambharkar All Other Mainframe Topics 4 Tue Oct 03, 2017 12:32 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us