Date: Wed, 21 Nov 2001 09:27:41 -0800
Reply-To: Meredith Clark <clarkmeredith@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Meredith Clark <clarkmeredith@YAHOO.COM>
Subject: Re: Rsubmit: How can you program to check for filename error?
In-Reply-To: <e28f1869.0111210708.7dbf394c@posting.google.com>
Content-Type: text/plain; charset=us-ascii
There's a fileexist function in scl you can use. I
don't use the mainframe, so I can't help you with
waiting to resubmit, but the syntax is as follows:
data _null_;
filnm='c:\temp\myfile.dat';
rc=fileexist(filnm);
run;
rc=1 if it exists, 0 if it doesn't.
HTH
Meredith
--- Mark Mullins <mlmullins@BBANDT.COM> wrote:
> I use PC SAS 8.2 and use Rsubmit against 8.2 on
> OS/390. In the
> mainframe world when I submit a batch program, my
> program is put into
> a queue, then runs when files are available. These
> jobs do not try to
> run when files are unavailable. Can I duplicate the
> queue when doing
> rsubmit from PC SAS? Or, can I check to see that a
> filename statement
> did not contain errors? See error example below:
>
> 13 FILENAME CUSTMAST 'G060.CL890.BM.CUST2(0)'
> DISP=SHR;
> ERROR: SVC99 error rc=4, reason=0220 : IKJ56221I
> DATA SET
> G060.CL890.BM.CUST2 NOT ALLOCATED, VOLUME NOT
> AVAILABLE+IKJ56221I
> VOLUME IS ALLOCATED TO ANOTHER JOB OR USER, TRY
> LATER.
> ERROR: Error in the FILENAME statement.
> 14 * CUST MASTER - LIVE FILE;
> 15 *** FILENAME CUSTMAST 'O060.CL000.CUST.MAST'
> DISP=SHR;
> 16 * NOTE EXTENS - PREVIOUS MONTH FILE;
> 17 FILENAME NOTEEXT 'G060.CL890.BM.NOTE.EXT2(0)'
> DISP=SHR;
> ERROR: SVC99 error rc=4, reason=0220 : IKJ56221I
> DATA SET
> G060.CL890.BM.NOTE.EXT2 NOT ALLOCATED, VOLUME NOT
> AVAILABLE+IKJ56221I
> VOLUME IS ALLOCATED TO ANOTHER JOB OR USER, TRY
> LATER.
> ERROR: Error in the FILENAME statement.
> 18
>
> So in essence, I would like to program something
> that says ' If
> FILENAME CUSTMAST is not available or is allocated
> to another user,
> then wait 30 minutes and try again or halt program.
> Today, the
> program continues to run, then I find out when it is
> done that there
> are no records to download.... Valuable help greatly
> appreciated!
>
> Mark L. Mullins
> BB&T Small Business Systems Manager
> 336.733.3425
> mailto:MLMullins@BBandT.com
__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
|