/* * Title: Check Readiness * Purpose: Determine if SAS session options are set for autocalling Explorer macros * Author: Richard A. DeVenezia * Date: feb05 * * Notes: SASUSER.EXPLORER parallels SASHELP.EXPLORER. */ data _null_; * if fileref ('XACTIONS') > 0 then do; * this test is inconclusive when filename method is catalog and the catalog does not exist; if pathname ('XACTIONS') eq ' ' then do; message = 'WARNING: Filename XACTIONS is not assigned. See the Log.'; put message; call execute ('DM log "POSTMESSAGE ""'||trim(message)||'""" log;'); goto stop; end; if getoption ('MAUTOSOURCE') ne 'MAUTOSOURCE' then do; message = 'WARNING: MAUTOSOURCE is off. See the Log.'; put message; call execute ('DM log "POSTMESSAGE ""'||trim(message)||'""" log;'); goto stop; end; sasautos = upcase(getoption ('SASAUTOS')); if index (sasautos, 'XACTIONS') eq 0 then do; message = 'WARNING: SASAUTOS does not contain XACTIONS. See the Log.'; put message; call execute ('DM log "POSTMESSAGE ""'||trim(message)||'""" log;'); goto stop; end; call execute ('DM log "POSTMESSAGE ""Your SAS session is properly configured for installation and use of SAS Explorer action command macros.""" log;'); stop; stop: put /'Your autoexec.sas should contain these lines:' ///' filename xactions catalog "sasuser.explorer";' /' options sasautos=(xactions sasautos);' /' options mautosource;' ///'.' ; stop; run;