BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
3 REPLIES 3
Vince_SAS
Rhodochrosite | Level 12
Can you post some simple SAS code that illustrates how you are publishing the files?

Vince
SAS R&D
deleted_user
Not applicable
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(filename:path\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://server:port/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);
Cynthia_sas
SAS Super FREQ
Every time you see 😛 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 😛
colon ) 🙂
semicolon ) 😉
[/pre]
I thought the 'pre' and '/pre' would prevent these letter/punctuation combos from getting translated to a smiley??

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 711 views
  • 0 likes
  • 3 in conversation