Learn how iSeries document scanning, capture, distribution and workflow can save money, increase document security, and improve organization efficiency. Learn more at www.informdecisions.com
Popular keywords: as/400 forms - as400 forms - iseries forms - iseries reports - AS/400 reports - AS400 reports

If you look for a way to make case-insensitive searching of spooled files easier, you reach the right place. In this article, there will give 3 ways to locate the text in spooled files in any case. Let’s discover and try the methods which you find it suitable for your work.

1. IBM Navigator for i

As a browser application, IBM Navigator for i replaces System i Navigator and runs on port 2001. I think it is the best way here.



This image is about the interface of IBM Navigator for i. Firstly, you need to expand Basic Operations and choose Printer Output which shows your spooled files viewed by list. Find a spooled file you want and open it in a viewer or as a PDF. Also, there is a case-insensitive search option for you to select.

2. SQL

You can use SQL to look for a spooled file.

a. The first step is to create a temporary physical file.

crtpf mylib/splf rcdlen(132)


b. The second step is to copy the spooled file to the temporary file.

CPYSPLF FILE(QPJOBLOG) TOFILE(MYLIB/SPLF)

JOB(123456/MYSELF/MYJOB) SPLNBR(3) CTLCHAR(*NONE)


c. Use SQL to search the physical file.

select * from mylib/splf

where upper(splf) like '%SMITH''

The results are displayed like this:

Smith Widget Mfg Corp 45.00 7.91 21

Joe Smitherman, Esq. 150.00 2.80 6

Billy Gunsmith 28.00 14.02 300

LO-SMITHY-DIN .00 3.75 93

3. Qshell

Qshell is also used to find a spooled file. To translate the text from lowercase to uppercase, the catsplf utility is used to pipe the spooled file into the tr utility. Next, the uppercase text is piped into grep to look for the search string.

catsplf -j 476583/MYSELF/MYJOB QSYSPRT 1 | tr 'a-z' 'A-Z' | grep 'SMITH'

Or:

catsplf -j 476583/MYSELF/MYJOB QSYSPRT 1 | tr '[:lower:]' '[:upper:]' |

grep 'SMITH'

The output looks like the following:

1 SMITH WIDGET MFG CORP 45.00 7.91 21

3 JOE SMITHERMAN, ESQ. 150.00 2.80 6

4 BILLY GUNSMITH 28.00 14.02 300

6 LO-SMITHY-DIN .00 3.75 93

To see the text without converting the text, use this version of grep:

catsplf -j 270234/MYSELF/MYJOB QSYSPRT 1 | grep [Ss][Mm][Ii][Tt][Hh]

The grep expression tells the system to find a upper- or lowercase s followed by an upper or lowercase m followed by . . . . The output looks like the following:

1 Smith Widget Mfg Corp 45.00 7.91 21

3 Joe Smitherman, Esq. 150.00 2.80 6

4 Billy Gunsmith 28.00 14.02 300

6 LO-SMITHY-DIN .00 3.75 93

Visit the page: www.informdecisions.com to explore supporting tools for IBM I!

Source: itjungle

Related keywords: SharePoint Scanningas400 to excelAs400 barcode, spool file in as400 
Design by Ly Dinh Themes - Cân điện tử | Blogger Theme by iSeries IBM i