If you're using EG, you can select File->Publish and let the UI lead you through the process. This will generate a SAS program that you can then use for your purposes. Here's a sample. ************************************************************* * If this code is executed outside of Enterprise Guide, then metadata logon options must be supplied. * options metauser="<userID>"; * options metapass="<password>"; * options metaserver=localhost; * options metaport=8561; ************************************************************* 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(Name the publisher here); %let description = %nrbquote(Publisher); %syscall package_begin(pid, description, namevalue, rc, package_options, abstract_text); %chkrc(Package Begin); /* Add the SAS dataset */ %let namevalue = ; %let description = %nrbquote(SASHELP.AIR [SAS Data Set]); %let prop = TRANSFORMATION_TYPE; %let ttype = CSV; %let libname = %nrbquote(SASHELP); %let memname = %nrbquote(AIR); %syscall insert_dataset(pid,libname,memname,description,namevalue,rc,prop,ttype); %chkrc(Insert Dataset); /* Publish the package */ %let pubType = TO_SUBSCRIBERS; %let pub_properties = ARCHIVE_PATH, FOLDER_PATH; %let channel = %nrbquote(Test); %let folder_path = %nrbquote(/Channels/); %let archpath = %nrbquote(); %syscall package_publish(pid, pubType, rc, pub_properties, archpath, folder_path, channel); %chkrc(package publish);
... View more