It looks like you are using Data station to open your file. I always
check for the presence of my file when opening data station first...
So, what I would do in your case is add a step above the one you have
(something like Step = CheckFILE)
Inside the step, I would have the flag set to the file you are trying to
open:
F("MYFILE") = "C:\DAILYFILES\NAME OF FILE" -- whatever and wherever
your file should be
Then, do an IF
IF F("MYFILE") <> "" THEN
STEP = "STEPNAME" this would be the step name you have
below
ELSE
STEP = "END"
End If
Exit Sub
I love the use of flags... They are very handy and from a developer
perspective, it is easy to see on the screen when attempting to step
through the script if the file is found or not.
Kim Scaccia, System Admin
Recovery Reimbursement
Patient Business & Financial Services
Halifax Medical Center
386-226-4590 opt 1 ext 2018
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Walker, Reese
Sent: Saturday, December 08, 2007 11:05 AM
To: [email protected]
Subject: [Talk] File Not Found...?
I have an early morning scheduled script that looks at a network drive
for a certain file. If it doesn't find the file it throws an error, but
the script will keep running. Does anyone know if there is code I could
use to tell the script that if the file is not there, go straight to my
end step, so that it will close and not mess up the scripts that are
scheduled to run afterwards? Thanks in advanced for the help.
I'm looking for something like this...
D.Open_ F("File"), ftFixedLength,
"C:\Bss70\Template\IPAYX_PAYMENTS.bds":
...Go to Step CONNECT TO STAR
IF FILE NOT FOUND...Go to Step END
Reese
Reese E. Walker
Financial Systems Analyst
Phoebe Putney Memorial Hospital
Albany, GA. 31702
Phone: (229) 312-4259
Pager: (229) 431-7658
Fax: (229) 312-4316
________________________________
Disclaimer:
The HIPAA Final Privacy Rule requires covered entities to safeguard
certain Protected Health Information (PHI) related to a person's
healthcare. Information being faxed to you may include PHI after
appropriate authorization from the patient or under circumstances
that do not require patient authorization. You, the recipient, are
obligated to maintain PHI in a safe and secure manner. You may not
re-disclose without additional patient consent or as required by
law. Unauthorized re-disclosure or failure to safeguard PHI could
subject you to penalties described in federal (HIPAA) and state
law. If you the reader of this message are not the intended
recipient, or the employee or agent responsible to deliver it to
the intended recipient, please notify us immediately and destroy
the related message.