BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
walterwang
Obsidian | Level 7
I am using Proc report to generate a report.
the obs=644776.
I have error messages:
 
ERROR: The SAS System stopped processing this step because of insufficient memory.
NOTE: There were 644776 observations read from the data set WORK.TEMP.
NOTE: PROCEDURE REPORT used (Total process time):
      real time           2:27.35
      user cpu time       2:09.94
      system cpu time     17.51 seconds
      memory              8707369.07k
      OS Memory           10485596.00k
      Timestamp           16/12/2020 03:05:28 PM
      Step Count                        25  Switch Count  41
      Page Faults                       2
      Page Reclaims                     6874226
      Page Swaps                        0
      Voluntary Context Switches        1321
      Involuntary Context Switches      577
      Block Input Operations            40
      Block Output Operations           63184
 
What can I do?
 
Th

ods select all;
ods results off;
options missing="0";
ods excel file="/d/results1512.xlsx"
options (embedded_titles = 'no' embedded_footnotes='no' title_footnote_nobreak='off'
             sheet_interval="table" sheet_name="RTO");
title "";
proc report data=temp;
columns foe GNF17 GF17; 
define foe/ display "field of education" format=$grp. ;
define GNF17/ "2017 Non" format=comma7.;
define GF17/ "2017 yes" format=comma7.;
 
run;

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

At the time of the memory failure, your SAS process consumed 10G of RAM, and I suspect you ran into a limit set (wisely) by the SAS admin.

 

Use PROC EXPORT, as suggested. Or write your data to a csv file, which does not need to have all the XML data ready before running the zip.

View solution in original post

6 REPLIES 6
ChrisNZ
Tourmaline | Level 20

Are you really trying to create a report with 600,000 lines?

andreas_lds
Jade | Level 19

I don't think that proc reports is responsible for the out-of-memory error, but ods excel. Try using proc export with the label-option instead.

ChrisNZ
Tourmaline | Level 20
I'm pretty sure a half million row report will easily run out of memory.
Kurt_Bremser
Super User

At the time of the memory failure, your SAS process consumed 10G of RAM, and I suspect you ran into a limit set (wisely) by the SAS admin.

 

Use PROC EXPORT, as suggested. Or write your data to a csv file, which does not need to have all the XML data ready before running the zip.

walterwang
Obsidian | Level 7
Using CSV file, it works. But there is another issue. there is uni_code. They can be 0011, 0008.
using EXCEL. all good. But using CSV file, they becoem 11,8 etc.
Tom
Super User Tom
Super User

Why would writing UTF-8 characters have any impact on writing a text file?

Here is a simple method to create a CSV file from a dataset.  If you need a header line make that line first and use the MOD option on the FILE statement in the step that writes the data.

data _null_;
  set have;
   file 'mydata_noheader.csv' dsd ;
   put (_all_) (+0);
run;

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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