home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / vms / 12920 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  5.0 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!HSDP1.BROOKS.AF.MIL!SACHEY
  2. From: SACHEY@HSDP1.BROOKS.AF.MIL ("Thomas A Sachey")
  3. Newsgroups: comp.os.vms
  4. Subject: Port Printing
  5. Message-ID: <9207292246.AA11177@ucbvax.Berkeley.EDU>
  6. Date: 29 Jul 92 19:32:00 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 139
  11.  
  12. ******************************************************************************
  13. * HELP.... HELP...         NEED ASSISTANCE        HELP...  HELP...           *
  14. ******************************************************************************
  15.  
  16.     Has anybody out there have a simpler way to port print a file from
  17.     a VAX to a slave printer attached to their PC?
  18.  
  19.     The below listed port print .com files are what we've been using 
  20.     but are incurring a problem printing to any brand of laser jet
  21.     printers attached to a user's PC.  We have been unsuccessful in
  22.     printing to HP LASER JETS (any series), UNISYS laser (emulating
  23.     HP) and DEC LA75 dot matrix printer.  The only printer that seems
  24.     to work with our current port print procedure is an ALPS200 series.
  25.  
  26.     The main problem we've been running into is with form feeds.  
  27.     Somehow the laser jets do not recognize a form feed when printing
  28.     to port.  When a print job is sent, the first light that comes on
  29.     is the form feed.  The user manually has to take the printer off-
  30.     line, hit form feed, then the print job is started/printed.  However,
  31.     if multiple pages are required, internal form feeds within the
  32.     document are ignored and printing is continuous.
  33.  
  34.     PC users connect to our Vaxes through several software packages:
  35.     CALL, REFLECTIONS 4, ENABLE and KERMIT.
  36.  
  37.     Any assistance in resolving this perplexing problem will be
  38.     greatly appreciated.
  39.  
  40.  
  41. $! P O R T _ P R I N T . C O M
  42. $!
  43. $! Sends a file to attached printer of an ANSI terminal.
  44. $! P1 is filespec to print. Prompted for if not specified.
  45. $! If file not found, exit without message.
  46. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  47. $    set noverify
  48. $    set noon
  49. $    on control_y then goto CTRLY 
  50. $    esc[0,8] = 27
  51. $!
  52. $!Check parameter
  53. $!
  54. $P_CHECK:
  55. $    if P1 .eqs. "" then inquire P1 "_File"
  56. $    if P1 .eqs. "" then goto P_CHECK
  57. $    if f$search("''P1'") .eqs. "" then goto BAD_PARAM 
  58. $!
  59. $!Main loop
  60. $!
  61. $    open/read/err=BAD_OPEN input_file 'P1
  62. $    write sys$output esc,"[5i"          !turn on printing
  63. $    on control_y then goto FIN
  64. $READ_LOOP:
  65. $    read/end=FIN input_file record
  66. $    record = f$edit(record,"TRIM")
  67. $    write sys$output record
  68. $    goto READ_LOOP
  69. $FIN:
  70. $    close input_file
  71. $    write sys$output esc,"[4i"          !turn off printing
  72. $    EXIT                                 !normal exit
  73. $!
  74. $!Handlers
  75. $!
  76. $BAD_OPEN:
  77. $    write sys$output "%PORTPR-E-BADOPEN, could not open ''P1'"
  78. $    EXIT
  79. $BAD_PARAM:
  80. $    write sys$output "%PORTPR-W-NOFILE, could not find ''P1'"
  81. $    EXIT
  82. $CTRLY:
  83. $    EXIT
  84. *****************************************************************************
  85.  
  86. $    set noverify
  87. $!***********************************************************************
  88. $!
  89. $! MODULE NAME:  PER_PORT_PRINT.COM
  90. $!
  91. $! PORT_PRINT.COM 
  92. $!
  93. $! DESCRIPTION:  Sends a file to attached printer of an ANSI terminal.
  94. $!
  95. $! MAINTENANCE HISTORY:
  96. $!
  97. $!         13-FEB-1991 - RMM, TRW - Modified for PERSMOD.
  98. $!         13-MAR-1990 - DKD, TRW - Added SET TERM/PASTHRU command to allow
  99. $!                                  form feeds to be passed to the attached
  100. $!                                  printer.  Removed code to force form 
  101. $!                                  feeds when new header.  Reports are now
  102. $!                                  assumed to have imbedded form feeds.
  103. $!***********************************************************************
  104. $!
  105. $    on control_y then goto CTRLY 
  106. $    if P1 .EQS. "" THEN GOTO BAD_OPEN
  107. $    esc[0,8] = 27
  108. $       FF[0,8] = 12
  109. $       write sys$output "                Please ensure printer is turned on and online"
  110. $       write sys$output ""
  111. $       inquire/nopunctuation ans "                  Press RETURN to continue, CTRL Y to abort"
  112. $    set noon
  113. $    Wrap = F$GETDVI("SYS$OUTPUT","TT_WRAP")
  114. $    set term/nowrap
  115. $       Pasthru = F$GETDVI("SYS$OUTPUT","TT_PASTHRU")
  116. $    set term/pasthru
  117. $!
  118. $!Main loop
  119. $!
  120. $    on control_y then goto FIN
  121. $    on control_c then goto FIN
  122. $    open/read/err=BAD_OPEN input_file 'P1
  123. $    write sys$output esc,"[5i"          !turn on printing
  124. $READ_LOOP:
  125. $    read/end=FIN input_file record
  126. $    write sys$output record
  127. $    goto READ_LOOP
  128. $FIN:
  129. $    close input_file
  130. $    write sys$output esc,"[4i"           !turn off printing
  131. $    IF Wrap    .EQS. "TRUE"  THEN SET TERM/WRAP
  132. $       IF Pasthru .EQS. "FALSE" THEN SET TERM/NOPASTHRU
  133. $    EXIT
  134. $!
  135. $!Handlers
  136. $!
  137. $BAD_OPEN:
  138. $    write sys$output "%PORTPR-E-BADOPEN, could not open ''P1'"
  139. $    EXIT
  140. $CTRLY:
  141. $    EXIT
  142.  
  143.  
  144. +----------------------------------------------------------------------------+
  145. | E-Mail: "SACHEY@HQHSD.BROOKS.AF.MIL" (DDN)    Thomas A. Sachey             |
  146. | Phone:  (512)536-2236  (AV)240-3224           CSC         P.O. Box 35508   |
  147. |                              San Antonio--->  Brooks AFB, Texas 78235-0508 |
  148. +----------------------------------------------------------------------------+
  149.  
  150.  
  151.