07-27-2011 07:09 AM
When am executing the below code .
If the store(Member) is not present in the pds file('xo94.control.parm') it is failing with member not found .
Could you please help us how to avoid that error if the member is not found .
I can have a display message saying the member not found instead of failing.
input store £;
length ftrw £30.;
infile dummy filevar=ftrw1 sharebuffers end=done;
FILE DUMMY FILEVAR=FTRW1;
input @1 renam £100.;
%INCLUDE rr; //-- renam=tranwrd (renam,'2205','6453');---
07-27-2011 07:47 AM
You will need to test if the value contained in FTRW1 exists. Using either FEXIST or FILEEXIST. I don't know which would be "best" given your OS and the value contain in FTRW1. The following paper covers the subject will enough but does not specifically address your OS which I think is z/OS.
Check out the functions in the online docs, it will basically be something like...
if FILEEXIST(FTRW1) then do;
putlog 'NOTE: File ' ftrw1 'does not exist';
07-27-2011 10:05 AM
You will need to consult your OS specific documention. As I said it goes "something like this".
Look a FEXIST function. You will need to create a tempory FILEREF with the FILENAME function then test using FEXISTS. It's all in the documentation.