Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS400 - Searching For Strings (Patterns) In a File?

Status
Not open for further replies.

brent01

Technical User
Jul 11, 2001
32
GB
Hi,

Is there an equivalent of grep on an AS400?

I would like to search a file looking for a particular pattern or string in the same way you can use grep with Unix.

I know grep is available on AS400 but only in IFS directories. My file wont be in an IFS directory.

Thanks.
 
try

Display Physical File Member (DSPPFM)

Type choices, press Enter.

File . . . . . . . . . . . . . . FILE > yourfile
Library . . . . . . . . . . . yourlib
Member . . . . . . . . . . . . . MBR *FIRST
From record . . . . . . . . . . FROMRCD 1

press enter


Display Physical File Member
File . . . . . . : yourfile Library . . . . : yourlib
Member . . . . . : yourmember Record . . . . . : 1
Control . . . . . Column . . . . . : 1
Find . . . . . . . search text here

*...+....1....+....2....+....3

press F16

that's the closest to grep you'll find

Mike Butler
Iseries + Sun + PC = Tired Guy
"Never put off 'til tomorrow what you should have done yesterday
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top