Starting with Profound UI Verison 5, our web version of the Work With Spooled Files utility is provided with the Rich Display or Genie module of Profound UI. The purpose of this tool is not to replace IBM's tool for those that manage printer operations, but rather to make it easier for end users to view and print spooled files from their PCs when they don't have a printer available.
The name of the command is PUIWRKSPLF.
Using PUIWRKSPLF in Genie
The PUIWRKSPLF command is a standard IBM i command that can be run from the command line in Genie. You can also put the PUIWRKSPLF into a CL program and call it from your applications.
You can use F4=Prompt and F1=Help on the PUIWRKSPLF command, just like any standard IBM i command. Use the command help for detailed information about PUIWRKSPLF's parameters.
Using PUIWRKSPLF from a Rich Display Session
Since Rich Display Sessions do not provide a command line where you could type the PUIWRKSPLF command, to use it from your Rich Display programs, we recommend putting it in a CL program. (You could also potentially use APIs such as the QCMDEXC API to run the command.) You can even set up your CL program as the 'initial program' from the Visual Designer, or call it as a "Rich Display" from Atrium.
When editing your CL program in SEU or RDi, you can use F4=Prompt or F1=Help to get help on the PUIWRKSPLF command, just like any other CL command. Use the command help for more detailed information about PUIWRKSPLF's parameters.
Options on the PUIWRKSPLF Screen
The PUIWRKSPLF screen has a vertical (on the right-hand side) scrollbar that you can use to scroll through the list of spooled files. Also, because there are more attributes than will fit across the width of the display, it provides a horizontal (on the bottom) scrollbar that you can use to see the other attributes. You can also change the sequence of the columns by dragging and dropping the column headings. This is useful because you can put the attributes that you use most frequently on the left-hand side of the display, and the ones you use less often can be far to the right (where you have to scroll to see them.) PUIWRKSPLF will use the web browser's "local storage" to remember the sequence of the columns you set. You can also sort by any of the columns on the display by clicking on the column heading.
The following options work on the spooled files that you have selected. Use the mouse (or tap with your finger if you're using a touch display) to select the spooled files you wish to work with, and then select one of the following buttons:
- View Text = views a spooled file in your browser screen in plain text format.
- Download Text = downloads a text file of the spooled file for you to save on your local computer. (See section below for Notes About Downloading Spool Files)
- View PDF = views a spooled file in your browser in PDF format. (See 'Installing PDF Support' below for more information.)
- Download PDF = downloads a PDF file of the spooled file for you to save on your local computer. (See 'Installing PDF Support' below for more information.) (Also see section below for Notes About Downloading Spool Files)
- Change = lets you change the attributes of the spooled file.
- Release = lets you release held spooled files, so that they can be printed on a printer
- Hold = lets you place spooled files on hold so that they will not be printed on a printer
- Delete = will delete the highlighted spooled files, removing them permanently from the system
The following options do not require you to select any files:
- Refresh = re-loads the list of spooled files from the server
- Settings = allows you to change settings that control how the double-click and view options work
- Reset Cols = resets any moved or sorted columns back to their default values
- Exit = Exit the PUIWRKSPLF application.
Double-clicking on a spooled file is a shortcut that means "view this spooled file in the default manner". You can control whether double-click views the spooled file as a PDF or Text document on the 'Settings' display.
Notes About Downloading Spool Files
Some browsers have options for how to handle downloaded files that may override the default behavior, such as opening a downloaded PDF with the Adobe PDF viewer plugin, instead of saving it on your local disk drive. Another common setting in many browsers is whether to save your downloads automatically without prompting, or to prompt first for the folder location to download, as well being able to set a default save location for your downloads. Please refer to your browser's settings and documentation if your downloads are not working the way you might expect.
Whether your browser is saving downloads automatically or showing a prompt for file name and location, the PUIWRKSPLF utility will generate a default file name, using information from the columns of data visible for each spool file. If you configure your browser to prompt before saving, you will be able to change the default filename before saving. The default filename will be formatted as follows:
JobName_UserData_UserID_JobNo_SplfName_SplfNo_CreateDate.pdf (or .txt, if downloading as text)
So, if the first file in the example above were downloaded as a PDF, the default file name would be:
Note that User Data is not always present on spooled files. If there is no user data, the format will be similar to the format above, but excluding the user data piece. Also, there are some characters that are invalid as part of a file name in most file systems. If any of these invalid characters are found in the user data, these will be replaced with the character 'x' in the generated file name. Embedded blank spaces in user data will be replaced with underscores (_), and the following characters will be replaced with x's:
Selecting Multiple Spool Files to Work With
Any of the actions that require a file selection can be performed on multiple spool files at one time.
To select multiple spool files, you have 2 choices: random selection or block selection:
Random Selection: Hold down the Ctrl key (Cmd key on Mac), and keep it down while clicking each file you want to select.
Block Selection: Click the first one to select, then hold down the Shift key, and then click on the last one in the block you want to select.
Installing PDF Support
The PUIWRKSPLF utility uses the IBM Transform Services for i licensed program option to convert spooled files to PDF format. This option is provided with IBM i 6.1 and later (at no charge) with the operating system. However, because it is an optional component, you may not have it installed.
To install this support from your IBM i installation media:
- From a 5250 display, type GO LICPGM
- Choose option 11
- Page down until you find licensed program options 57xx-TS1,
- Place option 1 next to 57xx-TS1 *BASE option, and option 1.
- Press ENTER and follow the on-screen prompts to install the options.
If you do not have these options installed, you will still be able to use PUIWRKSPLF, however you will only be able to view your spooled files in Text format.
When you click the Settings button, you will see the following display:
- Double-click views as = When you double-click a spooled file, this determines whether it views the file as plain text or as PDF. PDF requires more resources to view, but looks nicer and provides better support for printing.
When you click the Save button, the options you've selected will be saved into your browser's "local storage". This way, the next time you use the PUIWRKSPLF utility from the same computer and web browser, you will not need to set these settings again because they will be remembered.
Controlling Access or Transformation With an Exit Program
Beginning with Profound UI Version 5, Fix Pack 4.0, it is possible to write an exit program that can add custom security or let you use a different method of transforming spooled files to text or PDF format. For more information, please see Spooled File Access and Transform Exit Program (PUISPLEXIT)