View previous topic :: View next topic
|
Author |
Message |
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
Do the same commands(mentioned in the thread provided) work for CLIST as well? I guess not. |
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
Do the same commands(mentioned in the thread provided) work for CLIST as well? I guess they dont. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I guess you ought to try |
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
expat wrote: |
I guess you ought to try |
I just did.
It then tells to include /* REX */ as the first command.
Without /* REX */ it does not recognize the commands..... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The commands are TSO commands and therefor common to both REXX and CLIST. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
|