HP3000-L Archives

September 1996, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Michael P. Smith" <[log in to unmask]>
Reply To:
Michael P. Smith
Date:
Fri, 6 Sep 1996 15:13:21 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (75 lines)
[snip]
>Following is an example depicting how to test if a JCW is set on a
>remote system:
>
>     !DSLINE XXX
>     !REMOTE HELLO XXX,XXX.XXX
>     !REMOTE SETJCW CIERROR = 0
>     !REMOTE LISTF XXX
>     !REMOTE IF CIERROR <> 0
>     |REMOTE COPY JCWGOOD,JCWCK;YES     Where the file JCWGOOD holds the line
>     !REMOTE ELSE                       SETJCW REMOTEJCW = 0
>     !REMOTE COPY JCWBAD,JCWCK;YES      and JCWBAD holds the line
>     !REMOTE ENDIF                      SETJCW REMOTEJCW = 1
>     !DSCOPY JCWCK,XXX;MOVE;REP
>     !JCWCK
>     !IF REMOTEJCW = 0
>     !ECHO Listf was successful
>     !ELSE
>     !ECHO Listf was unsuccessful
>     !ENDIF
>
[snip]
 
Another solution would be as follows.
 
 
!REMOTE :system HELLO jobname,user.acct,group
!REMOTE FILE remjcw=remjcw:$back
!REMOTE SETJCW cierror 0
!REMOTE LISTF xxx
!REMOTE ECHO setvar remote_cierror !!cierror > *remjcw
!remjcw
!IF remote_cierror=0 THEN
!  ECHO REMOTE LISTF successful.
!ELSE
!  ECHO REMOTE LISTF unsuccessful.
!ENDIF
 
There are a couple of advantages of doing it this way.
 
1.  No extra programs have to be executed.  Just RFA.
2.  This will work for any variable.
3.  You can return more than one variable, with some modifications.
4.  The local command file is a temporary file.
 
Disadvantages
 
1.  Due to temporary file, debugging is harder.
2.  You must remember to use the double exclamation marks or you will
    get very frustrated (since that will use your local CIERROR instead
    of the remote CIERROR).
3.  Not pretty.
 
 
The best way of implementing this RFA version of remote variable access would
be
via a command file.  This way you could address disadvantages 2 and 3, maybe
even 1 if you work at it:)
 
 
 
-------------------------------------------------------------------
Michael P. Smith                        [log in to unmask]
HP Sr. Systems Programmer               [log in to unmask]
Hertz Corporation, Oklahoma City, OK
-------------------------------------------------------------------
 
Manager: My boss says we need some eunuch programmers
Dilbert: I think he means UNIX and I already know UNIX.
Manager: If the company nurse drops by, tell her I said 'Never mind.'
 
-------------------------------------------------------------------
The views and opinions expressed in this document are expressly
my own.  So get off the couch, I obviously need more help than you.

ATOM RSS1 RSS2