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.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 6 replies
  • 767 views
  • 0 likes
  • 4 in conversation