BookmarkSubscribeRSS Feed
Aexor
Lapis Lazuli | Level 10

Hi All,

 

Need help in below query:

 I was trying to  migrate a SAS program, which is present sas9.4, to VIYA. I am getting issue in the below lines 

 

Libname Target "\\folderA\Data\abc";

%include "xyz";

Infile weight Delimiter=' ;

 

Please suggest a way to resolve . 

Also  do we have any macro to remediate the issue, so we don't have to do it again for every libname/infile/include statement?

 

Any help will be highly appreciated.

Thanks.

 

4 REPLIES 4
SASKiwi
PROC Star

Is this really the program you are trying to migrate?

It wouldn't work in SAS 9.4 either because of missing statements and syntax errors.

 

For example, this statement - Infile weight Delimiter=' ; - does not have a closing quote or a delimiter character.

You are also missing a DATA statement before the INFILE statement.

 

Please post your complete SAS log including notes and errors so we can give you better advice.

 

 

Aexor
Lapis Lazuli | Level 10
Thanks!
I completely understand your concern. These lines are from different program.
These are basically code check outputs I got from SAS content Assessment tool.

I am yet to migrate it to sas viya.
just looking for better options
SASKiwi
PROC Star

In that case these are statements that likely won't migrate cleanly as they contain directory references.

 

There's no short cut to migration testing unfortunately. You just have to put in the hard yards.

ChrisNZ
Tourmaline | Level 20

As @SASKiwi said this line of code is invalid.

infile WEIGHT delimiter=' ;

As for the path, you might get away with the problem by adding the smb: protocol to the path, depending on your server and network config. 

libname TARGET "smb://server/share/Data/abc";

Another option is to get the SMB shares mounted. Talk to the (future?) Linux/Unix admin.

Hard-coded paths in programs are best avoided.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 4 replies
  • 946 views
  • 3 likes
  • 3 in conversation