BookmarkSubscribeRSS Feed
wkossack
Calcite | Level 5
I have a project where I have taken the auto generated code and then tried to modify it to generate output. Each time I run the code I get the message window
Unable to download file and a file named

/saswork/SAS_work/#LN00017

is generated. How can I avoid the message window and keep from generating the extra file? I've tried everything I can think of but no luck

ODS _ALL_ CLOSE;
ODS PROCTITLE;
OPTIONS DEV=ACTIVEX;
GOPTIONS XPIXELS=0 YPIXELS=0;
FILENAME EGPDF TEMP;
ODS PDF(ID=EGPDF) FILE=EGPDF STYLE=printer SAS;

GOPTIONS ACCESSIBLE;

data QUERY2; set QUERY;

proc freq data=QUERY2; table size*error/nocol nocum nofreq nopercent;

PROC SQL;
CREATE VIEW WORK.SORT AS
SELECT T.mean_error, T.mean_sample_error, T.size, t.error
FROM WORK.QUERY2 as T
order by t.size
;
QUIT;
SYMBOL1 INTERPOL=NONE HEIGHT=10pt VALUE=CIRCLE LINE=1 WIDTH=2 ;
Axis1 STYLE=1 WIDTH=1 MINOR=NONE order= -10 to 10 by 1 ;
Axis2 STYLE=1 WIDTH=1 MINOR=NONE;
TITLE;
TITLE1 "Scatter Plot";
FOOTNOTE;

PROC GPLOT DATA=WORK.SORT
; by size;
PLOT mean_sample_error * mean_error=error / vref=(-.5 .5)
VAXIS=AXIS1

HAXIS=AXIS2

FRAME ;
/* -------------------------------------------------------------------
End of task code.
------------------------------------------------------------------- */
RUN; QUIT;
TITLE; FOOTNOTE;
GOPTIONS RESET = SYMBOL;

GOPTIONS NOACCESSIBLE;

;*';*";*/;quit;run;
ODS _ALL_ CLOSE;
3 REPLIES 3
wkossack
Calcite | Level 5
I guess I should add that maybe what I'm looking for is what is the minimum amount of the wrapper code that you need to keep when you try to take the generated code and then place it in a macro in a code block
Adrian_Mc
Calcite | Level 5
I think this is all you need to keep. You might have to set the XPIXELS and YPIXELS to something other than 0 for the graph to work properly.


OPTIONS DEV=ACTIVEX;
GOPTIONS XPIXELS=0 YPIXELS=0;

data QUERY2;
set QUERY;
run;

proc freq data=QUERY2; table size*error/nocol nocum nofreq nopercent;

PROC SQL;
CREATE VIEW WORK.SORT AS
SELECT T.mean_error, T.mean_sample_error, T.size, t.error
FROM WORK.QUERY2 as T
order by t.size
;
QUIT;
SYMBOL1 INTERPOL=NONE HEIGHT=10pt VALUE=CIRCLE LINE=1 WIDTH=2 ;
Axis1 STYLE=1 WIDTH=1 MINOR=NONE order= -10 to 10 by 1 ;
Axis2 STYLE=1 WIDTH=1 MINOR=NONE;
TITLE;
TITLE1 "Scatter Plot";
FOOTNOTE;

PROC GPLOT DATA=WORK.SORT
; by size;
PLOT mean_sample_error * mean_error=error / vref=(-.5 .5)
VAXIS=AXIS1

HAXIS=AXIS2

FRAME ;
RUN; QUIT;
TITLE; FOOTNOTE;
Message was edited by: Adrian Mc
Adrian_Mc
Calcite | Level 5
Are you using the code from an Import Data task? If so, it generates these temporary #LN filename references, that only exist while the EG session is open. When you exit EG the reference is lost.

I would suggest that above the code for the import data task you add a file reference:

filename myfile "path-to-your-file";

Then in the import data task code, replace "#LN00017" with "myfile" and try it again.

There's an added complication if you're sas server is a unix server... if the path to your file is not visible from the server this won't work, but I think if you have sas on a windows server it should.

Hope that helps...

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 1613 views
  • 0 likes
  • 2 in conversation