BookmarkSubscribeRSS Feed
deleted_user
Not applicable
When I use the above to get output from proc tabulate, the columns are not set out in excel properly - i just get everything in the column A cells - with values seperated by half pipe symbols eg: . 949| 528| 1043| 1031| 1132| 850| 899| 447|. Being new to this It could be an obvious fix.

I tried some sas example code which works fine, using the same ods statement/tagset, but example data so what's going on?

Cheers
5 REPLIES 5
garybald
Calcite | Level 5
Would you post the tabulate code please?
deleted_user
Not applicable
ods tagsets.excelxp file='y:\Extract.xml' style=minimal ;

rsubmit;
proc tabulate data = miu;
class stat_typ umony;
table stat_typ, umony*(N*F=5.)
/rts =5 nocontinued;


run;
endrsubmit;

ods _all_ close;
garybald
Calcite | Level 5
I noticed you don't have a var statement. Is umony your analysis variable?
deleted_user
Not applicable
I didn't use a var statement - as the statistic required is N ie a simple count, which the proc defaults to if var is omitted.
Peter_C
Rhodochrosite | Level 12
PBALL


problem is rsubmit

excelxp works only "locally"

you could create the xml on the remote server (put the ods tagsets statements inside the rsubmit block), and arrange "delivery" of the xml in any of a variety of ways, .
> rsubmit;
> ods tagsets.excelxp file="%SYSFUNC(PATHNAME(WORK))/Extract.xml" RS=NONE
> style=minimal ;
>
> proc tabulate data = miu;
> class stat_typ umony;
> table stat_typ, umony*(N*F=5.)
> /rts =5 nocontinued;
>
>
> run;
>
> ods _all_ close;
PROC DOWNLOAD INFILE= "%SYSFUNC(PATHNAME(WORK))/Extract.xml"
OUTFILE= 'y:\Extract.xml' ;
RUN ;
> endrsubmit;

UNFORTUNATELY, handling remote servers on z/OS is less easy to equate to remote server handling for unix or windows platforms, so the above is not good enoughif your remote server is on z/OS. (if you don't know the server platorm, check by submitting
rsubmit ; %put &sysscp &sysscpL &sysVLong ; endrsubmit ;



Alternatively, you could use remote library services to create your xml in the local session, like:

%let rserver = %sysfunc( getoption(remote)) ;
libname rwork remote slibref= work server= &rserver ;

> ods tagsets.excelxp file='y:\Extract.xml' style=minimal ;

proc tabulate data = RWORK.miu;

> class stat_typ umony;
> table stat_typ, umony*(N*F=5.)
> /rts =5 nocontinued;
>
>
> run;
>
> ods _all_ close;
LIBNAME RWORK ;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1569 views
  • 0 likes
  • 3 in conversation