This procedure can be used to provide a "default" printer queue.  Some examples
of this are provided below.

1)  Add the following code to SI$COM:ZCTL01.COM/FR$COM:ZCTL02.COM in order to
set up a queue for screen printing via the CTRL/D sequence.

$ ASSIGN/USER_MODE SI$DATA:TAB4LK.DAT TAB4LK
$!***MOD
$!***BEGINS
$!!!! The following lines setup CTRL/D printing:
$!!!! 
$ FN = "SYS$LOGIN:SYSPRINT.DAT"
$ IF F$SEARCH (FN) .NES. ""
$ THEN
$       OPEN/READ FILE SYS$LOGIN:SYSPRINT.DAT
$       READ FILE INREC
$       DEFINE Z$PRINT_FD      'INREC'
$       DEFINE Z$SCRNFL_PRINT  FD
$       CLOSE FILE
$ ENDIF
$!***ENDS
$!!!!
$!!!! The following lines assign printer codes:


2)  Insert the following code into a DCL command procedure that prints out a
file so user does not have to select a print queue.

$!
$! Retrieve default printer queue.
$!
$ SAY   :== WRITE SYS$OUTPUT
$ ASK   :== READ/END=END/PROMPT=
$ QUENM = "SYS$LOGIN:SYSPRINT.DAT"
$ FNDFL = F$SEARCH(QUENM) 
$!
$ IF FNDFL .EQS. ""
$ THEN
$       SAY " "
$       SAY " Please select default print queue."
$               ASK "Press <RETURN> to continue ... " SYS$COMMAND DUMMY 
$               GOTO  END
$ ENDIF
$!
$! Prompt for printer queue.
$!
$ OPEN/READ QUEFL SYS$LOGIN:SYSPRINT.DAT
$ READ QUEFL QUENM
$ CLOSE QUEFL
$ SAY " "
$ SAY " "
$ SAY "Default print queue is ",''QUENM'
$ ASK "Enter destination print queue if different or press <RETURN> for default: " SYS$COMMAND QUEUE
$ IF QUEUE .EQS. "" THEN QUEUE = QUENM
$!
$! Select # of copies.
$!
$ ASK "Enter number of copies to print or press <RETURN> for default of 1: " SYS$COMMAND NUMCOPY
$ IF NUMCOPY .EQS. "" THEN NUMCOPY = 1
$!
$ PRINT/NOFEED/NOTIFY/NOFLAG/QUEUE='QUEUE'/COPIES='NUMCOPY' (Open VMS file name) 
$!
$END:
$!
$ EXIT
