The SAS Output Delivery System and reporting techniques

Cannot get listing output using StatRep package

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Cannot get listing output using StatRep package

[ Edited ]

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


Accepted Solutions
Solution
‎07-04-2017 07:35 AM
SAS Employee
Posts: 2

Re: Cannot get listing output using StatRep package

Posted in reply to phileas85

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


All Replies
SAS Employee
Posts: 2

Re: Cannot get listing output using StatRep package

Posted in reply to phileas85

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

 

New Contributor
Posts: 3

Re: Cannot get listing output using StatRep package

Posted in reply to TimArnold

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

Solution
‎07-04-2017 07:35 AM
SAS Employee
Posts: 2

Re: Cannot get listing output using StatRep package

Posted in reply to phileas85

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

 

New Contributor
Posts: 3

Re: Cannot get listing output using StatRep package

Posted in reply to TimArnold

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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