• Print  |
  • Feedback  |

Knowledge Base


TS-519

SPOOLING MAINFRAME SAS/GRAPH OUTPUT TO ASCII PRINTERS

Abstract

    This article discusses the hardware and software considerations to take into account when attempting to spool mainframe graphics to ASCII printers. The article gives details about using SAS/GRAPH with a protocol converter as well as using SAS/GRAPH with an ASCII printer attached to the mainframe via a PC or LAN (local area network).

Introduction

    You have just connected an HP LaserJet printer to your IBM mainframe and have printed out your first mainframe text report. Your next task is to produce mainframe SAS/GRAPH output on your LaserJet printer. "No problem", you say to yourself. You run your mainframe SAS/GRAPH program and behold, page after page of garbage prints on your HP LaserJet printer. What could have gone wrong? Well, actually a number of things could have gone wrong.

    The root of the problem is that your IBM mainframe is an EBCDIC machine while your ASCII printer is indeed just that... ASCII. Data generated or stored on an IBM mainframe is usually in EBCDIC representation, but most non-IBM printers (including HP LaserJet printers) only support ASCII representation. What makes spooling of mainframe graphics output to ASCII printers a difficult task is making sure that a proper EBCDIC-to-ASCII translation takes place between the EBCDIC mainframe and the ASCII printer (or in certain situations, that no EBCDIC-to-ASCII translation takes place at all). You also have to ensure that any third-party software, such as mainframe spooling software or 3270 emulation software, does not add characters (such as carriage returns, line feeds, new line commands, etc.) to the graphics data stream. In many cases, any characters added to a graphics data stream will cause problems.

    The remainder of this article will discuss how to deal with these problems and incompatibilities and how to produce graphics output on your ASCII printer.

Hardware Considerations

    The first thing to ask yourself is "how is my printer physically connected to my mainframe?". Since an IBM mainframe is an EBCDIC machine and your printer is ASCII, you can only attach your ASCII printer directly to an IBM mainframe by using an intervening device, network, or gateway. When connecting your ASCII printer to an IBM mainframe, the physical connection between the two normally falls into one of the following categories:

    • Your ASCII printer is attached to the mainframe via a 3287-type protocol converter. This is typically a separate device located next to the printer. It has a coaxial connection on one side and a parallel and/or serial connection on the other side. The protocol converter provides the physical connection between the mainframe and the printer, and also provides the EBCDIC-to-ASCII conversion of data which must take place.

    • Your ASCII printer is attached to the mainframe via a 3287-type coax card which is plugged directly into the printer. This configuration may look as though the printer is attached directly to the mainframe, when in fact, the 3287-type coax card serves the same purpose as a stand-alone protocol converter.

    • Your ASCII printer is attached directly to a PC, which in turn is attached to the mainframe via a coax connection, gateway, or TCP/IP connection.

    • Your ASCII printer is attached to a local area network, which in turn is attached to the mainframe via a gateway or TCP/IP connection.

    For the remainder of this article, the term "protocol converter" refers to the first two options mentioned while the term "PC-attached printer" refers to the last two options mentioned. For example, you use SAS/GRAPH the same way with an ASCII printer attached to a stand-alone protocol converter as you would an ASCII printer with a 3287-coax card.

Software Considerations

    When attempting to directly spool mainframe graphics to an ASCII printer, you also have to consider what software products are involved in the spooling process. One of these software packages is your mainframe spooling utility. This is software which runs on the mainframe and whose primary purpose is to take output on the mainframe and route it to the appropriate printer. Some examples of spooling software products for MVS include the VPS product from Levi, Ray, and Shoup, Inc. and CA-Spool from Computer Associates. A spooling utility called SASWTR is shipped with SAS/GRAPH for MVS systems, but you can only use SASWTR with real IBM 3287 and 3268 printers. You cannot use SASWTR when spooling mainframe graphics to an ASCII printer.

    If your printer is attached to a PC or LAN, another consideration is the software that you have running on the PC or LAN which allows you to define your printer as a mainframe printer. This software is typically either a 3270 emulation program (such as Attachmate Extra! for Windows) or some type of print spooling software (such as Novell's NetWare HostPrint software).

Using SAS/GRAPH with a Protocol Converter

    When using SAS/GRAPH with a protocol converter, you want to take advantage of the ability of the protocol converter to handle data in hex transparency mode. Hex transparency mode is also referred to as either "pseudo transparency" or "expanded ASCII" mode. When operating in hex transparency mode, the protocol converter takes two bytes of EBCDIC data from the host and converts it into one byte of ASCII data. For example, if a converter is operating in hex transparency mode and receives the two byte EBCDIC text string '1B' from the host, the protocol converter converts this to the one byte ASCII hex character '1B'x (which is the ASCII escape character). The converter then sends the ASCII escape character to the printer.

    One important note to remember is that the protocol converter does not operate in hex transparency mode all of the time. If it did, you would not be able to send regular text reports to an ASCII printer attached to a protocol converter. Hex transparency mode is not necessary for text since there is a direct EBCDIC-to-ASCII translation for all printable text characters. This is not the case when the data stream contains unprintable characters. Note that an HP-PCL data stream contains many unprintable characters (such as the ASCII escape character).

    3287-type protocol converters operate a majority of the time in regular text mode (doing a straight EBCDIC-to-ASCII translation). The converter only goes into hex transparency mode upon receiving a special sequence of starting trigger characters. It then continues to operate in hex transparency mode until it receives another special sequence of ending trigger characters. Upon receiving the ending trigger characters, the protocol converter resets back to text mode.

    When spooling mainframe SAS/GRAPH output to an ASCII printer which is attached to the mainframe via a protocol converter, it is important that there is a match between:

    • the starting and ending trigger sequences written to the beginning and end of the graphics data stream by the SAS/GRAPH protocol module, and

    • the starting and ending trigger sequences the protocol converter has been configured to recognize.

    For example, assume that you want to send a PRINTER RESET character sequence to an HP LaserJet printer which is attached to the mainframe via a protocol converter. Also assume that the protocol converter has been configured to go into hex transparency mode upon receiving the starting trigger sequence of '%<' and to go back into text mode upon receiving the ending trigger sequence of '>%'. If you want to send a PRINTER RESET character sequence to the LaserJet, it normally would be an ASCII hex '1B45'x. The data stream that you would need to generate on the mainframe to send two bytes of ASCII hex '1B45'x data to the printer would be the four byte EBCDIC text string '1B45' imbedded between the starting and ending triggers characters like this:

      
         %<
         1B45
         >%
      

    Upon receiving the '%<' starting trigger sequence, the protocol converter will go into hex transparency mode. The converter, still in hex transparency mode, will read the first two bytes of EBCDIC data (1B) and will create a single byte of ASCII data ('1B'x) to send to the printer. The protocol converter then reads the next two bytes of EBCDIC data (45) and will create a single byte of ASCII data ('45'x) to send to the printer. The protocol converter will go back into text mode upon receiving the '>%' ending trigger sequence.

SAS/GRAPH statements and parameters

    The following sample SAS/GRAPH program contains the statements that are needed to spool mainframe SAS/GRAPH output directly to an ASCII printer which is attached to the mainframe via a protocol converter:

       filename gsasfile 'host_parameters';
    
       goptions device    = driver_name
                gaccess   = gsasfile
                gprotocol = protocol_module
                gsflen    = gsf_length   /*  On MVS, gsf_length is typically  */
                                         /*  either 80 or 128.  On CMS,       */
                                         /*  gsf_length is usually 64.        */ 
                gsfmode   = replace
                trantab   = gtabcms;     /*  On MVS, specify trantab=gtabcms  */
                                         /*  when driver_name is set to a     */
                                         /*  PostScript device driver.        */
    
       title 'SAS/GRAPH Test';
    
       proc gslide; 
       run; quit; 
    
       filename gsasfile clear;
    

    Here are some details concerning the graphics options specified above:

      DEVICE=

      identifies the SAS/GRAPH device driver for the particular printer or hardcopy device you are using. Here is a partial list of SAS/GRAPH device drivers for ASCII printers:

      
           ------------------------------------------------------------------------
           |                |                                                     |
           | SAS/GRAPH      |  Supported                                          |
           | device driver  |  device(s)                                          |
           |                |                                                     |  
           ------------------------------------------------------------------------
           |                |                                                     |
           | HPLJS2         |  HP LaserJet Series 2 and compatibles (HP-PCL mode) |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | HPLJS3         |  HP LaserJet Series 3, 4, and 5 (HP-PCL mode)       |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | HPLJGL2        |  HP LaserJet Series 3, 4, and 5 (HP-GL/2 mode)      |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | HPLJ3SI        |  HP LaserJet Series 3Si (HP-PCL mode)               |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | HPGL3SI        |  HP LaserJet Series 3Si (HP-GL/2 mode)              |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | LJ3SIPS        |  HP LaserJet Series 3Si (PostScript mode)           |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | LJ3SIPSL       |  HP LaserJet Series 3Si (PostScript mode, thin      |
           |                |  lines)                                             |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | PS300          |  Any black and white or gray-scale PostScript       |
           |                |  printer (300 DPI)                                  |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | PSCOLOR        |  Any printer which supports color PostScript        |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | LJIV600        |  HP LaserJet Series 4 and 5 (600 DPI in HP-PCL      |
           |                |  mode).  Note that this driver is only available    |
           |                |  with Version 6.08 (TS420) and above                |
           |                |                                                     |
           ------------------------------------------------------------------------
           |                |                                                     |
           | LJIVPS         |  Any black and white or gray-scale PostScript       |
           |                |  printer which supports 600 DPI.  Note that this    |
           |                |  driver is only available with Version 6.08         |
           |                |  (TS420) and above                                  |
           |                |                                                     |
           ------------------------------------------------------------------------
      

      You can display a list of all SAS/GRAPH device drivers by submitting the following SAS program:

               proc gdevice c=sashelp.devices nofs;
      
                    list _all_;
      
                run;
                quit;
      

      GACCESS=

      specifies where the output from the device driver is sent. You can specify GACCESS=GSASFILE to direct output to the location referenced by the fileref GSASFILE. Note that the name of GSASFILE is a special name reserved by SAS/GRAPH for use with the GACCESS= graphics option. If you want to use a name other than GSASFILE, use the GSFNAME= graphics option instead of GACCESS=.

      The 'host_parameters' you specify on the FILENAME statement for GSASFILE will vary depending on your operating system and site-specific requirements. For direct spooling on MVS, the FILENAME statement for GSASFILE is typically coded as follows:

        filename gsasfile sysout=sysout_class dest=printer_destination;
              

      where 'sysout_class' is the SYSOUT class normally used to send regular text output to your printer and 'printer_destination' is the destination for your ASCII printer.

      On CMS, if you want to route the graphics data stream directly to a disk file, code the FILENAME statement for GSASFILE as follows:

        filename gsasfile 'filename filetype filemode';
           

      If you want to route the graphics data stream directly to RSCS PRINT, add CMS SPOOL and TAG commands as follows:

        x cp spool prt to rscs noh cont;
        x cp tag dev prt printer_dest 50;
        
        filename gsasfile printer;
        

      GPROTOCOL=

      identifies the type of protocol converter to which the printer is attached (if at all). The GPROTOCOL= graphics option can also be used to specify how the graphics data stream is to be formatted. Here is a list of the valid values for the Version 6 GPROTOCOL= graphics option:

      
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | Protocol      | Protocol            | Trigger characters                 |
        | Module        | Converter(s)        |                                    |
        |               |                     |                                    |  
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPLCL      | Andrew Corp, Local  | Start:  |^  (vertical bar followed |
        |               | Data, KMW           |              by logical not sign)  |
        |               |                     | End:    $                          |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPAGL      | AGILE               | A cent sign followed by a count    | 
        |               |                     | byte at the beginning of each      |
        |               |                     | record                             |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPISI      | ISI,                | A cent sign followed by a dollar   |
        |               | AGILE               | sign at the beginning of each      |
        |               |                     | record                             |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPNET      | I-DATA,             | Start:  &&??% %%           |
        |               | Netcommander,       | End:    %                          |
        |               | various others      |                                    |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPDCA      | DCA's IRMAprint,    | Start:  ^  (logical not)           |
        |               | IRMAprint II,       | End:    ^  (logical not)           |
        |               | QMS AFPlink,        |                                    |
        |               | TEK 4512            |                                    |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPVAT      | Avatar              | Start:  broken vertical bar        |
        |               |                     |         followed by a slanted      |
        |               |                     |         single quote (hex '6A79')  |
        |               |                     | End:    $                          |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPIDX      | IDEX                | Start:  `C2  (hex '79C3F2')        |
        |               |                     |                                    |
        |               |                     | End:    `  (hex '79')              |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPIDA      | I-DATA              | Start:  &&??:              |
        |               |                     |                                    |
        |               |                     | After the starting trigger         |
        |               |                     | sequence, SASGPIDA formats the     |
        |               |                     | graphics data as straight EBCDIC   |
        |               |                     | except that it precedes each       |
        |               |                     | unprintable character in the       |
        |               |                     | data stream with a :               |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPDAT      | VII DATA            | SASGPDAT formats the graphics data |
        |               |                     | as straight EBCDIC except that it  |
        |               |                     | precedes each unprintable          |
        |               |                     | character in the data stream with  |
        |               |                     | a ^ (logical not sign)             |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPAXI*     | AXIS                | Start:  %<                      |
        |               |                     | End:    >%                      |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPIOC*     | I/O Corp.           | Start:  &%                     |
        |               |                     | End:    &%                     |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPCAB*     | Cablenet            | Start:  &%                     |
        |               |                     | End:    $                          |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
        |               |                     |                                    |
        | SASGPCHK*     | Cherokee            | Start:  %%-%%                      |
        |               |                     | End:    %%+%%                      |
        |               |                     |                                    |
        |               |                     | SASGPCHK also places the string    |
        |               |                     | %% before and after each record    |
        |               |                     | in the GSF                         |
        |               |                     |                                    |
        ----------------------------------------------------------------------------
      
      * These protocol modules are only valid beginning with the Version 6.09 Enhanced (TS450) release of the SAS System.

      Several generic Version 6 protocol modules are available that format a graphics data stream that is not specific to any one protocol converter. These protocol modules are as follows:

      
      
        ----------------------------------------------------------------------------
        |               |                                                          |
        | Protocol      | Description                                              |
        | Module        |                                                          |
        |               |                                                          |  
        ----------------------------------------------------------------------------
        |               |                                                          |
        | SASGPASC      | Formats the graphics data stream in "straight" ASCII     |
        |               | format.                                                  |
        |               |                                                          |
        ----------------------------------------------------------------------------
        |               |                                                          |
        | SASGPSTD      | Formats the graphics data stream in "straight" EBCDIC    |
        |               | format.                                                  |
        |               |                                                          |
        ----------------------------------------------------------------------------
        |               |                                                          |
        | SASGPSCS      | Formats the graphics data stream in SCS transparency     |
        |               | mode.  This mode is also known as hex '35'               |
        |               | transparency mode.  Each record of graphics data         |
        |               | written out by SASGPSCS is the same as SASGPASC, except  |
        |               | that the SASGPSCS module writes a hex '35' in column     |
        |               | one of each record and writes a count byte (which does   |
        |               | not include the hex '35' or the count byte itself) in    |
        |               | column two of each record.                               |
        |               |                                                          |
        ----------------------------------------------------------------------------
        |               |                                                          |
        | SASGPHEX      | Formats the graphics data stream in hex transparency     |
        |               | mode, similar to the protocol modules available for      |
        |               | specific protocol converters except that SASGPHEX        |
        |               | does not write out any starting or ending trigger        |
        |               | characters.                                              |
        |               |                                                          |
        ----------------------------------------------------------------------------
       

      GSFLEN=

      specifies the length of the records written to a printer or to a graphics stream file. When using one of the protocol modules specified above (except for SASGPASC, SASGPSTD, and SASGPSCS), the actual length of the records written to a printer or to a graphics stream file will be twice the value you specify for GSFLEN (since each byte of ASCII data is expanded to two bytes of EBCDIC data). For example, if you specify GPROTOCOL=SASGPLCL and you send the graphics data stream to RSCS PRINT (which limits the length of records to 132), set GSFLEN=64. Due to additional overhead required by SAS/GRAPH device drivers, it is recommended that you set the GSFLEN value low enough so that once it is multiplied by two, the result is still at least four bytes shorter than the record length of the actual GSF.

      GSFMODE=

      specifies how the graphics data stream is written. GSFMODE= should be either REPLACE (which replaces any data that has previously been written to a file) or APPEND (which appends the output to an existing file). When writing a graphics stream file to the JES spool (on MVS) or RSCS (on CMS), you get the same results with GSFMODE=REPLACE as you would with GSFMODE=APPEND. The only time there is a difference between REPLACE and APPEND is when writing the graphics data stream to a disk file.

      TRANTAB=

      specifies the SAS/GRAPH translate table that the device driver will use. In general, when running on the MVS operating system and using a PostScript device driver, specifying the CMS translate table (GTABCMS) enables the PostScript driver to utilize the correct ASCII values for left and right square bracket characters used by the PostScript language. Otherwise, do not specify the TRANTAB= graphics option.

Using PC-attached ASCII printers

    Many mainframe sites use ASCII printers which are attached to the mainframe either through a PC or some type of local area network. The PC or the LAN is then connected to the mainframe. With this type of configuration, producing mainframe graphics on the ASCII printer typically falls into one of the following two categories:

    • Creating a GSF (graphics stream file) on the mainframe, downloading the GSF to the PC or the LAN, and then printing the GSF locally. If you want to create a GSF which is suitable for downloading to a PC or LAN, refer to the section "Creating a GSF suitable for downloading to a PC".

    • Directly spooling a GSF to the PC-attached or LAN-attached printer.

    Note that SAS/GRAPH Software does not support direct spooling of mainframe graphics to PC-attached or LAN-attached ASCII printers. In many instances, problems arise because the graphics data stream produced by SAS/GRAPH gets modified or corrupted by another software product after the GSF is created but before it reaches the printer. In most situations, your best solution for having success when trying to directly spool mainframe graphics to PC-attached printers is to use GPROTOCOL=SASGPASC. This will cause the SAS/GRAPH driver to format the graphics data as straight ASCII data. You must then make sure that the graphics stream file is spooled to the printer in "ASCII passthrough" mode. Spooling the data in ASCII passthrough mode is the same as performing a binary download of an ASCII file on disk. In "ASCII passthrough" mode, the ASCII data is sent to the printer "as is", with no EBCDIC-to-ASCII conversion being done and no additional characters added to the data stream (such as carriage returns, line feeds, or new line commands).

    Creating a GSF suitable for downloading to a PC

      To create a GSF on the mainframe which is suitable for downloading to a PC or LAN and to then print locally on an ASCII printer, follow these steps:

      1. Create a GSF (graphics stream file) on the mainframe.

        The following SAS/GRAPH program demonstrates how to create a GSF on the mainframe:

          filename gsasfile 'host_file_name' lrecl=132 recfm=vb;
          
          goptions device    = driver_name
                   gaccess   = gsasfile
                   gprotocol = sasgpasc
                   gsflen    = 128
                   gsfmode   = replace
                   trantab   = gtabcms;   /*  On MVS, specify trantab=gtabcms  */
                                          /*  when driver_name is set to a     */
                                          /*  PostScript device driver.        */
          
          title 'SAS/GRAPH Test';
          
          proc gslide;
           run; quit;
          
          filename gsasfile clear;
           

      2. Download the GSF to your PC as a binary file.

        Once you have created the GSF on the mainframe, download the GSF to your PC as a binary file. Downloading the GSF as a binary file means that no EBCDIC-to-ASCII translation is performed during the download and that no carriage return or line feed characters are added to the GSF.

      3. Send the GSF to your printer.

        Once the GSF has been successfully downloaded to your PC, use the DOS COPY command to send the GSF to your printer as follows:

          COPY /B filename.ext port

        The /B indicates to the DOS COPY command that the file to be printed is a binary file and should be copied to the appropriate communications port "as is".

        For example, if the GSF on the PC is named SASGRAF.GSF and your printer is attached to LPT1, issue the following COPY command:

          COPY /B SASGRAF.GSF LPT1:

        If you are sending the GSF to a local LPT port, you may need to set an "infinite retry" on the port first by specifying:

          MODE LPT1:,,P

        In certain situations, failure to issue the MODE command may result in incomplete graphs or may result in error messages from the COPY command.

      These steps can be used when producing mainframe SAS/GRAPH output on any ASCII hardcopy graphics device attached to any ASCII-based operating system. As long as you do either a binary download or a binary transfer to your ASCII-based operating system, you can successfully produce mainframe graphics output on any ASCII graphics device which SAS/GRAPH supports.

Using SAS/GRAPH with VPS

    If you have a PC-attached or LAN-attached printer which is defined as a VPS printer, you may be able to directly spool mainframe graphics to your printer if your PC or LAN software supports "SCS transparency" mode by taking advantage of the VPS parameter TRN CLASSES (where TRN stands for "transparency"). VPS takes the ASCII graphics data stream formatted by the SASGPASC protocol module and converts it to SCS transparency mode before sending it to the printer. Here is a sample SAS/GRAPH program which demonstrates this:

      filename gsasfile sysout = vps_transparency_class 
                        dest   = printer_dest;
      
      goptions device    = driver_name
               gaccess   = gsasfile
               gprotocol = sasgpasc
               gsflen    = 80
               gsfmode   = replace;
      
      title 'SAS/GRAPH Test';
      
      proc gslide; 
      run; quit; 
      
      filename gsasfile clear;
      

    For example, if you have defined the VPS parameter TRN CLASSES for your printer to be the SYSOUT class of T and the VPS destination for your ASCII printer is PRTHPLJ, code the FILENAME statement for GSASFILE as follows:

    filename gsasfile sysout=t dest=prthplj;
    

    Here are some additional VPS parameters to be aware of. Note that any changes to VPS parameters are usually done by the VPS support person at your site.

      XLATE=

      By default, the XLATE (ie, printer translate) parameter in VPS is set to Y (for YES). This tells VPS to translate characters that would normally be unprintable on the mainframe to blanks. When attempting to spool straight EBCDIC graphics data or straight ASCII graphics data with VPS, you typically need to set the XLATE parameter to N (for NO). This will prevent VPS from translating unprintable characters to blanks.

      NCC SPACE=

      If the VPS parameter NCC SPACE is set to a non-zero value, VPS may insert CR (carriage return) and/or LF (line feed) commands into the graphics data stream. In certain situations, such as attempting to spool an HP-PCL data stream in straight ASCII format, these additional CR/LF commands can cause problems. To prevent VPS from inserting these additional CR/LF commands into the data stream, set the NCC SPACE parameter to 0 (zero).

      AUTONL=

      In certain situations, VPS may insert NL (new line) commands into the data stream that it spools to an ASCII printer. Once again, the insertion of NL commands into the graphics data stream may cause problems once the graphics data stream reaches the printer. To prevent VPS from inserting NL commands into the data stream, set the AUTONL parameter in VPS to a value of YES. If you set AUTONL to YES, VPS assumes that the printer will handle the new line character itself, and will not insert NL commands into the data stream.

      TRAIL BLANK=

      By default, VPS will normally truncate blanks (hex '40') if those blanks are found at the end of a data line VPS is spooling to a printer. This action by VPS may cause problems when spooling an HP-PCL data stream to an ASCII printer and the HP-PCL data stream contains one or more hex '40' characters at the end of a record. To prevent VPS from truncating trailing blanks, set the VPS parameter TRAIL BLANK to YES.

Conclusion

Directly spooling mainframe graphics to ASCII printers can be a difficult process. When attempting to do this for the very first time, your best plan of action is to gather as much information about your configuration as possible. Here are some of the issues you will need to resolve:

  • If your printer is attached to the mainframe via a protocol converter or a 3287-type coax card, find out the vendor of the converter or coax card and also find out what starting and ending trigger characters are necessary to place the converter or coax card into and out of hex transparency mode. If you can print out the configuration of the converter or the coax card, the configuration sheet will usually provide this information.

  • If your printer is attached to the mainframe via a PC or LAN, find out what software is running on the PC or LAN which allows you to define the printer as a mainframe printer. This software is usually some type of 3270 emulation software (such as Attachmate Extra! for Windows or DCA's IRMA Workstation for Windows) or it is some type of print spooling software (such as Novell's NetWare HostPrint software). Also find out if your PC or LAN software supports any type of hex transparency mode, ASCII transparency mode, or SCS transparency mode.

  • You should find out what type of mainframe spooling utility you plan to use to spool the output to the printer. For MVS systems, this spooling utility is typically a software product such as VPS or CA-Spool. For CMS systems, this spooling software is usually RSCS.

  • Check your ASCII printer to see if it supports the PostScript language. When directly spooling mainframe graphics to ASCII printers, it is generally easier to get PostScript printers to work with SAS/GRAPH than non-PostScript printers. This is because PostScript data streams contain all printable characters on the mainframe (except for the left and right square bracket characters).

SAS, SAS/GRAPH, and Observations are registered trademarks or trademarks of SAS Institute, Inc.
IBM is a registered trademark of International Business Machines Corporation.
Attachmate and EXTRA! are registered trademarks of Attachmate Corporation.
VPS is a trademark of Levi, Ray, & Shoup, Inc.
CA-Spool is a trademark of Computer Associates.
Novell is a registered trademark of Novell, Inc.
NetWare HostPrint is a trademark of Novell, Inc.