Using Net Print/400 within Webulator/400

This chapter tells you how to use the I/NET Net Print/400 product in a Webulator/400 session. The following topics will be covered:


Overview

An interface for a Webulator/400 session is provided that displays a list of spooled files, and runs the Send Spooled Files using Net Print/400 (SNDSPLFNP) command automatically when the user selects a spooled file to be printed or displayed. The command to run this special interface is called Work with Spooled Files using Net Print/400 (WRKSPLFNP).

The Send Spooled Files Using Net Print/400 (SNDSPLFNP) command accepts parameters for a specific spooled file, and the calls the main processing program NETPRTIB which in turn sends an AS/400 spooled file to a PC for printing or display.

for basic information about the I/NET Webulator/400 product, visit the website at

http://www.inetmi.com/iseries/webulator


Using the Work with Spooled Files using Net Print/400 (WRKSPLFNP)

The Work with Spooled Files Using Net Print/400 (WRKSPLFNP) command generates a list of spool files according to the parameters given. This is meant as an aid to assist in the selection of spooled files that are to be printed at the browser.

The Work with Spooled Files using Net Print/400 (WRKSPLFNP) is intentionally similar to the interface and selection criteria used by the WRKSPLF command. If you type WRKSPLFNP, and then prompt, you will see the image in Figure 3.1. Using the default settings, you would be presented with a list of the spooled files that are currently available for the user signed on.

A typical WRKSPLF scenario would be:

  1. If the product library (NETPRTINET) is not in your library list, add it by typing the command addlible netprtinet - and press the enter key.

  2. At the AS/400 command line, type - WRKSPLFNP, and press F4 (prompt), and then fill in the appropriate parameters. See Figure 3.1.

  3. Press the enter key. A list of spooled files for the chosen criteria is displayed (See Figure 3.2).

Figure 3.1 The WRKSPLFNP Command Prompted

Figure 3.2

Using the list of spooled files generated in Figure 3.2, Type "1" in one or more rows. Press enter to print, or press F4 to change the parameters used to call SNDSPLFNP. Other panel options include: 2 - Change spooled file attributes. 3 - Hold the spooled file. 4 - Delete the spooled file. 5 - Display the contents of the spooled file in HTML form. 6 - release the spooled file (if held). 8 - Display the attributes of the spooled file. You can also use F10, F11 and toggle between three sets of column formats for each spooled file.

Note: Option 5 will display the spooled file in an HTML form using Net Print/400. To display the spooled file directly within the 5250 emulation of the Webulator/400 screen, use the WRKSPLF or DSPSPLF system commands.

WRKSPLFNP - Parameters

User
The name of the user whose spooled files are to be included in the list. This parameter can be used in conjunction with the output queue and library name, form type, and user-specified data parameters to return a partial list of all the spooled files.
The possible special values are:

Output Queue
The name of the output queue whose files are to be included in the list, and the library in which it is located. This parameter can be used in conjunction with the user name, form type, and user-specified data parameters to return a partial list of all the spooled files.
The possible special values for the output queue are:

You can use these special values for the library name:

Form Type
The type of forms that would typically be used in the printer when requesting printed output for this type of report. The form type is the value specified on the printer file or the OVPRTF command when the specific report was created. This parameter can be used in conjunction with the user, output queue name, and user-specified data parameters to return a partial list of all the spooled files.
The possible special values for the form type are:

User Data
The user-specified data value whose files are to be included in the list. User Data is the value specified on the printer file, the OVPRTF command, or within the program when the specific report was originally created. This parameter can be used in conjunction with the user name, output queue name, and form type parameters to return a partial list of all the spooled files.
The special value supported is:

Manufacturer Type and Model
Specifies the manufacturer, type, and model that corresponds to the printer type and model of the printer where the spooled file will be printed. If the Manufacturer Type and Model of your printer is not included in the list provided, you can also create a Workstation Customizing Object or an ASCII device description that help define the characteristics needed. Please refer to the WSCST or DEVD parameters below. This is a required parameter.

Note: The easiest way to print a spooled file in regards to this parameter is to select a printer from the list of available printers (refer to Appendix A, "Available Printer Types,"), and enter that in the Manufacturer Type and Model parameter. Using a Workstation customizing object requires modification of the source code of an existing WSCST object, or creating source code from scratch.

Workstation Customizing Object
A User created Workstation customizing object that represents a printer manufacturer and model. This parameter is prompted only when MFRTYPMDL(*WSCST) is specified.

Library
This sub-parameter contains the name of the library that holds the user created WSCST. The default value is *LIBL. Prompted only when MFRTYPMDL(*WSCST) is specified.

Device Description
Specifies the name of an AS/400 printer device used to control the attributes for printing the spooled file requested. These attributes should match those of the actual printer that will be used to print the spooled file. This parameter is prompted only when MFRTYPMDL(*DEVD) is specified.


Using Send Spooled File using Net Print/400 (SNDSPLFNP)

The Send Spooled File using Net Print/400 (SNDSPLFNP) command is used to print or display a specified spooled file at the browser. It transforms spooled file data to ASCII format for the selected printer type. The file is then sent to the browser.

You can use the command SNDSPLNP independent of the Work with Spooled Files using Net Print/400 (WRKSPLFNP) interface. Type in the command SNDSPLFNP and prompt (F4).
Using the command SNDSPLFNP (see Figure 3.3) a typical session would be:

  1. If the product library (NETPRTINET) is not in your library list, add it by typing the command addlible netprtinet - and press the enter key.

  2. At the AS/400 command line type SNDSPLFNP - and press F4 (prompt), and fill in the appropriate parameters.

  3. Now press the enter key.The spool file is now sent to the browser and will activate the Net Print/400 Plug-in (see Chapter 6, "The Net Print/400 Browser configuration") allowing you to print the spooled file with a Print Dialog box.

Figure 3.3 SNDSPLFNP Command Prompted

SNDSPLFNP - Parameters

Spooled File
This is the file name that was specified by the user program when the file was created, or the name of the device file used to create this file. This is a required parameter.

Qualified Job Name (Job Name/User Name/Job Number)
This parameter has three separate pieces of information, all in one parameter. This is a required parameter.

JobName:
This is used to identify the spooled file. Specifies the name of the job that created the spooled file.
The special value of `*' indicates that the job that issued this command is the job that created the spooled file.

UserName
This parameter specifies the name of the user that owns the spooled file.

JobNumber
This is the number of the qualified job name. This is used to identify the spooled file to be transformed.

Spooled File Number
This specifies the number of the job's spooled file that is to be printed. This is a required parameter.
The possible values are:

Manufacturer Type and Model
Specifies the manufacturer, type, and model that corresponds to the printer type and model where the spooled file will be printed. If the Manufacturer Type and Model of your printer is not included in the list provided, you can also create a Workstation Customizing Object or an ASCII device description that help define the characteristics needed. Please refer to WSCST or DEVD parameters below for more information on using these options.
The possible values are:

Note: The easiest way to print a spooled file in regards to this parameter is to pick a printer from the list of available printers, and enter that in the Manufacturer Type and Model parameter. Using a Workstation customizing object requires modification of the source code of an existing WSCST object, or creating source code from scratch. For more discussion on *WSCST, and *DEVD, see "The Manufacturer Type and Model Parameter" in Chapter 5.

Workstation Customizing Object
A user created workstation customizing object that represents a printer manufacturer and model. This parameter is prompted only when MFRTYPMDL(*WSCST) is specified.

Library
This sub-parameter contains the name of the library where the user created WSCST can be found. The default value is *LIBL. Prompted only when MFRTYPMDL(*WSCST) is specified.

Device Description
Specifies the name of an AS/400 printer device to be used to control the attributes for printing the spooled file requested. These attributes should match those of the actual printer that will be used to print the spooled file. This parameter is prompted only when MFRTYPMDL(*DEVD) is specified.


On-line Help

The Net Print/400 commands and panels have on-line help available. This functionality may be accessed by placing the cursor on a field and pressing the F1 key. Both command and panel interfaces have the look and basic functionality of most any other AS/400 commands.


Error Conditions

Certain conditions can cause the command to fail, these errors may be monitored (monmsg) in a CL program if SNDSPLFNP is executed in an interactive Webulator/400 session. Listed below in Table 3.1 are the possible message ID's that can occur during a Webulator/400 session. Users should refer to the individual message details in the joblog for information about specific failures..

Table 3.1 Net Print/400 error message ID's

MessageID - Basic message description


NPW0B02 - Internal error occurred attempting to write Net Print/400 data to the browser.

NPW0B06 - Error occurred processing the spooled file data via Host Print Transform.

NPW0B07 - A 5250 inquiry error has occurred.

NPW0B08 - Error retrieving 5250 device mode.

NPW0B09 - Error accessing the user defined Workstation customizing object.

NPW0B10 - Parameter required.

NPW0B12 - Incorrect number of parameters passed to program.

NPW0B13 - Previous printer selection information could not be found.

NPW0B25 - A memory allocation error occurred.

NPW0B27 - Internal error occurred while converting CCSID data.

NPW0B44 - Error retrieving attributes for spooled file.

NPW0B45 - Error opening spooled file.

NPW0B58 - Printer device not found.

NPW0B59 - Incorrect manufacturer type and model combination for spooled file requested.

NPW0B60 - Error occurred processing the spooled file data via Host Print Transform.

NPW0B82 - Invalid program call.

NPW0B83 - Invalid program call.

NPW0B88 - Product information for Net Print/400 could not be found.

For more information on CL message monitoring see the OS/400 CL Programming book (document ID SC41-5721).


Copyright © I/NET All rights reserved.