  Fun With F$GetQUI? 
 The Question is:
 
F$GETQUI and list of submitted files
 
The batch job can contain more then one file.
The syntax is SUBMIT  filespec[,...]
SHOW ENTRY and SHOW QUEUE display all submitted files.
The lexical F$GETQUI with function DISPLAY_FILE and item FILE_SPECIFICATION
 does not give more than the first file specification
Is it possible to obtain the full file list with a help of F$GETQU?
Let the following exuction describes the question.
Device name and directory have been intentionally removed from file
 specifications.
$ @tmp
$ type 'f$env ("PROCEDURE")'
$ create file_1.com,file_2
$ submit file_1,file_2 /name=wizard_q /hold
$ pipe sho entry '$ENTRY' /full | sear sys$input file:
$ temp=f$getqui("CANCEL_OPERATION")
$nxt_q:
$ qname=f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*")
$ if qname .nes. ""
$ then
$nxt_j:
$  jname=f$getqui("DISPLAY_JOB","JOB_NAME",,"ALL_JOBS")
$  if jname .eqs. "" then goto nxt_q
$  if jname .nes. "WIZARD_Q" then goto nxt_j
$  fspec=f$getqui("DISPLAY_FILE","FILE_SPECIFICATION",,"FREEZE_CONTEXT")
$  write sys$output "F$GETQUI says: ",jname," ",fspec
$  goto nxt_j
$ endif
$ delete /entry='$ENTRY'
$ delete file_1.com;,file_2;
$ exit
Job WIZARD_Q (queue SYS$BATCH, entry 736) holding
         File: FILE_1.COM;1
         File: FILE_2.COM;1
F$GETQUI says: WIZARD_Q FILE_1.COM;1
 
 
 The Answer is :
 
  Existing discussions of the f$getqui lexical include the following
  topics: (813), (1240), (2159), (3951), (4546), (4568), (4903), (5188)
  (5471), (5567), (5651), (5793), (5982), (6315), (6877), (6944), etc.
 
  As for the question at hand, try this:
 
 
$ create sys$scratch:file_1.tmp,sys$scratch:file_2.tmp
$ submit sys$scratch:file_1.tmp,file_2 /name=wizard_q /hold
$ pipe sho entry '$ENTRY' /full | search sys$pipe file:
$ temp=f$getqui("CANCEL_OPERATION")
$nxt_q:
$ qname=f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*")
$ if qname .eqs. "" then goto done
$nxt_j:
$ jname=f$getqui("DISPLAY_JOB","JOB_NAME",,"ALL_JOBS")
$ if jname .eqs. "" then goto nxt_q
$ if jname .nes. "WIZARD_Q" then goto nxt_j
$ write sys$output "F$GETQUI job name: ",jname
$nxt_f:
$ fname =f$getqui("DISPLAY_FILE","FILE_SPECIFICATION")
$ if fname .eqs. "" then goto nxt_j
$ write sys$output "F$GETQUI filename: ",fname
$ goto nxt_f
$done:
$ delete /entry='$ENTRY'
$ delete sys$scratch:file_1.tmp;,file_2.tmp;
$ exit
 Answer written or last revised on  23-AUG-2001 
