Could someone of you help me to know how can I find the output file (outfr14a,outfr14b,outfr14) location from the following code?
if agi ne agi_v
then do;
knkbty = '1';
knkatv = '' ;
knkath = '' ;
agiteg = agi;
link schrijfv;
knkbty = '2';
knkatv = '' ;
knkath = '' ;
agiteg = agi_v;
link schrijfh;
end;
end;
return;
schrijfh:
*schrijf weg met huidige gegevens;
p2kbrn='7';
if substr(khiref,1,1) = '1' then do;
file outfr14a noprint notitles;
link fr14outh;
end;
if substr(khiref,1,1) = '2' then do;
file outfr14b noprint notitles;
link fr14outh;
end;
else if substr(khiref,1,1) = '0' then do;
file outfr14 noprint notitles;
link fr14outh;
end;
return;
return;
schrijfv:
p2kbrn='7';
if substr(khiref,1,1) = '1' then do;
file outfr14a noprint notitles;
link fr14outv;
end;
else if substr(khiref,1,1) = '2' then do;
file outfr14b noprint notitles;
link fr14outv;
end;
else if substr(khiref,1,1) = '0' then do;
file outfr14 noprint notitles;
link fr14outv;
end;
* schrijf weg met huidige gegevens ;
return;
return;
That is impossible from just the code you have provided. outfr14a,outfr14b,outfr14 are file references that have been defined somewhere else, perhaps in a FILENAME statement. Start by looking through the rest of your program for other statements that use those references.
Hi, if filename have been defined you can use pathname()
%let outfr14aLoc = %sysfunc(pathname(outfr14a));
%let outfr14bLoc = %sysfunc(pathname(outfr14b));
%let outfr14Loc = %sysfunc(pathname(outfr14));
- Cheers -
@Oligolas - I stand corrected...
and if not.. I presume it will Output a dat file into the Default Output Location defined in SAS. But I haven't found a way to identify it during a SAS session:
- Cheers -
@Oligolas wrote:
I presume it will Output a dat file into the Default Output Location defined in SAS. But I haven't found a way to identify it during a SAS session:
The path of this so called "current working directory" (not to be confused with the WORK library) can be found as follows (at least on Windows systems):
filename dummy '.';
%put %sysfunc(pathname(dummy));
- Cheers -
Hi,
Am I missing something, or could this information be found in the log?
Regards,
Amir.
@Amir wrote:
Hi,
Am I missing something, or could this information be found in the log?
Regards,
Amir.
To simple 😉
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: