AS400 Mid Range/Error Messages

Advertisement


Question
In a subfile, if we use SFLMSG we get a fixed error message as OPTION NOT VALID. Instead of that, I want to display that wrong option with that Error Message. For Example: If I type 85 in Options Column, then the Error Message should be OPTION 85 NOT VALID. How to make it?


Answer
To my knowledge, there is no way to send a variable message using the SFLMSG option.  I tried several approaches today and none works. You could code your own output-only message field and fill it with different messages based on error conditions, but that would not lock the user's keyboard or allow reset using the RESET key.

I tend to use more generic messages like:

"Last name is required" or

"Invalid term code".

- Laird

AS400 Mid Range

All Answers


Answers by Expert:


Ask Experts

Volunteer


Concise Systems/Laird Scranton

Expertise

General AS/400, RPG/400, SDA and CL programming questions. AS/400 performance tuning.

Experience


Past/Present clients
CB Sportswear
Coca-Cola of New York
Encore Paper Company
Golub Corporation
HBO Home Video
Imperial Pools
Kaiser Permanente of NE New York
Mallinckrodt Medical
Marigold Foods
Manpower & Associates
National Datacomputers
New York State Easter Seals Society
New York State Food Merchants Association
Pepsi-Cola Allied Bottlers
Petricca Construction
Taconic Telephone Corporation
TOMRA Recycling
Unistress Corporation

©2012 About.com, a part of The New York Times Company. All rights reserved.