From: 92ADAMS@HANNA2.NLU.EDU (Erek Adams)
Newsgroups: comp.os.vms
Subject: re: local printing with NCSA-Telnet and CMU-TEK
Date: 19 Dec 92 05:45:16 GMT
Organization: The Internet

-> Dear Netland,
-> I hope the following question is not too stupid, but we have not much
-> experience in that field and the manuals leave us alone with the problem:
-> 
-> We are running CMU-TEK on a microVAX under VMS 5.3
-> We connect to the VAX from PCs using NCSA-Telnet and/or QVTnet/Windows.
-> Since our PCs have local printers attached to them it would be 
-> desirable to have the opportunity for printing VAX-files on the PC-printers.
-> 
-> Can someone tell me what is the recommended way of doing this?
-> 
-> I think it should be possible because I know one VMS-program which offers
-> the menu-choice of printing on the local PC-printer and that feature 
-> works fine with our present configuration. I am now looking for a DCL-
-> equivalent (configuration of printer queue or the like) that would 
-> redirect the print output to the locally attached printer.
-> 
-> Many thanks in advance
-> 
->                          Kay Hofmann

Kay, 
	The easiest way that I have found is to use the following file.  First
define a symbol such as: $ PTP :== @UTILS:Print_Port.Com 'P1 .   Then just
extract this file and there ya go.
--------------------------------[cut here]-----------------------------------
$ GOTO START_OF_PROGRAM
$!===========================================================================
$!  Print_Port.Com
$!===========================================================================
$! What it does, and how it does it:
$!
$!	This .COM file uses standard ANSI escape codes to open the printer port
$!  from within a terminal program.  The file (P1) is then printed on a local
$!  printer.  If P1 is left blank, the program will prompt for the filename.  
$!  If P2 is left blank, then the LA75 printer type is assumed.  You can 
$!  specify a type by using P2 to pass they printer type into the .COM file.
$!
$!  Note:
$!
$!	PTP has been used with Procomm, Qmodem and Telix.  Use at your own 
$!	risk.  No waranties implied.  :)
$!===========================================================================
$! Author:
$!
$!	Erek Adams
$!===========================================================================
$! Revisons:
$!
$!   Ver 1.0:  Created on 27-JAN-1989
$!===========================================================================
$!
$ START_OF_PROGRAM:
$!
$    IF P1 .EQS. "" THEN INQURE P1 "_FILE"
$    IF P2 .EQS. "" THEN P2 = "LA75"
$!
$    ON CONTROL_Y THEN GOTO EXIT
$    SET TERM/DEV='P2
$    ESC[0,7] = %X1B
$    WRITE SYS$OUTPUT "''ESC'[5i"
$    TYPE 'P1'
$!
$ EXIT:
$!
$    WRITE SYS$OUTPUT "''ESC'[4i"
$    SET TERM/INQURE
$    EXIT
--------------------------------[cut here]-----------------------------------

  Hope this helps you!  And anyone else for that matter!

						Erek Adams

+-------------------------------------+---------------------------------------+
|                                     |  Internet:  92adams@hanna2.nlu.edu    |
|  Erek Adams, Student Programmer     |  SnailMail: 5330 DeSiard, #43         |
|  Northeast Louisiana University     |             Monroe, LA  71202         |
|  Monroe, Louisiana  71202           |  Work Phone: (318)-323-7468           |
|                                     |  Home Phone: (318)-343-4729           |
+-------------------------------------+---------------------------------------+
--=                                                                         =--