/****************************************************************/ /* S A S S A M P L E L I B R A R Y */ /* */ /* NAME: SYSLPUT */ /* TITLE: MACRO TO PERFORM OPPOSITE FUNCTION OF SYSRPUT */ /* PRODUCT: SAS/CONNECT */ /* SYSTEM: ALL */ /* KEYS: CONNECT MACRO */ /* PROCS: */ /* DATA: */ /* */ /* SUPPORT: ECL UPDATE: 01APR94 */ /* captured off sas-l by jgb, 1-4-98. Editing... */ /* REF: */ /* MISC: 1. SYSLPUT allows the user to create a macro */ /* variable on the remote host from local session */ /* input. */ /* 3. Copy this file from the sample diskette and */ /* SUBMIT to your SAS session. */ /****************************************************************/ %macro syslput(mv,val,remote=,nonotes=1); /****************************************************************/ /* SYSLPUT is the opposite of SYSRPUT. SYSLPUT creates a macro*/ /* variable in the remote environment. The user must specify */ /* the macro variable and its value. Optionally, the user */ /* may specify the remote session id; the default session is */ /* the current session. */ /****************************************************************/ %global mvar value thost; %let mvar=&mv; %*--following mod by jgb .... ; %if %quote(&val) eq %str() %then %let value=&&&mv; %else %let value=&val; %let thost=&remote; %local notext; %if &nonotes %then %let notext=%str(options nonotes nosource;); ¬ext ; %let str=%str(rsubmit &thost; ¬ext; data _null_; call symput("&mvar","&value"); run; options notes source; endrsubmit; options notes source;); &str; %mend syslput; /*----------------------------------------------------------------* EXAMPLES: (1) Macro variable to current (default) remote session: %syslput(rc,&sysinfo) (2) Macro variable to specified remote session: %syslput(flag,1,remote=mvs) (3) pass just the macro var name and let it get current value by default. Also specify nonotes parm to see source code. jgb 7 %syslput(tparm,nonotes=0) *----------------------------------------------------------------*/