News

Ariadne Software is pleased to announce the addition of a new command to the CoolSpools suite. GETSPLDTA allows you to retrieve content from an IBM i spool file into a CL program variable. This command is part of the Spool Converter module, which already provides rich spooled file conversion functionality.

To retrieve data from a spooled file with GETSPLDTA you can specify either the position of the required data within the spooled file or a lookup key string to search the spooled file for the data’s location.

If you know the specific location within the report where the data can be found then use *POS parameters to specify the page, line and column number where the data can be found.

If the location of the data within the report is unpredictable then use *KEY parameters to search the spooled file’s content using a key string, specifying which occurrence of matching text is to be used and the offset from the search text’s location to the required data.

We are aware of at least one CoolSpools client planning to use this new command to retrieve a report identifier that is only available within the report content in order to decide which CoolSpools spooled file conversion command to run in order to generate a PDF or Excel document and distribute it as an email attachment to the appropriate recipients.

Version Requirements

This new command is available in CoolSpools V7R1 fix pack 049 and upwards. If you are a CoolSpools V7R1 site then follow the instructions in the CoolSpools maintenance guide to update to the latest fix pack level. If you are using CoolSpools V6R1 or older and would like to use the GETSPLDTA command then there is no charge involved in upgrading to CoolSpools V7R1, so long as your support and maintenance is up to date.

Example CL Program

WRKSYSSTS is one of several IBM i system commands that only allow output to screen or print, making it difficult to reference the output of the command within a CL program. Using CoolSpools command GETSPLDTA it is now a simple task to retrieve data from within the spooled file output of such a command for use within a CL program.

The example program below uses both *POS and *KEY options to get data elements (ASP Used percentage and the *BASE pool size) from the output of command WRKSYSSTS OUTPUT(*PRINT).