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

I want to use the StatRep package at work but have some problems when doing so. The neccesary SAS file is created after compiling the tex file the first time. When running the SAS code however I can´t produce the listing files. I get a error message that states "the physical file does not exist" and then there´s a reference to my directory which is the correct one. I don´t have the same problem with the .png file, the graphics is compiled nicely in the final PDF.

 

Any idea what to do about the .lst file problem?

 

Using SAS EG version 7.1 and TeXworks

 

Best

Filip

1 ACCEPTED SOLUTION

Accepted Solutions
TimArnold
SAS Employee

hi,

It looks like this is problem of file paths, not with StatRep itself.

The StatRep-generated SAS program needs to write the output files to the disk, but it looks like there is a mismatch between server and client.  That is, it looks like the %write macro is looking for, but cannot find, the path to the 'lst' directory.

 

EG submits the code to the SAS server and the SAS server executes the code. 

So, it would be the SAS session that is unable to write the file:

the server cannot access //fi.se/dfs/Users_W7/fipe/Desktop/Latex/lst which I'm guessing is your local machine.

 

Any paths in your SAS code are relative to the server, not EG (the client). 

For example, if you were writing to “c:\temp”, that is “c:\temp” on the server, not the client.

 

I'm not sure but hopefully this will help:

https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Physical-file-does-not-exist/td-p/109855

 

or the section "REFERENCE AN EXTERNAL FILE IN YOUR PROGRAM"  in this SGF paper:

http://support.sas.com/resources/papers/proceedings13/415-2013.pdf

 

Best regards,

--Tim

 

View solution in original post

4 REPLIES 4
TimArnold
SAS Employee

Hi,

It sounds like you are very close to success since the graphics are present. First, I would make sure there are no errors in your program by reviewing the SAS log output. If there are no errors, you should see a message indicating where the listing file was created.

What does your \Listing tag look like?

 

If that doesn't lead you to an answer, maybe you could attach your LaTeX file to a reply and I'll see what's going on.

 

Best regards,

--Tim Arnold

 

phileas85
Calcite | Level 5

Thanks for your reply!

 

I get a error message in the SAS log that looks as follows:

 

%write(rega,store=class,type=listing)

 

NOTE: Processing document class.

 

Note: New page for \Reg#1\MODEL1#1\Fit#1\Weight#1\NObs#1

 

Note: Writing Listing file :

 

//fi.se/dfs/Users_W7/fipe/Desktop/Latex/lst/rega.lst

 

ERROR: Physical file does not exist,

 

\\fi.se\dfs\Users_W7\fipe\Desktop\Latex\lst\rega.lst.

 

RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7

 

1 The REG Procedure

 

71

 

kl=1 fn=//fi.se/dfs/Users_W7/fipe/Desktop/Latex/lst/rega.lst

 

line=The REG Procedure page=0 l=. _ERROR_=1 _N_=1

 

Objects Type Status Group

 

Reg.MODEL1.Fit.Weight.NObs Table .

 

Reg.MODEL1.Fit.Weight.ANOVA Table .

 

Reg.MODEL1.Fit.Weight.FitStatistics Table .

 

Reg.MODEL1.Fit.Weight.ParameterEstimates Table .

 

Reg.MODEL1.ObswiseStats.Weight.DiagnosticPlots. Graph .

 

DiagnosticsPanel

 

Reg.MODEL1.ObswiseStats.Weight.ResidualPlots. Graph .

 

ResidualPlot

 

 

ERROR: Macro write ended abnormally.

 

 

My listing tag in Latex is:

 

\Listing[store=class,

caption={Regression Analysis}]{rega}

 

Best regards

 

Filip

TimArnold
SAS Employee

hi,

It looks like this is problem of file paths, not with StatRep itself.

The StatRep-generated SAS program needs to write the output files to the disk, but it looks like there is a mismatch between server and client.  That is, it looks like the %write macro is looking for, but cannot find, the path to the 'lst' directory.

 

EG submits the code to the SAS server and the SAS server executes the code. 

So, it would be the SAS session that is unable to write the file:

the server cannot access //fi.se/dfs/Users_W7/fipe/Desktop/Latex/lst which I'm guessing is your local machine.

 

Any paths in your SAS code are relative to the server, not EG (the client). 

For example, if you were writing to “c:\temp”, that is “c:\temp” on the server, not the client.

 

I'm not sure but hopefully this will help:

https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Physical-file-does-not-exist/td-p/109855

 

or the section "REFERENCE AN EXTERNAL FILE IN YOUR PROGRAM"  in this SGF paper:

http://support.sas.com/resources/papers/proceedings13/415-2013.pdf

 

Best regards,

--Tim

 

phileas85
Calcite | Level 5

Thanks for the reply. Haven´t found an immediate solution to my problem, I´m restrained by other tasks at work as well. However, I´m going to attend a SAS user forum in Stockholm tomorrow and I´m hoping that I can get hold of a expert there who will be able to guide me a bit. I think it´s crutial to our organization that we can get the connection between Latex and SAS EG to work. Our analyzes needs to be presented a clinical and reproducible way.  

 

Best

Filip

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1083 views
  • 0 likes
  • 2 in conversation