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?
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
This also might work:
data want;
set '/local/claimfiles/.invisible_claim_a';
run;
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 ".";
It won't work. Even with VALIDMEMNAME=EXTEND set you cannot have a period in a member name.
Thanks, that's what I just found out. So is there no way to make a Linux "invisible" file accessible by SAS?
SAS would be able to read in invisible data files using INFILE and INPUT. The restriction only applies to SAS files like datasets.
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!
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.