The SAS Output Delivery System and reporting techniques

Apparent loop with CONTENTS='YES'

Reply
Frequent Contributor
Posts: 102

Apparent loop with CONTENTS='YES'

This code:

=====
/* Get latest copy of tagset from SAS web site */
filename tagset http
'http://support.sas.com:80/rnd/base/topics/odsmarkup/excltags.tpl';
%include tagset / nosource2;

ods tagsets.excelxp file='c:\sas\programs\excelxp\ex5.xls' options(sheet_interval='bygroup' contents='yes');

proc sort data=sashelp.class out=classbysex;
by sex;
run;

proc report data=classbysex nofs missing;
column sex n name age height weight;
define sex / order noprint;
define n / noprint;
break after sex / page;
run;

ods tagsets.excelxp close;
=====

produces a large number (perhaps until the computer runs out of electrons) of error messages:

=====
22976 proc report data=classbysex nofs missing;
22977 column sex n name age height weight;
22978 define sex / order noprint;
22979 define n / noprint;
22980 break after sex / page;
22981 run;

NOTE: Multiple concurrent threads will be used to summarize data.
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
WARNING: In Event: write_contents_entries, Invalid Expression: do /while $entry_count <= $content_values
=====

etc.

This happens on Windows, doesn't happen on MVS.

Specifying index='yes' causes an unloadable file to be created. Specifying contents_workbook='all' doesn't cause any errors, but also doesn't create any contents sheets.
SAS Employee
Posts: 95

Re: Apparent loop with CONTENTS='YES'

Thanks. I'll take a look. I just used this the other day so I'm surprised it's not working.
SAS Employee
Posts: 95

Re: Apparent loop with CONTENTS='YES'

Hi Jack,

I have a fix for you. There were various problems. I'm not sure if it was a compatibility issue with report or a combination of that with a few other strange behaviors. We are currently testing it to make sure it's good to go.

The individual table entries are still missing from the contents worksheet. That could be a proc report compatibility issue. I haven't tracked that down yet. It does successfully create both a contents and an index and everything links the way it should.
Ask a Question
Discussion stats
  • 2 replies
  • 138 views
  • 0 likes
  • 2 in conversation