BookmarkSubscribeRSS Feed
sarunas
Calcite | Level 5
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.
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
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]
sarunas
Calcite | Level 5
Thank you for your assistance, Cynthia,
I have sent an email to you.
With best regards,
Sarunas

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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