BookmarkSubscribeRSS Feed
gphunt
Fluorite | Level 6

In Linux a file can be made "invisible" by adding a period to a filename.  For example a file xx is visible whereas .xx is invisible to a GUI.  My goal is to make a view that references an invisible file such as:

 

libname claims '/local/claimfiles/';

data claims.vw_claim_a / view=claims.vw_claim_a;  /* this is the visible view */

1.    set claims.invisible_claim_a;                               /* this is the invisible file */

       ...pgm code...;

run;

 

data view_result;

    set claims.vw_claim_a;

    ...pgm code...

run;

 

In this example line "1." above, the file "invisible_claim_a" is ACTUALLY an invisible file defined as ".invisible_claim_a" with the leading period.  If I just write the statement "1." above as it is, I get the error that "invisible_claim_a" does not exist.  Of course this is correct because it is really named ".invisible_claim_a" (with the preceeding period).  How do I get around this to point the DATA VIEW to the invisible file?

6 REPLIES 6
Kurt_Bremser
Super User

A dot is not valid in SAS names, except with system option validmemname=extend and the use of a name literal.

So, with

options validmemname=extend;

this might work:

set claims.'.invisible_claim_a'n;

if the file is named

.invisible_claim_a.sas7bdat
SASKiwi
PROC Star

This also might work:

data want;
  set '/local/claimfiles/.invisible_claim_a';
run;
gphunt
Fluorite | Level 6

This still resulting in an error "is not a valid SAS member name".  When I look at the SAS documentation for OPTIONS VALIDMEMNAME=EXTEND, one of the rules is that the name cannot begin with a ".";

Tom
Super User Tom
Super User

It won't work. Even with VALIDMEMNAME=EXTEND set you cannot have a period in a member name.

gphunt
Fluorite | Level 6

Thanks, that's what I just found out.  So is there no way to make a Linux "invisible" file accessible by SAS?

SASKiwi
PROC Star

SAS would be able to read in invisible data files using INFILE and INPUT. The restriction only applies to SAS files like datasets.

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 526 views
  • 0 likes
  • 4 in conversation