Re: DCL enhancement - REQUEST/REPLY - how to capture a value.
From: Paul Sture (nospam_at_sture.homeip.net)
Date: 06/03/04
- Next message: Paul Sture: "Re: datatrieve"
- Previous message: glen herrmannsfeldt: "Re: Machine language?"
- In reply to: David J Dachtera: "Re: DCL enhancement - REQUEST/REPLY - how to capture a value."
- Next in thread: David J Dachtera: "Re: DCL enhancement - REQUEST/REPLY - how to capture a value."
- Reply: David J Dachtera: "Re: DCL enhancement - REQUEST/REPLY - how to capture a value."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 03 Jun 2004 11:15:39 +0200
David J Dachtera wrote:
> Hoff Hoffman wrote:
>
>>In article <d28306e.0406021208.7d6883e8@posting.google.com>, denny.rich@swagelok.com (Denny Rich) writes:
>>:...issuing requests to the tape operator, and in some cases, soliciting
>>:a reply value. In particular, when SLS wants to know if it should
>>:"redo" a backup that has already run today, it offers "REDO, SKIP, or
>>:QUIT" as some of the options.
>>
>> BACKUP has offered similar operator-provided input capabilities
>> for eons, as well.
>
>
> True, but REQUEST/REPLY=SYMBOL=symbol_name seems to be yet another of
> those oh-so-useful features that Digital forgot...
>
>
>>:This is an emminently useful tool, but I can't find any way to do this
>>:that is documented.
>>
>> From DCL, there is no mechanism for this -- REQUEST/REPLY does not
>> serve up the response via a DCL symbol, for instance. From within
>> an application, this mechanism is fully documented, see the $sndopr
>> system service documentation for details.
>
>
> I seem to recall playing with that at one time some years ago using
> output redirection, possibly using SPAWN/OUTPUT to enforce my will on
> the recalcitrant system.
>
> That would use services which are entirely supported, even if the
> operation itself is not.
>
>
>>:If there is not now a way to do this, and if a DCL wizard found some
>>:free time on his/her hands, it would be a great thing to have.
>>
>> Consider coding up a trivial application image that calls $sndopr and
>> lib$set_symbol, and a few other services. You have what you want,
>> and using only documented interfaces.
>
>
> Here's what VERB had to say about the REQUEST command:
>
> DJAS01::DDACHTERA$ vers
> Alpha V7.2-2 (AlphaStation 200 4/233)
> DJAS01::DDACHTERA$ verb request
> define verb REQUEST
> image REQUEST
> parameter P1, prompt="Text"
> qualifier REPLY
> qualifier TO
> value (required,list)
>
> I suppose you could try to:
>
> $ DEFINE REQUEST SLS$REQUEST
> $ REQUEST/REPLY "Yes?"
>
> ...and see what happens. I don't have access to the SLS images here at
> home, so I can't hack that just now.
>
> Actually I'm guessing that SLS$REQUEST may have been written specially
> to allow the output stream to be a mailbox so the results could be read
> from another process as input to another SLS program. Dunno...
>
> PIPE is kinda broken in V7.2-2, but this worked:
>
> DJAS01::DDACHTERA$ pipe req/reply "yes?" | (read sys$pipe p9 ; read
> sys$pipe p9
> ; write sys$output p9 ; show symbol p9)
> %OPCOM-S-OPREPLY,
> NO
> 21:58:54.46, request 4 was completed by operator _DJAS01$OPA0:
>
> P9 = "%OPCOM-S-OPREPLY, ..NO..21:58:54.46, request 4 was completed by
> operator
> _DJAS01$OPA0:."
>
> Note that the seemingly three line output is returned in a single
> string. The response could be isolated using:
>
> $ cr[0,8]=13
> $ lf[0,8]=10
> $ pipe req/reply "yes?" | (read sys$pipe p9 ; read sys$pipe p9 ; define/job resp &p9)
> $ resp = F$elem( 0, cr, f$elem( 1, lf, f$trnlnm( resp ) ) )
>
Correction - last line should read
$ resp = F$elem( 0, cr, f$elem( 1, lf, f$trnlnm( "resp" ) ) )
^ ^
- Next message: Paul Sture: "Re: datatrieve"
- Previous message: glen herrmannsfeldt: "Re: Machine language?"
- In reply to: David J Dachtera: "Re: DCL enhancement - REQUEST/REPLY - how to capture a value."
- Next in thread: David J Dachtera: "Re: DCL enhancement - REQUEST/REPLY - how to capture a value."
- Reply: David J Dachtera: "Re: DCL enhancement - REQUEST/REPLY - how to capture a value."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|