× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



That fixed it Don, thanks for the assitance.  I can then chain the
returned value and make sure that it is a valid glcode and if not
redisplay the display file.

Douglas


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Don Tully
Sent: Saturday, December 25, 2004 12:11 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Trapping for check(ER)


Douglas,

Indicator 20 on check(ER) controls when the check(ER) is in effect.
Action on the GLCODE field does not set the indicator value.

I think what you are looking for is accomplished by removing the
indicator 20 from both the display file and your program.  When user
exits field GLCODE, display file will return control back to your
program as if they had pressed enter.  You may want to code CHECK(FE
ER).

I hope this helps.  Happy holidays

Don Tully
Tully Consulting LLC


date: Sat, 25 Dec 2004 11:48:52 -0600
from: "D.W." <dpalme@xxxxxxxxxxxxxxxxxxxxx>
subject: Trapping for check(ER)

I have a simple display file which has four fields, date, empno,
description, amount, glcode

On the glcode field I have set the check(ER) to indicator 20.

What I am trying to do is trap this field so that when a user enters a
value in and exits the field the program automatically validates the
entry, but I am having a hell of a time figuring out how to trap it.

In the RPG program I have the following:

0001.00 Fpayroll   CF   E             WORKSTN
0001.01 DDOUGIE           S              6S 0
0002.00 C                   DOU       *IN12 = *ON
0002.01 C                   EVAL      *IN01 = *ON
0002.02 C                   EXFMT     PRTRAENTRY
0002.03 C
0002.04 C
0002.05 C                   IF        *IN20 = *OFF
0002.06 C                   EVAL      *IN20 = *ON
0002.07 C                   ELSE
0002.08 C                   EVAL      *IN20 = *OFF
0002.09 C                   ENDIF
0003.00 C                   ENDDO
0004.00 C                   EVAL      *INLR = *ON
0005.00 C                   RETURN

I was hoping that when the user does a field exit on the glcode field
that it would return control to the program so I can validate it, but it
doesn't appear that way.

Does anyone have any suggestions or ideas?

Douglas


-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.