Displaying Error Message (Without using Error Indicator Message)

Hello,

I need to display an Error Message in Display file but not using a display field's Error Indicator Option or Message files.

For Example: "File is updated" or "You are not authorized".  It should come in the last line of display file. I can do this by highlighting a field. but what I need is just to show a message when the operation is done.

Please give your suggestions.
TSMVijayAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MurpheyApplication ConsultantCommented:
Hi TSMVijay,

What is wrong with a message file? it's the most easy way....
but there are other posibilities. depending on the situation...
tell me (us)) more and I (we) will advise :)

Regards,
Murph
Sriram_PenumathyCommented:
One option is to use an compile time array in the program. You can store all the messages such as 'File opened','user not authorized' etc in this array. In the actual logic you can look up the array  to retrieve the corresponding text.  
MurpheyApplication ConsultantCommented:
You can do the same with the RTVMSG command, you can include that from a little CL program or directly run it with a QCMDEXEC call. Personally I prefer to use a CLprogram just Message-ID as input parameter and Message text as return parameter.... if you like you can even define an extra parameter to include variable text in the message text like 'File MyFile opened' or 'user SRIRAM not authorized'.
What is also possible within your RPG program not so easy.

Regards,
Murph

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MurpheyApplication ConsultantCommented:
Hi TSMVijay,

Just a question, why did you aksked for a solution without a MSGF?
it works quit the same as a RTVMSG, unless you use fixed errornumbers in your DSPF.

Regards,
Murph
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.