data empInfo; length homePage $256; input fname $ lname $ ages state $ siblings homePage $; datalines; John Smith 32 NY 4 http://alphaliteairways.com/~jsmith Gary DeStephano 20 NY 2 http://alphaliteairways.com/~gdest Arthur Allen 40 CA 2 http://alphaliteairways.com/~aallen Jean Forest 3 CA 1 http://alphaliteairways.com/~jforest Tony Votta 30 NC 2 http://www.pizza.com/~tova Dakota Smith 3 NC 1 http://~alphaliteairways.com/~dakota ; run; quit; data fileInfo; length fileName $256; input fileName $; datalines; Sales Marketing R&D ; run; quit; data _null_; rc=0; packageId = 0; CALL PACKAGE_BEGIN(packageId,"Daily Orders Report.",'', rc); if (rc eq 0) then put 'Package begin successful.'; else do; msg = sysmsg(); put msg; end; CALL INSERT_REF(packageId, "HTML", "http://www.alphaliteairways.com", "Check out the Alphalite Airways Web site for more information." , "", rc); if (rc eq 0) then put 'Insert Reference successful.'; else do; msg = sysmsg(); put msg; end; CALL INSERT_DATASET(packageId, "work", "empInfo", "Data Set empInfo" , "", rc); if (rc eq 0) then put 'Insert Data Set successful.'; else do; msg = sysmsg(); put msg; end; CALL INSERT_DATASET(packageId, "work", "fileInfo", "Data Set fileInfo" , "", rc); if (rc eq 0) then put 'Insert Data Set successful.'; else do; msg = sysmsg(); put msg; end; viewerName='filename:realview.html'; prop='VIEWER_NAME'; address="John.Smith@alphaliteairways.com"; CALL PACKAGE_PUBLISH(packageId, "TO_EMAIL", rc, prop, viewerName, address); if rc ne 0 then do; msg = sysmsg(); put msg; end; else put 'Publish successful'; CALL PACKAGE_END(packageId,rc); if rc ne 0 then do; msg = sysmsg(); put msg; end; else put 'Package termination successful'; run;