Help using Base SAS procedures

PROC EXPORT Error

Reply
New Contributor
Posts: 3

PROC EXPORT Error

Hi,
I’m trying to output a lot of query results to a Excel workbook. All querys export correctly with the exception of the last 2 of them. This first part is the code that runs all correctly if I remove the last 2 code. In the end, that’s the log-report. I’ve check the server, check the table name, I’ve check if the table runs or not, I’ve tried to change the label of the columns, format the numbers. The most strange is that all tables are very similar, all export except that 2. I’m already sick with this. Please help me.

code --- >>>----------------------------------------------------------------------------------->>>
PROC EXPORT DATA= WORK.EXP_X005
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X005";
PROC EXPORT DATA= WORK.EXP_X008_1
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X008_1";
PROC EXPORT DATA= WORK.EXP_X008_2
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X008_2";
PROC EXPORT DATA= WORK.EXP_X009_X032
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X009_X032";
PROC EXPORT DATA= WORK.EXP_X011_1
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X011_1";
PROC EXPORT DATA= WORK.EXP_X011_2
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X011_2";
PROC EXPORT DATA= WORK.EXP_X013
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X013";
PROC EXPORT DATA= WORK.EXP_X014
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X014";
PROC EXPORT DATA= WORK.EXP_X015
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X015";
PROC EXPORT DATA= WORK.EXP_X016
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X016";
PROC EXPORT DATA= WORK.EXP_X017
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X017";
PROC EXPORT DATA= WORK.EXP_X018
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X018";
PROC EXPORT DATA= WORK.EXP_X019
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X019";
PROC EXPORT DATA= WORK.EXP_X024
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X024";
PROC EXPORT DATA= WORK.EXP_X003
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X003";
PROC EXPORT DATA= WORK.EXP_X020
OUTFILE= "E:\base.xls"
DBMS=EXCEL REPLACE;
SHEET="EXP_X020";

RUN;

log error --- >>>----------------------------------------------------------------------------------->>>

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL=%NRBQUOTE(TESTEE resultados);
4 %LET _EGTASKLABEL=%NRBQUOTE(TESTEE resultados);
5 %LET _CLIENTPROJECTNAME=%NRBQUOTE(E:\Rx Docs\GCS\Rx SAS Projects\Projectos
5 ! Efectivos\GIGA FILES\100 Indicadores Gestão v1.egp);
6 %LET _SASPROGRAMFILE=;
7
8 ODS _ALL_ CLOSE;
NOTE: Some of your options or statements may not be supported with the Activex or Java series of
devices. Graph defaults for these drivers may be different from other SAS/GRAPH device
drivers. For further information, please contact Technical Support.
9 OPTIONS DEV=ACTIVEX;
10 FILENAME EGHTML TEMP;
NOTE: Writing HTML(EGHTML) Body file: EGHTML
11 ODS HTML(ID=EGHTML) FILE=EGHTML ENCODING='utf-8' STYLE=EGDefault
11 ! STYLESHEET=(URL="file:///C:/Program%20Files/SAS/Shared%20Files/BIClientStyles/EGDefault
11 ! .css") ATTRIBUTES=("CODEBASE"="http://www2.sas.com/codebase/graph/v91/sasgraph.exe")
11 ! NOGTITLE NOGFOOTNOTE GPATH=&sasworklocation;
12
13 %gaccessible;


14 PROC EXPORT DATA= WORK.EXP_X003
15 OUTFILE= "E:\base.xls"
16 DBMS=EXCEL REPLACE;
17 SHEET="EXP_X003";

1 The SAS System 12:02 Thursday, October 22, 2009

ERROR: File WORK.EXP_X003.DATA does not exist.
18 PROC EXPORT DATA= WORK.EXP_X020
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.71 seconds
cpu time 0.06 seconds

ERROR: Export unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.

19 OUTFILE= "E:\base.xls"
20 DBMS=EXCEL REPLACE;
21 SHEET="EXP_X020";
22
23 RUN;

1 The SAS System 12:02 Thursday, October 22, 2009

ERROR: File WORK.EXP_X020.DATA does not exist.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.54 seconds
cpu time 0.06 seconds

ERROR: Export unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
24
25
26 %LET _CLIENTTASKLABEL=;
27 %LET _EGTASKLABEL=;
2 The SAS System 10:32 Wednesday, October 21, 2009

28 %LET _CLIENTPROJECTNAME=;
29 %LET _SASPROGRAMFILE=;
30
31 ;*';*";*/;quit;run;
32 ODS _ALL_ CLOSE;
33
34
35 QUIT; RUN;
36
Frequent Contributor
Posts: 102

Re: PROC EXPORT Error

The error you are getting says that the SAS datasets WORK.EXP_X003 & WORK.EXP_X020 don't exist. Have you checked that they do, and that they are valid datasets?
New Contributor
Posts: 3

Re: PROC EXPORT Error

Posted in reply to CurtisMack
Yes, i open all tables including those 2. The most estrange is because i can see the both dataset results and i can export the 2 tables via wizard. Only in code Proc Export doesn’t work and doesn’t export.
Frequent Contributor
Posts: 102

Re: PROC EXPORT Error

Were all of these tables created the same way?
New Contributor
Posts: 3

Re: PROC EXPORT Error

Posted in reply to CurtisMack
Yes,
There are 50 queries that end's with tables (x001, x002, etc) and only those 2 doesn't export.
but i find a "solution". if i save the query result on a sasuser server instead of saswork, the PROC EXPORT runs without errors... thanks for your interess


Message was edited by: rxnohadd
Ask a Question
Discussion stats
  • 4 replies
  • 209 views
  • 0 likes
  • 2 in conversation