BookmarkSubscribeRSS Feed
andreas_lds
Jade | Level 19

The version of Enterprise Guide is not tied to a specific sas-version, so please execute the code i posted.

CharlesFowler72
Obsidian | Level 7
1 The SAS System 09:04 Friday, September 14, 2018

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='as above but test';
4 %LET _CLIENTPROJECTPATH='\\GBMLVFILFS05N02\Home3$\fowlchl\Documents\Documents\SAS\RFW.egp';
5 %LET _CLIENTPROJECTNAME='RFW.egp';
6 %LET _SASPROGRAMFILE=;
7
8 ODS _ALL_ CLOSE;
9 OPTIONS DEV=ACTIVEX;
NOTE: Procedures may not support all options or statements for all devices. For details, see the documentation for each procedure.
10 GOPTIONS XPIXELS=0 YPIXELS=0;
11 FILENAME EGSR TEMP;
12 ODS tagsets.sasreport12(ID=EGSR) FILE=EGSR STYLE=Analysis
12 ! STYLESHEET=(URL="file:///V:/VOE06529.100/VFS/SFT_PROGRAM_FILES_X64/SAS92/EnterpriseGuide/4.3/Styles/Analysis.css")
12 ! NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation ENCODING=UTF8 options(rolap="on");
NOTE: Writing TAGSETS.SASREPORT12(EGSR) Body file: EGSR
13
14 GOPTIONS ACCESSIBLE;
15 %put &=SYSVLONG;
&=SYSVLONG
16
17 GOPTIONS NOACCESSIBLE;
18 %LET _CLIENTTASKLABEL=;
19 %LET _CLIENTPROJECTPATH=;
20 %LET _CLIENTPROJECTNAME=;
21 %LET _SASPROGRAMFILE=;
22
23 ;*';*";*/;quit;run;
24 ODS _ALL_ CLOSE;
25
26
27 QUIT; RUN;
28
andreas_lds
Jade | Level 19

From your log:

12 ! STYLESHEET=(URL="file:///V:/VOE06529.100/VFS/SFT_PROGRAM_FILES_X64/SAS92/EnterpriseGuide/4.3/Styles/Analysis.css")

 

This SAS 9.2 and now the bad news: you need Access To PC Files licenced to create xls-files. And with that module you can't create xlsx-files.

Tom
Super User Tom
Super User

Since you are running an ancient version of SAS you cannot use the XLSX engine.  You could try PROC EXPORT.

Or you might have to resort to producing an XML or HTML file and telling the use to let Excel convert it to a spreadsheet.

CharlesFowler72
Obsidian | Level 7

so based on my current code of

FILENAME mail EMAIL TO='me@company.co.uk>' 
SUBJECT="D Jumpers" CONTENT_TYPE="text/html";
ODS HTML BODY=mail;
PROC PRINT DATA=work.D_Jumpers;
RUN;
ODS HTML CLOSE;

how do I change that to be an attachment rather than body of the email. Again, avoiding any path files.

 

Tom
Super User Tom
Super User

Something like this.

%let path=%sysfunc(pathname(work));
ODS HTML file="&path/d_jumpers.html";
PROC PRINT DATA=work.D_Jumpers;
RUN;
ODS HTML CLOSE;

data _null_;
  file mail email 
    TO='me@company.co.uk>' 
    SUBJECT="D Jumpers" 
    attach="&path/d_jumpers.html" 
  ;
  put 'See attached HTML file for report';
run;
CharlesFowler72
Obsidian | Level 7
getting the following error..."ERROR: An attachment record was truncated. The attachment LRECL is too small."

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 21 replies
  • 1898 views
  • 0 likes
  • 5 in conversation