RPTSEARCH Command for Searching Spool Files - Support

RPTSEARCH Command for Searching Spool Files

From Support

Jump to: navigation, search

As of V4.48 of the AS/400 Report Splitter, the following command is included:

RPTSEARCH - Search spool file.

Description: The report search command can be used to scan a text based *SCS spool file for a selected search string or multiple string values.

The parameters are listed below:

Spool file name - Enter the spool file name to search.

Job name - Enter the spool file job name.

User name - Enter the spool file user name.

Job number - Enter the spool file job number.

Spool file number - Enter the spool file number.

Control character - Enter the print control character value to use. Default = *PRTCTL

Recopy spool data or use last - If *YES is specified, the spool file data will be copied. If *NO, the data will be used from the last time

Search for selected criteria - Enter one or more search criteria values delimited with the delimiter value specified by the criteria delimiter.

Ex: Single criteria value: 51024; Ex: Multiple criteria values: 51024;CHICAGO;

Criteria delimiter - If multiple search criteria values are entered, this character is the delimiter. Default = ;

And/Or comparison - If *AND is entered, all entered criteria values must match. If *OR is entered, only one of the entered criteria values must match.

Pattern length - Search pattern length. Default value = 1

Translate string to uppercase? - Translate criteria values to upper case before comparing. *YES/*NO.

Trim pattern trailing blanks? - Trim trailing blanks in pattern. *YES/*NO

Wild character - Wildcard character to use when doing a pattern search instead of a search for a specific value. Ex: If a question mark is used as the wildcard character, a pattern value

Command Examples

Ex: Search the selected spool file for a single value of: 51024 RPTSEARCH FILE(RPTSAMPLE) SEARCHCRIT('51024;') CRITDELIM(';') ANDOR(*AND) PATLEN(1) TRANSLATE(*NO) TRIM(*YES) WILD('?')

Ex: Search the selected spool file for a single with a pattern of: 5??24 RPTSEARCH FILE(RPTSAMPLE) SEARCHCRIT('51024;') CRITDELIM(';') ANDOR(*AND) PATLEN(1) TRANSLATE(*NO) TRIM(*YES) WILD('?')

Ex: Search the selected spool file for two specific values: 51024 and CHICAGO. Both values must be found in the spool data. RPTSEARCH FILE(RPTSAMPLE) SEARCHCRIT('51024;CHICAGO;') CRITDELIM(';') ANDOR(*AND) PATLEN(1) TRANSLATE(*NO) TRIM(*YES) WILD('?')

Ex: Search the selected spool file for two specific values: 51024 and CHICAGO. Either values can be found in the spool data. RPTSEARCH FILE(RPTSAMPLE) SEARCHCRIT('51024;CHICAGO;') CRITDELIM(';') ANDOR(*OR) PATLEN(1) TRANSLATE(*NO) TRIM(*YES) WILD('?')

Personal tools