BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AnnaBaukje
Calcite | Level 5

Hi!

 

I'm having trouble to understand why this does work:

 

FILENAME asc0808 FILESRVC

    FOLDERPATH='/07. Team/02.Development/Case1'

    FILENAME='2019.08.08_mutations.asc';

 

data a1;

    infile asc0808 delimiter = '|' dsd lrecl=1000 firstobs=1;

    informat onbewerkt $1000.;

    format onbewerkt $1000.;

    input onbewerkt;

run;

 

And this does not

 

data a1;

    infile '/07. Team/02.Development/Case1/2019.08.08_mutations.asc' delimiter = '|' dsd lrecl=1000 firstobs=1;

    informat onbewerkt $1000.;

    format onbewerkt $1000.;

    input onbewerkt;

run;

 

The error message is: Physical file does not exist, '/07. Team/02.Development/Case1/2019.08.08_mutations.asc'

This is the exact location I see when I look at the properties of the file reference of asc0808

 

Can anybody explain? To me I'm doing exactly the same, but apparently not...

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

The FILESRVC device type is needed to access files in the SAS Viya Files service. From my research in the SAS documentation, this device type seems to be available in FILENAME statements, but not in INFILE statements.

The location you specify in the FILENAME FILESRVC statement is not a physical one in a filesystem, but rather a virtual one in the Files service database. Therefore it will not work in a "normal" INFILE statement.

View solution in original post

2 REPLIES 2
Shmuel
Garnet | Level 18

Pay attention, that in first code:

     FILENAME asc0808 FILESRVC

there is a definition of the engine need to open the file.

Without assigning an engine SAS tries to open a text file.

Kurt_Bremser
Super User

The FILESRVC device type is needed to access files in the SAS Viya Files service. From my research in the SAS documentation, this device type seems to be available in FILENAME statements, but not in INFILE statements.

The location you specify in the FILENAME FILESRVC statement is not a physical one in a filesystem, but rather a virtual one in the Files service database. Therefore it will not work in a "normal" INFILE statement.

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 connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 612 views
  • 2 likes
  • 3 in conversation