BookmarkSubscribeRSS Feed
deleted_user
Not applicable
we have experienced considerably greater CPU time and elapsed time when using ods csv and proc print than when using an internally created macro for building a csv file.
DATA : 18,500 rows 30 columns
platform: SAS9.1.3 sp4 on z/OS V01R08M00
times :
ODS CSV 40+secs CPU, 6+mins elapsed
macro <1sec CPU <2secs elapsed

I'm surprised that the ODS destination is using so much processing.

For the HTML destination, the proc print times are
1.6 secs CPU
26.2 secs elapsed.

Why would HTML be so much quicker than CSV?
What is going on "under the covers"?

PeterC
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi, Peter:
Have you checked out this Tech Support note:
http://support.sas.com/kb/13/415.html

...and downloaded a new version of the CSV tagset? It may be that your process will -still- work faster -- because you KNOW exactly how you want things to be written and ODS CSV still has some internal checking that it does.

The note considers the problem fixed at SAS 9.2 -- so if you're at SAS 9.13 or SAS 8 on the mainframe, you may want to talk to Tech Support to see if there are any other suggestions they have for performance improvement.

cynthia
deleted_user
Not applicable
Cynthia

thank you
I'll look at how the tagset code varies.
We "had a bit of trouble" implementing the updated excelXP so I'm only going to follow that route for CSV if it is really beneficial versus the hassle of coping with NLS issues for perl regex.
What I find hard to understand is the complexity.
We use default formats as defined in the SAS data set header.
We use the variable order as proc print would produce without a VAR statement....
We are using defaults all the way.
Clearly the tagset is doing much more for us.

Hopefully, the updated tagset will perform with run times more like the HTML destination.

I've referred this thread to our UK Tech Support to clarify SAS92 availability for our z/OS.

PeterC
Cynthia_sas
SAS Super FREQ
Hi, Peter...

Yes...but PROC PRINT is adding a layer of "reporting" between the data set and the output destination -- even if you're taking all the defaults.

The complexity comes in because a dataset can't have a PROCTITLE, a dataset can't have a SAS Title or a SAS Footnote or a BYLINE or a SUMBY or a BY and a PAGEBY. A dataset doesn't have the potential for page numbers on each page. So, ODS CSV, even if it's going to ignore many of these features of PROC PRINT, still has some checking that it does...that's related to

So even though it seems like there's no difference between PROC PRINT and PROC EXPORT to CSV, there is a difference...and it's the difference between DATA and REPORTS. I know that the tagset is doing more behind the scenes -- for example, if you have a formatted value that might give Excel fits, then I believe that ODS CSV strips out offending characters. Sometimes, for example, you have a field that's numeric, but with a % or a $ in the field, Excel treats the number as a character and it gives you that funny green triangle in the cell. Those are some of the things that ODS CSV is trying to fix for you. I know that newer versions of the tagset do the checking in different ways.

I don't actually know _all_ that the tagset is doing, just what I've experienced in using it. Most of the time, I use TAGSETS.EXCELXP.

cynthia

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!

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