BookmarkSubscribeRSS Feed
dav_amol
Calcite | Level 5

We have created a Stored procedure to create some reports and publish them on Web Content Server. Given folder contains day wise reports. As user wants to have access to the stored reports on WebDAV conent server , we have created another stored process which facilitate access to given reports. When we were using SAS 9.2 , this was working perfectly fine. WebDAV location was given like relative path in SAS 9.2 code :

 

%let webDavLoc = /SASPortal/syndication.do?com.sas.portal.ItemId=Content+dav://WebDAV/;

 

     Recently we have migrated to SAS 9.4 version. However when we try to use SAS Stored process as URL Display portlet in SAS portal 4.2 , it's not working.We didn't have any syndication channel defined on old server so that won't be an issue. As a workaround , we have added absolute path as given below :

 

%let webDavLoc = http://sasserver:port/SASContentServer/repository/default/sasdav;

 

This workaround is giving us access to desired report.   however, every time it asks for user credentials when it try to fetch the report stored on old server. We would like to have single sign on kind of facility over here.  I'm not sure what I am missing here so can you help me to solve this issue :  

 

Stored process link we used to create URL Display portlet :

 

http://server:port/SASPortal/Director?_directive=STPRun&_program=/Prod/Stored Processes/ViewHistoricalReports

 

 

Original Stored process code : 

 

%let webDavLoc = /SASPortal/syndication.do?com.sas.portal.ItemId=Content+dav://WebDAV/;
options mlogic mprint symbolgen;

/**/
/*proc printto log='/sasdata/DMM_Data/sp_log.log';*/
/*run;*/

%put Report Type: &rType Output Type: &otype ;
%macro date_r();
data _null_;
length month $15.;
rType = "&rType";
%if &rType = WeeklyReport %then
%do;
call symput('report', 'WeeklyReport' );
/* rDate=intnx('week',"&RDATE"d,0);*/
rdate = "&RDATE"d;
%end;
%else %if &rType = MonthlyReport %then
%do;
call symput('report', 'MonthlyReport' );
rdate = "&RDATE"d;
%end;
%else %if &rType = DayAheadReport %then
%do;
call symput('report', 'DayAheadReport' );
rdate = "&RDATE"d;
%end;
%else
%do;
call symput('report', 'DailyReport' );
rdate = "&RDATE"d;
%end;
month=put(rdate,monname.);
call symput( 'date', upcase(put(rdate,date9.)) );
call symput('month', trim(left(month)) );
run;
%mend date_r;
%date_r;

%macro report();

data _null_;
file _webout;
put "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>";
put "<html>";
put "<head>";
put "<title>&rdate..&oType...&</title>";
%if &report = DailyReport %then
%do;
%if &otype = html %then
%do;
put "<meta http-equiv='REFRESH' content='0;url=&WEBDAVLOC/DailyReportHtml/&MONTH/&DATE/DayOf_Archive_&DATE..&OTYPE/content'></HEAD>";
%end;
%else
%do;
/* put "<meta http-equiv='REFRESH' content='0;url=/&WEBDAVLOC/DailyReport/October/13OCT2010/DailyReport_13OCT2010.pdf'></HEAD>"; */
put "<meta http-equiv='REFRESH' content='0;url=&WEBDAVLOC/&REPORT/&MONTH/&DATE/DayOfArch/DayOf_Archive_&DATE..&OTYPE/content'></HEAD>";
%end;
%end;

%if &report = DayAheadReport %then
%do;
%if &otype = html %then
%do;
put "<meta http-equiv='REFRESH' content='0;url=&WEBDAVLOC/DayAheadReportHtml/&MONTH/&DATE/DayAhead_Archive_&DATE..&OTYPE/content'></HEAD>";
%end;
%else
%do;
put "<meta http-equiv='REFRESH' content='0;url=&WEBDAVLOC/DailyAheadReportPDF/&MONTH/&DATE/DayAhead_Archive_&DATE..&OTYPE/content'></HEAD>";
%end;
%end;

%if &report = WeeklyReport %then
%do;
%if &otype = html %then
%do;
put "<meta http-equiv='REFRESH' content='0;url=&WEBDAVLOC/WeeklyReports/WeeklyReportHtml/&MONTH/&DATE/Weekly_Archive_&DATE..&OTYPE/content'></HEAD>";
%end;
%else
%do;
/* put "<meta http-equiv='REFRESH' content='0;url=/&WEBDAVLOC/DailyReport/October/13OCT2010/DailyReport_13OCT2010.pdf'></HEAD>"; */
put "<meta http-equiv='REFRESH' content='0;url=&WEBDAVLOC/WeeklyReports/WeeklyReportPDF/&MONTH/&DATE/Weekly_Archive_&DATE..&OTYPE/content'></HEAD>";
%end;
%end;

%if &report = MonthlyReport %then
%do;
%if &otype = html %then
%do;
put "<meta http-equiv='REFRESH' content='0;url=&WEBDAVLOC/MonthlyReports/MonthlyReportHtml/&MONTH/&DATE/Monthly_Archive_&DATE..&OTYPE/content'></HEAD>";
%end;
%else
%do;
/* put "<meta http-equiv='REFRESH' content='0;url=/&WEBDAVLOC/DailyReport/October/13OCT2010/DailyReport_13OCT2010.pdf'></HEAD>"; */
put "<meta http-equiv='REFRESH' content='0;url=&WEBDAVLOC/MonthlyReports/MonthlyReportPDF/&MONTH/&DATE/Monthly_Archive_&DATE..&OTYPE/content'></HEAD>";
%end;
%end;

put "<BODY>";
put "Searching for &WEBDAVLOC/&REPORT/&MONTH/&DATE/&REPORT/&REPORT._Archive_&DATE..&OTYPE ...";
put "</BODY>";
put "</HTML>";


run;
%mend report;
%report;

 

 

 

 

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
  • 0 replies
  • 836 views
  • 0 likes
  • 1 in conversation