[comp.lang.rexx] REXX message answerer that eats CPU time...

IO92203@MAINE.BITNET (Scott Maxell) (02/21/91)

    Does anyone have the code for a REXX EXEC file that answers
messages which could possibly be modified to 'eat' CPU time every
few minutes to keep a student account from being forced off the
system when in the disconnected state? I am just learning to program
REXX, so some hints about how to do this would be nice. Thanks for
any information...
 
//////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
+---------+ Scott Maxell           -- IO92203 @ maine
|         | Pres. MaxSoft Software -- IO92203 @ maine.maine.edu
|    O    |
|    |    | "What I need is a computer that will do what I want it to do
+---------+ not what I tell it to do..."

jnemeth@cue.bc.ca (John Nemeth) (02/25/91)

In article <91051.184002IO92203@MAINE.BITNET> IO92203@MAINE.BITNET (Scott Maxell) writes:
>
>    Does anyone have the code for a REXX EXEC file that answers
>messages which could possibly be modified to 'eat' CPU time every
>few minutes to keep a student account from being forced off the
>system when in the disconnected state? I am just learning to program
>REXX, so some hints about how to do this would be nice. Thanks for
>any information...

     Your problem is more likely due to your account being left in
an interrrupt state (i.e. VM READ, or CP READ) while you're
disconnected, than the fact that it's a student account.  If a
disconnected account is left in an interrupt state for more then 15
minutes, it will be FORCE'd off.  So, anything that can run with a
disconnected console is likely to solve your problem.  I used to use
GONE.  I can't be much more help then that, it's been a couple years
since I've had a CMS account.
--
John Nemeth                                                   jnemeth@cue.bc.ca
System Administrator                            {uw-beaver,ubc-vision,ssc-vax}!
Computer Using Educators of B.C.                            uvicctr!cue!jnemeth

cs196007@cs.brown.edu (Andre Lehovich) (02/26/91)

In article <91051.184002IO92203@MAINE.BITNET>, IO92203@MAINE.BITNET (Scott Maxell) writes:
|> 
|>     Does anyone have the code for a REXX EXEC file that answers
|> messages which could possibly be modified to 'eat' CPU time every
|> few minutes to keep a student account from being forced off the
|> system when in the disconnected state? I am just learning to program
|> REXX, so some hints about how to do this would be nice. Thanks for
|> any information...

Eric Thomas' excellent CHAT program supports such an option.  Bitnet users
can get it from NETSERV - use the command TELL NETSERV AT BITNIC HELP for
more information.

AndreL - andrel@brownvm.brown.edu among other addresses

richg@locus.com (Rich Greenberg) (02/28/91)

In article <1991Feb25.055633.18236@ccu.umanitoba.ca> umochock@ccu.umanitoba.ca (Russell Ochocki) writes:
>>In article <91051.184002IO92203@MAINE.BITNET> IO92203@MAINE.BITNET (Scott Maxell) writes:
   
>>>    Does anyone have the code for a REXX EXEC file that answers
>>>messages which could possibly be modified to 'eat' CPU time every
>>>few minutes to keep a student account from being forced off the
 
>Try this:
>
>  do forever
>    sleep 25  /* I think this is 25 minutes, but sleep may take secs instead */
>   "msg * *"
>  end
 
There are several problems here.  First, sleep 25 (which should be
written as 'CP SLEEP 25') will be 25 seconds.  'CP SLEEP 15 MIN'
(or a shorter time if needed by your system) should do the trick.

The use of MSG is not the best way.  After a few of these, your
screen will fill and go into HOLDING status.  Poof, no more terminal
i/o until you press clear. (Only applies to a real or emulated 3270  
type terminal.)  If you are disconnected, terminal i/o is
a nop.  Most systems that have a similar limit go by having used some
CPU time since the last check.  To get around this,
 
  do forever                         This will wait for "some" minutes.
     x = time('R')                   The time(E) call and test will get
     'CP SLEEP some MIN'             you out if you press ENTER before
     if time('E') < some * 60        the some minutes pass.  Otherwise there
        then exit                    is no way out short of #cp i cms.
  end                                (The time(E) will use up some CPU also.)
 
The question is, "Why do you feel you need to do this".
Getting rid of idle users reduces overhead  for the active users.
If you are going to be idle, just log off.
You can log back on whenever you are ready to do something.
Everybody suffers if you cheat.  Mabe just a teeeeny bit if its just
you, but if everybody cheats, . . . . .

-- 
-------------------------------------------------------------------------
Disclaimer: The above writings are the ramblings of one human being
        and have nothing what-so-ever to do with Locus Computing Corp.
   ---> Rich Greenberg,  richg@locus.com    TinsleTown, USA

QQ11@LIVERPOOL.AC.UK (Alan Thew) (03/07/91)

In article <22331@dice.la.locus.com>, richg@locus.com (Rich Greenberg) says:
>
.....
>
>  do forever                         This will wait for "some" minutes.
>     x = time('R')                   The time(E) call and test will get
>     'CP SLEEP some MIN'             you out if you press ENTER before
>     if time('E') < some * 60        the some minutes pass.  Otherwise there
>        then exit                    is no way out short of #cp i cms.

what's wrong with #CP EXT...works fine for me.
re-ipling seems some much more work :-)

richg@locus.com (Rich Greenberg) (03/08/91)

In article <91065.183717QQ11@LIVERPOOL.AC.UK> QQ11@LIVERPOOL.AC.UK (Alan Thew) writes:
>In article <22331@dice.la.locus.com>, richg@locus.com (Rich Greenberg) says:

=>  do forever                         This will wait for "some" minutes.
=>     x = time('R')                   The time(E) call and test will get
=>     'CP SLEEP some MIN'             you out if you press ENTER before
=>     if time('E') < some * 60        the some minutes pass.  Otherwise there
=>        then exit                    is no way out short of #cp i cms.
 
=what's wrong with #CP EXT...works fine for me.
=re-ipling seems some much more work :-)

Alright, its 2 characters less typing (BIG deal), but "it vouldn't do u no goot"
The ext interrupt (For non CMS users, #CP EXT simulates the "external
interrupt" key on a real CPU).  What happens in this case is the ext interrupt
throws you into one of the less useful parts of CMS, DEBUG.  To get out
of DEBUG, if you type "go", it just returns you to the loop.
To get out, you need to type "hx" (The Halt eXecution immediate command.)
HX leaves things in a somewhat messy state, and you are advised to re-ipl
CMS anyway.  HX by itself is ignored in a SLEEP loop.

The above applies to CMS 5.  In CMS 5.5 (VM/XA), an ext gives you a choice
to ABEND or RESUME.  If you select abend, you are out.  CMS 6 (I have lots
of VM systems here) does the same as 5.5.
In any case, 3 added lines of code allows 1 keystroke to terminate
the exec, and the exit is "clean".

Some installations have modified CMS to do other things on an EXT, perhaps
yours is included.

BTW, I have an exec + xedit macro that turns your 3270ish terminal into
the worlds most expensive (when run on a 3090-600J) digital alarm
clock.  Anybody want a copy?  If I get just a few requests (email,
NOT posted please), I will email them to you.  If I get LOTS of requests,
I will post them here.

-- 
-------------------------------------------------------------------------
Disclaimer: The above writings are the ramblings of one human being
        and have nothing what-so-ever to do with Locus Computing Corp.
   ---> Rich Greenberg,  richg@locus.com    TinsleTown, USA