BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
brendanb
Obsidian | Level 7
tried that, noticing this error at the end i dont understand.



69 +
70 +
71 +ods listing close;
72 +data _null_; rc = stpsrv_header('Content-type','application/vnd.ms-excel'); run;

INFO: Character variables have defaulted to a length of 200 at the places given by: (Line):(Column). Truncation can result.
72:15 rc
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 774.62k
OS Memory 32672.00k
Timestamp 2020/10/09 07:37:58 PM
Step Count 8621 Switch Count 0
Page Faults 0
The SAS System

Page Reclaims 2
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0


73 +data _null_; rc = stpsrv_header('Content-type','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); run;

INFO: Character variables have defaulted to a length of 200 at the places given by: (Line):(Column). Truncation can result.
73:15 rc
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 773.71k
OS Memory 32672.00k
Timestamp 2020/10/09 07:37:58 PM
Step Count 8622 Switch Count 0
Page Faults 0
Page Reclaims 2
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 0


74 +
75 +
76 +data _null_; rc = stpsrv_header('Content-disposition', "attachment; filename=subpoena_&caserk._FITACCTSTXNS.xls"); run;

INFO: Character variables have defaulted to a length of 200 at the places given by: (Line):(Column). Truncation can result.
76:15 rc
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
The SAS System

system cpu time 0.00 seconds
memory 774.62k
OS Memory 32672.00k
Timestamp 2020/10/09 07:37:58 PM
Step Count 8623 Switch Count 0
Page Faults 0
Page Reclaims 3
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 0


77 +ODS excel FILE=_webout style=plateau OPTIONS(SHEET_NAME="Class");
78 +proc print data=SASHELP.CLASS; run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.04 seconds
user cpu time 0.04 seconds
system cpu time 0.00 seconds
memory 1837.87k
OS Memory 40388.00k
Timestamp 2020/10/09 07:37:58 PM
Step Count 8624 Switch Count 0
Page Faults 0
Page Reclaims 317
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 7
Block Input Operations 0
Block Output Operations 0


78 !+ quit;
79 +
80 +ODS excel FILE=_webout OPTIONS(SHEET_NAME="Class2");
The SAS System

NOTE: Writing EXCEL Body file: _WEBOUT
81 +proc print data=SASHELP.RETAIL; run;

NOTE: There were 58 observations read from the data set SASHELP.RETAIL.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.10 seconds
user cpu time 0.10 seconds
system cpu time 0.01 seconds
memory 1714.31k
OS Memory 41668.00k
Timestamp 2020/10/09 07:37:59 PM
Step Count 8625 Switch Count 0
Page Faults 0
Page Reclaims 374
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 9
Block Input Operations 0
Block Output Operations 0


81 !+ quit;
82 +
83 +ods excel close ;
NOTE: Writing EXCEL file: ./3F9A708B-5F2B-BD4C-AE18-EABD74948E86
ERROR: Physical file does not exist, /grid/config/Lev1/SASApp/3F9A708B-5F2B-BD4C-AE18-EABD74948E86.
84 +
85 +
86 +* Begin EG generated code (do not edit this line);
87 +;*';*";*/;quit;
88 +
Vince_SAS
Rhodochrosite | Level 12

Try adding a LENGTH statemement:

 

length rc $32767;

 

Vince DelGobbo

SAS R&D

brendanb
Obsidian | Level 7
This works, thanks, thought I could set two replies as a solution.

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
  • 17 replies
  • 3165 views
  • 20 likes
  • 4 in conversation