BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
acordes
Rhodochrosite | Level 12

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;
1 ACCEPTED SOLUTION

Accepted Solutions
AMSAS
SAS Super FREQ

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 


 

View solution in original post

1 REPLY 1
AMSAS
SAS Super FREQ

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 


 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 932 views
  • 0 likes
  • 2 in conversation