I copy/paste a code from @Tom to contextualize my question:
How can I "see" what the file looks like?
In the log I get the sas viya id, something like
Filename=/opt/sas/viya/config/var/tmp/compsrv/default/8a8986e5-105d-4b67-bf03-d3eb0ecc7192/SAS_work07BC00006207_bsul2237/#LN00
But I don't have any idea how to make it visible.
data ValList (drop=ValueList);
do ValueList = 100 to 100000000 by 100;
valuenum=put(ValueList,6.);
id=valuenum;
output;
end;
run;
filename code temp;
data _null_;
file code ;
set vallist end=eof;
length str $32767 ;
if _n_=1 then put 'create table oks as select * from vallist where id in (' @;
else put ' ' @;
str = quote(trim(valuenum));
put str ;
if eof then put ');';
run;
proc sql;
%include code ;
quit;
I assume you want to see what gets written to the fileref code
If you review the documentation for the filename statement you will find:
TEMP
creates a temporary file that exists only as long as the filename is assigned. The temporary file can be accessed only through the logical name and is available only while the logical name exists.
So the simple answer is to change your filename statement to point to a file you can access outside of SAS with a text editor
I assume you want to see what gets written to the fileref code
If you review the documentation for the filename statement you will find:
TEMP
creates a temporary file that exists only as long as the filename is assigned. The temporary file can be accessed only through the logical name and is available only while the logical name exists.
So the simple answer is to change your filename statement to point to a file you can access outside of SAS with a text editor
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.