BookmarkSubscribeRSS Feed
dav_amol
Calcite | Level 5
Hi,

I created one stored process which will dynamically generate the HTML page to fullfill dynamic parameter requirement.When I executed the stored process thru SAS Information Delivery portal , it has given me desired results.

Later on when I tried to create an application using same stored process , it is giving below mentioned error message when I tried to use the application thru SAS Information Delivery portal.

Error Message :

Stored Process Error
Error setting stored process parameters.
null

I was wondering why it is giving such error for application and URL display portlets case and executing successfully when I just tried to execute the stored process thru SAS portal.

Any help will be appreciated.

Thanks,
Amol Deshmukh


The actual code for the stored process would be like this :


/**************************************************
Name: drill_parms_stp_onclick.sas
Purpose: Provide an example of drilling down
within an HTML file.
The second selection values are dependant on
the first selection value.

**************************************************/


data class2;
set sashelp.class;
if _n_ < 7 then race=1;
else if _n_ < 14 then race=2;
else race=3;
run;


%macro main;

%global reqtype request age race ;

%macro first;

/* This is the first request. List age groups */


proc summary data=work.class2;
class age;
output out=means1;
run;
data _null_;

set means1 end=alldone;

file _webout;

if _n_ = 1 then do;

thissrv = symget('_url');
thispgm = symget('_program');

put '
';
put '

Selection Example

';
put '

Second Selection is dependant on First

';

put '
';

put '';

put '';

put '
';
put 'Select Age: ';
put '';
put '

';
end;

run;



proc summary data=work.class2;

%if "&age" ne "" and "&age" ne " " %then %do;
where age=&age;
%end;

class race;
output out=means2;
run;

ods html close;
data _null_;

set means2 end=alldone;

file _webout;

if _n_ = 1 then do;
put '
';
put 'Select Race: ';
put '';
put '


';
put 'Show SAS Log';

put '


';
put ' ' onclick="reqtype.value=' "'report'" '">';

put '
';


end;
run;


%mend first;

%macro report;

/* User requested a report */


%let where_clause=%str(1=1);

%if "&race" ne "" %then %do;
%let where_clause = &where_clause and %str(race = &race);
%end;


%if "&age" ne "" and "&age" ne " " %then %do;
%let where_clause = &where_clause and %str(age = &age);
%end;
ods html close;

ods html body=_webout;

Title "Students who are race &race and age &age ";
%stpbegin;
proc print data = work.class2 noobs;

where &where_clause;

var name age sex race;
run;
%stpend;
ods html close;


data temp;
set work.class2;
where &where_clause;

run;

data _null_;

if obscount=0 then do;
file _webout;
put "

No entries were found for this selection

";
put "

race =&race and age = &age

";

end;

set temp nobs=obscount;

run;


%mend report;

%if "&reqtype" = "report" %then %do;
/* Produce a report */
%report;
%end;
%else %do;
/* Produce summary */
%first;
%end;


%mend main;


%main;
2 REPLIES 2
dav_amol
Calcite | Level 5
some how the code is getting truncated , if we want to see the detail sample code just let me know Message was edited by: dav_amol
Cynthia_sas
SAS Super FREQ
Hi:
Sometimes when your code contains < and > symbols, the forum posting gets messed up in one way or another.
If you have very lengthy code, you may just want to contact Tech Support for help. They can look at ALL your code and your various Platform settings for the Portal and help you find a solution to your problem.

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