On Thursday, April 2, 2015 at 7:36:45 AM UTC-7, Richard Kann wrote:
>
> On my 5.x copy I have to log off and back on to get it to run the new 
> version. Is that true? If so this is going to be a real pain. 
> Richard Kann 
> Comp-Ware Systems 
>

Technically you don't have to log off.  You do have to exit the current 
shell session and start a fresh one, which can be done _without_ dropping 
the telnet session.

JBASIC code I use *as a developer*:

**************************************************
* REPRUN
* Operation:
* Execute command and arguments specified on command line
* When that session terminates, will check if it returned errorlevel 214,
* in which case log off (that was the off command)
* If the errorlevel returned was 0, rerun the original command line.
* Otherwise display the errorlevel and exit the program.
**************************************************
    CMDLINE = SYSTEM(1000)
    CMD = ""
    CMDCOUNT = DCOUNT(CMDLINE, CHAR(254))
    IF (CMDCOUNT >= 2) THEN
        FOR I = 2 TO CMDCOUNT
            CMD = CMD:" ":CMDLINE<I>
        NEXT
    END ELSE
        ;* If no command is specified, default to:
        PRINT "REPRUN V 1.0 - Repeatedly spawns a child process"
        PRINT "Example:"
        PRINT "REPRUN LOGTO acct"
        PRINT "Where acct is the name of the development account you will 
be"
        PRINT "compiling programs in."
        PRINT "After compiling a program, use EXIT to restart your shell,"
        PRINT "unloading the stale dlls in the process"
        RETURN
    END

    LOOP
        PRINT "Executing: ": CMD
        PERFORM CHAR(255):"c":CMD RETURNING RV
        ;* Add in a small delay so in case of a mistake won't hammer 
machine.
        IN BLAH FOR 4 THEN IF (BLAH = "Q") THEN CHAIN "OFF"
    WHILE (RV<1> = 0) DO REPEAT
    IF RV<1> = 214 THEN
        PRINT "Logging off..."
        CHAIN "OFF"
    END    
    PRINT "Errorlevel returned was ":RV<1>
    
    END

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to