Freeware: ISPF Edit Macro - LANPRT


LANPRT is an ISPF edit macro that sends the file being edited (or selected lines) to a LAN printer via IBM's LPR TCP/IP command.

This edit macro currently only supports PCL (HP printers and printers that emulate HP PCL). For postscript, see Lionel Dyck's PRINT package available on his OS/390 Freeware page.

Please read the comments at the beginning of the REXX exec for more information on using LANPRT.

Hint: It can be used in SDSF. Select a job (or output group) with the "SE" (for select EDIT) and then type in LANPRT.

In the event you can't get the LANPRT exec to print because you can't get the LPR stuff working, You can still use LANPRT to generate HP PCL ASCII files ready for printing on a HP printer. This is labor-intensive but might be what you need:
  • Issue as edit macro while editing the file: LANPRT SAVE NOPRT
    (This will create an ASCII file with PCL commands for page breaks and landscape option. LANPRT will tell you the file name it generates)
  • FTP to the mainframe, use binary option to get the ASCII file
  • Depending on your machine:
    • If LPT1: points to a HP PCL printer: COPY ascii.file LPT1:
    • If you have a networked HP printer, use a program like Direct To Printer which allows you to right click on a file in the explorer and "send it to printer" asis.
Download information
File Name: LANPRT.TXT
File Format: Tex file
Size: 14,521
Last Updated: 2000-09-28
Version: 1.1
Type: ISPF edit macro
Requirements:
  • IBM's TCP/IP
  • ISPF

Modifing Exec

You may want to choose different paper trays and set other printer options than what I ship. To do this you will modify the exec. See links below for printer command strings. Here is an example of what Ian Ramage sent me to work at his shop:
Many thanks Dave.
For your future reference, here is what I put in.

 h = '1B45'x                      /* Reset printer */      
 h = h||'1B266C323641'x           /* Paper size A4 */      
 h = h||'1B266C314F'x             /* Landscape     */      
 h = h||'1B266C313244'x           /* 12 Lines per inch */  
 h = h||'1B287330703134683354'x   /* 12 CPI */             
 queue h||crlf                                             

Cheers
Ian

Other links:

If LANPRT doesn't select the font or paper source you desire, you may need to modify it with PCL commands. Here is a web page that might help: http://www.hp.com/cposupport/printers/support_doc/bpl02705.html#P156_3372

See many printing resources at http://www.geocities.com/SiliconValley/5682/postscript.html

Check out the ccprint DOS command at: http://www.colesoft.com/utilities.html which processes mainframe print files for PC printers.
The software downloadable from this page is © 2000-2003+ by David Alcock. This software is provided on an asis basis and no warranty is provided. Use at your own risk

Return to Dave's MVS Freeware web page.
Last Updated: 2003-09-09
This web page is © 2000-2003+ by David Alcock. All Rights Reserved.