


You might be interested in a series of articles I wrote about a year ago for MC Press. The last one, found here provides a search function across the message text of retrieved messages. Earlier articles (linked to by the article referenced above) demonstrate retrieving messages, changing messages, etc.
Bruce Vining


…how to retrive message files when i given specific *lib or *all
Please describe what you mean by “retrive message files”. Do you only want to retrieve a list of message files? Or do you want to retrieve message descriptions from a message file? Or is there something else you need to do?
Tom
Thanks TomLiotta,
I have creating a program in which i want to retrieve a list of message files in subfile.
just like WRKMSGF command
Can you tell us why you want to write a program to do that when the commands wo work with message files already exist?
Well I suppose you can get a list by using DSPOBJD to an outfile.
And I’m sure Tom will have a nifty API which can also get your list.
But first, as Charlie Browne said, look at the WRKMSGF command.
Phil
I probably would use the List Objects (QUSLOBJ) API to build the list, but DSPOBJD to an *OUTFILE should work fine. It can easily be tested standing alone outside of any program.
Tom
Hi Sorry to all,
i m new in as400 actually i want to search a message in message file which is exist in message file or not.because some time we don’t remember message id then we add new message in message file that the problem.
if you have any idea about this please suggest me
…actually i want to search a message in message file which is exist in message file or not.
That becomes much more complicated.
If you have a message file that’s small, the easiest thing to do is run this command:
Then you can search through the spooled output.
If the message file is too large, you’ll need to call a couple APIs to retrieve the attributes of each message description and to scan the text. Message descriptions can be retrieved with the Retrieve Message (QMHRTVM) API. Scanning the retrieved text for words or phrases would be done in various ways depending how you do your programming.
Tom
hi thanks tom,
Do you have any sample example for because i am new in API
hi All,
Please guide me qmhrtvm in api how to code please give me one sample code
Hi Tom,
I have completed some part of my program in which i fetched msgfile data to physical file through qmhrtvm now i want to search text in my physical file column in that column contained msg description.
…now i want to search text…
Bruce Vining’s articles in the above comment are your best direction right now. I have my own functions for this, but explanations of the code would be lengthy (and the code is lengthy enough). Since Bruce has already written excellent articles, I can’t think of a better place to look.
Tom