[Info-vax] F$GETQUI: the mystery deepens
Phillip Helbig undress to reply
helbig at asclothestro.multivax.de
Sat Dec 8 13:26:08 EST 2018
In article <puep8r$tke$1 at dont-email.me>, Stephen Hoffman
<seaohveh at hoffmanlabs.invalid> writes:
> On 2018-12-07 19:35:53 +0000, Phillip Helbig (undress to reply said:
>
> > It seems like SHOW QUEUE destroys the intended (at least, intended by
> > me) behaviour, but further calls to F$GETQUI somehow reset this.
> >
> > Bug or feature?
>
>
> This is some long-standing, documented and entirely expected DCL stupidity.
>
> Quoth the f$getqui docs:
>
> "Restriction
>
> The GQC that is saved for wildcarded F$GETQUI calls is destroyed if you
> run any DCL queue-related command, such as SHOW QUEUE or SHOW ENTRY. To
> avoid this problem, use the SPAWN command to create a new process in
> which to run the DCL commands."
It's not completely destroyed, though, because the example below
actually works. As the comments show, it depends on the position of the
SHOW QUEUE command. If it were completely destroyed then this would be
daft and, from my point of view, but easy to understand. However, the
code below does work, so the context is not completely destroyed.
----------8<--------------------------------------------------------------------
$ DUMMY = F$GETQUI("") !reset just in case
$QUEUE_NAME_LOOP:
$ QUEUE_NAME = F$GETQUI ("DISPLAY_QUEUE", "QUEUE_NAME", "*", "BATCH")
$ WRITE SYS$OUTPUT QUEUE_NAME
$!OK
$ SHOW QUEUE 'QUEUE_NAME'
$ IF QUEUE_NAME .EQS. "" THEN GOTO END_QUEUE_NAME_LOOP
$ IF F$GETQUI("DISPLAY_QUEUE","QUEUE_STOPPED",QUEUE_NAME,"FREEZE_CONTEXT") -
.OR. -
F$GETQUI("DISPLAY_QUEUE","QUEUE_PAUSED",QUEUE_NAME,"FREEZE_CONTEXT")
$ THEN
$!not OK
$! SHOW QUEUE 'QUEUE_NAME'
$ ENDIF
$!not OK
$! SHOW QUEUE 'QUEUE_NAME'
$GOTO QUEUE_NAME_LOOP
$END_QUEUE_NAME_LOOP:
$ EXIT
More information about the Info-vax
mailing list