[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: can you submit local code inside an rsubmit block?
From:       Peter Crawford <Peter () CRAWFORDSOFTWARE ! DEMON ! CO ! UK>
Date:       2003-08-30 10:14:34
[Download RAW message or body]

Hi Roland
(forgive me if this repeats responses form others)

if I try to explain, it may clarify things for me too

First using  sysRput to verify a session is active/OK

%let var1 = NO ! ;
Rsubmit;
   %let here = yes. ;
   %sysRput var1 = &here ; * load value back from (R)emote session;
endrsubmit ;
  %put have I got remote connection ?  &var1 ;


Next, use sysLput to deliver macro values to a remote session.
signon somewhere;
  * prove current remote session is now "somewhere" ;
 %put current remote session is %sysfunc( getoption( remote ));

 * now load value from (L)ocal session  to remote.
 %syslput caller1 = &sysuserid ;
 %syslput lwork1  = %sysfunc( pathname( work ));
* because sysLput needs to address a remote session, it's no use
  using the v8 feature of Rsubmit,
     autosignoff     (implied by autosignon without persist=yes);
Rsubmit somewhere;
  %put I (&sysuserid) have been called by &caller1 who is using &lwork1;
  %put _user_;
endrsubmit;


It seems the naming convention for &sysRput and %sysLput uses that L and
R to define the environment from which the value is sent.

Does that help clarify the purposes of %sysRput and %sysLput ??


Regards
Peter



Roland <roland@rashleigh-berry.fsnet.co.uk> writes
>Thanks for your responses. What underlies this is my trying to work out what
>on Earth the %syslput and %sysrput macros are doing. Mainly %sysrput.
>Looking at *old* implementations of %syslput then it is clear it is doing
>nothing as advertised in its claim to be setting up local macro variables
>remotely. Instead it is resolving local macro variables in a string and then
>submitting that string remotely where all the references have been resolved.
>It works, but with the old implementation it was not actually creating macro
>variables remotely. With the new implememntation I gather it is, but I think
>it is using the same trick of just resolving the contents in a string and
>then remotely submitting the string. In other words it is creating a string
>submitting a short rsubmit block with values resolved and just submitting
>that string. I think %sysrput is using a similar sort of trick. On the
>remote host I suspect it is just creating a string containing code that ends
>the rsubmit block, creates the macro variable locally, then resumes with a
>new rsubmit block.
>
>I know this may make no sense to many of you out there.
>
>"Roland" <roland@rashleigh-berry.fsnet.co.uk> wrote in message
>news:biffsc$88v$1@newsg3.svr.pol.co.uk...
>> Can you be running a block of code remotely using rsubmit; endrsubmit; and
>> within it submit some code that runs on your local machine?
>>
>>
>
>

--
Peter Crawford

Crawford Software Consultancy
UK

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic