Date: Wed, 9 May 2001 09:17:55 +0200
Reply-To: Ronald Höllwarth
<Ronald.Hoellwarth@SCHWAEBISCH-HALL.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ronald Höllwarth
<Ronald.Hoellwarth@SCHWAEBISCH-HALL.DE>
Subject: Antwort: Re: How do I verify if I have access to a file under MVS?
Content-type: text/plain; charset=iso-8859-1
hello Peter,
My code:
filename a 'daa.sas.prod.macros'; /* here i have access */
filename b 'ISAT1.AKTIN.MSG'; /* no access */
%macro x;
%let ww=%sysfunc(fopen(a)); /* no problem */
%put &ww;
%let vv=%sysfunc(fopen(b)); /* here I get the message below */
%put &vv;
%mend;
%x;
but - when I run this code i don't get vv=1. The output is:
181 filename a 'daa.sas.prod.macros';
182 filename b 'ISAT1.AKTIN.MSG';
183 %macro x;
184 %let ww=%sysfunc(fopen(a));
185 %put &ww;
186 %let vv=%sysfunc(fopen(b));
187 %put &vv;
188 %mend;
189 %x;
MLOGIC(X): Beginning execution.
MLOGIC(X): %LET (variable name is WW)
MLOGIC(X): %PUT &ww
SYMBOLGEN: Macro variable WW resolves to 0
0
MLOGIC(X): %LET (variable name is VV)
MLOGIC(X): %PUT &vv
SYMBOLGEN: Macro variable VV resolves to 0
0
MLOGIC(X): Ending execution.
I didn't save the Code i used before my reply where I got 1 for that what now
is called vv and was then called rc. The one above is how I would do it now -
but here I get two times 0 for ww and vv. Additionaly I get the following
ERROR-Message from the System when I want to fopen() the filename b:
ICH408I USER(#250191 ) GROUP(KB ) NAME(HöLLWARTH, RONALD )
ISAT1.AKTIN.MSG CL(DATASET ) VOL(IC1300)
INSUFFICIENT ACCESS AUTHORITY
FROM ISAT1.** (G)
ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )
IEC150I 913-38,IFG0194E,#250191,ICQPROC,B,087C,IC1300,ISAT1.AKTIN.MSG
***
And THAT's exactly what I want to avoid. Perhaps there is a solution using the
REXX-Interface but I don't know enough about OS/390 and how to use REXX there.
Thank's for helping so far!
greetings from schwaebisch hall, germany
ronald hoellwarth
---------------------- Weitergeleitet von Ronald Höllwarth/PK/Kreditwerk on
09.05.2001 09:03 ---------------------------
"Peter Crawford" <peter.crawford@db.com> on 08.05.2001 18:00:15
An: ronald.hoellwarth@kreditwerk.de
Kopie:
Thema: Antwort: Re: How do I verify if I have access to a file under MVS?
could you post your test code ?
I worry when you refer to RC=1,
I would be testing the FileID returned rom FOpen()
Datum: 07/05/2001 08:13
An: SAS-L@listserv.uga.edu
Antwort an: ronald.hoellwarth@kreditwerk.de
Betreff: Re: How do I verify if I have access to a file under MVS?
Nachrichtentext:
On Fri, 4 May 2001 16:20:43 +0100, Peter Crawford <peter.crawford@DB.COM>
wrote:
>If the file exists, you can use the failure of fopen() to return a fileID
file handle as a signal, and the message in sysmsg() as confirmation, all
under program control.
Hello Peter,
I tried the fopen-Call with a file I have access to and with one where I get
the READ-Access-not-allowed message if I want to open it in an editor.
The result is, that I get the RC of 1 but also I get the ugly Error-Message
from the system. and that's exactly what I didn't want.
greetings from schwaebisch-hall, germany
ronald hoellwarth
--
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie
diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail
ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorised
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.