DATA Step, Macro, Functions and more

SAS and WPS - Code works in SAS but not WPS

Reply
Contributor
Posts: 38

SAS and WPS - Code works in SAS but not WPS

[ Edited ]

i am trying to run the below code in WPS server but it's not working. However, in SAS studio the code is running sucessfully. Please help me running it on WPS.

 

 

The error file is attached below.


Untitled.png
Super User
Super User
Posts: 7,955

Re: BASE SAS

Posted in reply to atulsingh

Well, from that error it is telling you that refname- a file reference - either has not been set, does not exist, or the system does not have access to the file.  Fix the filref to point to a valid area/file to which the system has access to.

Contributor
Posts: 38

Re: BASE SAS

I don't know, how to provide reference to external files in wps.

Super User
Super User
Posts: 7,955

Re: BASE SAS

Posted in reply to atulsingh

You will need to consult the manual on WPS as I don't use that, however you should be able to do it in the code there with a

fileref rename "<path to file>/<filename>";

 

http://support.sas.com/documentation/cdl/en/hostwin/69955/HTML/default/viewer.htm#n07buc7sg08fdrn1c1...

Super User
Posts: 7,782

Re: BASE SAS

Posted in reply to atulsingh

Use the filename statement, just as you do in SAS. That is very basic SAS syntax.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 19,810

Re: BASE SAS

Posted in reply to atulsingh
WPS reads the file the same way SAS does. In datafile parameter include the full path to your file on your server. Note that your server likely can't see your desktop and any files on your local drive.
Ask a Question
Discussion stats
  • 5 replies
  • 98 views
  • 0 likes
  • 4 in conversation