Subject: | |
From: | |
Reply To: | |
Date: | Thu, 4 Nov 2004 16:53:28 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
I'm using Donna's version of SHUTDOWN, somewhat modified for my own
purposes, and here's my question.
The SHUTDOWN command must be in a UDC in order to call the actual MPE
SHUTDOWN command later. The SHUTDOWN script (it's on Jazz if anyone cares
to take a look) invokes every script in the SDCMD group in alphabetical
order by calling another UDC using a listfile as STDIN to that script.
What I've found is that any scripts in the SDCMD group cannot actually
accept user input via the :INPUT command. I suspect this is because of the
way the UDC calls the other UDC that invokes the scripts.
The work-around is pretty easy -- just put the :INPUTs in the UDC itself.
But can anyone else think of a way around this limitation? It would be
nice not to have to think about this and change the UDC if we decide to
start putting in shutdown scripts that require user input.
If I'm being unclear, I'll repost with specific details, but the gist is:
***
SHUTDOWN
...
do some stuff
....
listfile @.SDCMD,6 >tempfile
sdproc <tempfile
....
****
SDPROC
setvar _sp_eof finfo(hpstdin,'eof')
while setvar(_sp_eof,_sp_eof-1) >= 0
if setvar(_sp_rec,rtrim(input())) > ''
errclear
continue
xeq !_sp_rec
if hpcierr <> 0
echo
echo ERROR: Trouble with !_sp_rec
echo !hpcierrmsg
deletevar _sp_@
escape !hpcierr
endif
endif
endwhile
I guess the logical explanation for :INPUT failing within the scripts that
are being invoked is that the process running the scripts isn't actually
interactive. Is that it?
Donna, sorry I simplified your UDC above, trying to keep this short but
still readable.
John Testa
SLPS Homewood
708-647-4346
[log in to unmask]
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|