Find a string in AS/400

765 pts.
Tags:
AS/400 command functions
AS/400 commands
AS400 Data Definitions
What is a way from the AS400 command line to find a file or string of text. As an example I want to find xy400flr I want to see where the program resides and what menu it is in.
ASKED: June 27, 2011  8:55 PM
UPDATED: July 7, 2011  11:03 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can make your search with sources.
By using WRKMBRPDM command you will get program sources.
You can use Option 25 and Press F13(Shift+F1) it will select all the sources.
Press enter and give the string that you want to find(eg. xy400flr). It will search all the sources existing in that Source physical file under that Library.

Pradeep.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    As an example I want to find xy400flr If that is a directory or streamfile name, you might use the Qshell find - Find files utility. With a name like that, I would expect it to be a folder in the /QDLS file system; so I might run find with a -path /QDLS/* pattern to avoid going into other file systems. I want to see where the program resides and what menu it is in. If xy400flr is a program name, easiest way to find it is probably with a WRKOBJ *ALLUSR/xy400flr command. Finding out what "menu" it's called from is a bit more tricky. It would depend on what kind of "menu" it was on and how that menu was constructed. Searching source files with WRKOBJPDM or WRKMBRPDM (or with FNDSTRPDM) is probably the best starting point. Tom
    125,585 pointsBadges:
    report
  • Mdshadabalam
    Hi , If you want find the your string xy400flr in IFS directory then you can use grep command in STRQSH(Qshell). I.e: execute STRQSH command in command promt execute grep xy400flr /QDLS/* in QSH promt. Hope this will work to find the string in the IFS file Regard, Shadab
    85 pointsBadges:
    report
  • ankit2002
    You can also use FNDSTRPDM then F4 then give the string u want to seach.Give the Source physical File name,library name,*all,*dsp. And you will be able to see that string in present in which file. Ankit Taneja
    770 pointsBadges:
    report
  • TomLiotta
    FNDSTRPDM then F4 then give the string The problem with that is that you need to tell FNDSTRPDM where to look. It searches for records in a named file in a known library. But the question is about how to find that file and library in the first place. FNDSTRPDM can't tell you what library and file contains the string unless you run it over every file in every library until you see a result. And if you want to locate an object of any kind, FNDSTRPDM won't do any good (without a lot of work to feed something into it). Objects aren't strings in files. The WRKOBJ command is much easier in that case. Finally, there are three basic types of "menus" -- *DSPF, *PGM and *UIM. Only *UIM necessarily has the object name in any file that FNDSTRPDM can search. The *PGM type likely will have the string in a source file somewhere, but it's not required. (And UIM can have "menu" elements embedded in *PNLGRP objects, which allows for some tricky stuff.) It can be quite complicated without some details added to the original question. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following