Your SAS programs, embedded in web apps and elsewhere

Publishing excel and pdf to xythos

Reply
N/A
Posts: 0

Publishing excel and pdf to xythos

All,

I have figured out how to publish pdf files to xythos. However, excel files get sent as data sets. Has anyone found a way to have the excel file show up in xythos? We intend to automate everything. Scenario:

1) program runs as a job via job scheduler.
2) the output could be in 2 formats, excel and/or pdf
3) the output should be sent to xythos in its original format (i.e. excel shows up as excel in xythos, not data set)
4) when user logs into the portal, the new excel/pdf file should show up for the user (if they are authorized to see it)
5) when the job runs the next day or week or month, the output should have a different name so that users can see old data.

Has anyone accomplished this? if so, how? I already asked SAS support they said I will need to write custom code to accomplish this. I just wanted to know if folks in other companies are doing this, or what other possible alternatives are available.

Thanks in advance.
SAS Super FREQ
Posts: 304

Re: Publishing excel and pdf to xythos

Posted in reply to deleted_user
Can you post some simple SAS code that illustrates how you are publishing the files?

Vince
SAS R&D
N/A
Posts: 0

Re: Publishing excel and pdf to xythos

Posted in reply to Vince_SAS
Here it is:

/* ------------------------------------------------
Package: pdf to xythos
To channel: test of xythos
SAS Server: SASMain
------------------------------------------------
*/
ODS _ALL_ CLOSE;
/* Diagnostic function */
%macro chkrc(function);
%if &rc = 0 %then %put "NOTE: &function succeeded.";
%else %do;
%let msg = %sysfunc(sysmsg());
%put &function failed - &msg;
%end;
%mend;

/* package preamble */
%let package_options = ABSTRACT;
%let pid = 0;
%let rc = 0;
%let namevalue= ;
%let abstract_text= %nrbquote(Published Automatically on 11/15/06);
%let description = %nrbquote(pdf to xythos);
%syscall package_begin(pid, description, namevalue, rc, package_options, abstract_text);
%chkrc(Package Begin);

/* Add the "path\filename" file */
%let description = %nrbquote(filedescription);
%let namevalue = ;
%let body = %nrbquote(filenameSmiley Tongueath\filename);
%let type = BINARY;
%let mimetype = %nrbquote(application/pdf);
%syscall insert_file(pid, body, type, mimetype, description, namevalue, rc);
%chkrc(Insert File);

/* Publish the package */
%let pubType = TO_SUBSCRIBERS;
%let pub_properties = CHANNEL_STORE, PARENT_URL, METAUSER, METAPASS;
%let channelURI = %nrbquote(SAS-OMA://serverSmiley Tongueort/reposname=reponame);
%let channel = %nrbquote(test of xythos);
%let url = ;
%let muser = %nrbquote(domain\id);
%let mpass = %nrbquote(password);
%syscall package_publish(pid, pubType, rc, pub_properties, channelURI, url, muser, mpass, channel);
%chkrc(package publish);
SAS Super FREQ
Posts: 8,862

Re: Publishing excel and pdf to xythos

Posted in reply to deleted_user
Every time you see Smiley Tongue above, replace it with colon followed by the letter 'p' (: p).
cynthia

Note to forum monitor: the use of square bracket+pre, etc does NOT prevent the colon+p from getting turned into a smiley face. For example, this section is a "pre" section:
[pre]
colon p Smiley Tongue
colon ) Smiley Happy
semicolon ) Smiley Wink
[/pre]
I thought the 'pre' and '/pre' would prevent these letter/punctuation combos from getting translated to a smiley??
Ask a Question
Discussion stats
  • 3 replies
  • 222 views
  • 0 likes
  • 3 in conversation