The SAS Output Delivery System and reporting techniques

Strange behavior of proc REPORT

Reply
Contributor
Posts: 33

Strange behavior of proc REPORT

Hi everyone,
I have met a strange problem and I have no idea how to solve it. If someone could help me I'd appreciate it very much :

I created a SAS Stored process with Enerprise Guide, that is actualy just a proc REPORT. In this proc REPORT I define one report item as COMPUTED. I compute it according to values of preceding report items that are taken from SAS dataset.

Strange thing is that when I launch this stored process in the Enterprise Guide, everything work fine, but when I try to run this Stored process in SAS Delivery Portal 2, all values for COMUPTED report item are missing.

Is it possible somehow to solve this problem ?

Thanks in advance.
SAS Super FREQ
Posts: 8,868

Re: Strange behavior of proc REPORT

Sarunas:
Did you turn on the display of your SAS log in the Information Delivery Portal (IDP) to check for errors? It should be a check box before you hit the Execute button in the Portal.
I tested the following stored process in both EG and the IDP -- and it worked OK. It is a simple example but the value of gpct is based on variables from the SAS dataset.
Try this code as a stored process in both EG and the IDP. It does not have any parameters and can be registered to generate streaming output.
Also, this topic probably falls outside the realm of ODS -- as I believe your problem is not really a PROC REPORT issue nor an ODS issue. Can you email me directly and if I can't figure out what the issue is, I can get you in touch with someone who can. (email to Cynthia.Zender@sas.com)
Here's the code. Test it out and email me directly.
Thanks, cynthia
[pre]
*ProcessBody;

%STPBEGIN;

data shoes;
set sashelp.shoes;
where Product contains "Dress";
if product = "Women's Dress" then do;
wamt = sales;
end;
else do;
mamt = sales;
end;
Product= "Dress Shoes";
output;
run;

proc sort data=shoes out=shoes;
by region product;
where Product contains "Dress";
run;

proc report data=shoes nowd split='*';
title "Dress Shoe Sales by Region";
TITLE2 "PROC REPORT COMPUTE in SP";

column Region Product Sales
('Gender Totals' wamt mamt) gpct;
define Region / group;
define Product / group noprint;
define Sales / sum;
define wamt / sum "Women's*Shoes" f=dollar14.;
define mamt / sum "Men's*Shoes" f=dollar14.;
define gpct / computed 'Women/Men*Sales*Percent' f=9.2;
compute gpct;
gpct = (wamt.sum / mamt.sum) * 100;
endcomp;
rbreak after / summarize;
run;

%STPEND;
[/pre]
Contributor
Posts: 33

Re: Strange behavior of proc REPORT

Thank you for your assistance, Cynthia,
I have sent an email to you.
With best regards,
Sarunas
Ask a Question
Discussion stats
  • 2 replies
  • 152 views
  • 0 likes
  • 2 in conversation