×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Booth, 

Use Alan's suggestion below only move the Update SFL1 after the endsl
statement.

________________________________________________________________________
______________________
Randy Kesterson, Information Services
Market Transport Services  - a UTi Worldwide Company| 110 N Marine Drive
| Portland, OR 97217 | USA
rpkesterson@xxxxxxxxxxxxxxxxxxx | D +1 503.978.4353 | O +1 503.283.2405
x353 | F +1 503.978.4392 
 
 

-----Original Message-----
From: rpg400-l-bounces+rpkesterson=markettransport.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+rpkesterson=markettransport.com@xxxxxxxxxxxx]
On Behalf Of Alan Shore
Sent: Thursday, March 08, 2007 11:25 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Invalid subfile options and SFLMSG

Booth - I see your point where you say using *in70 to set the message to
display, and I've had this problem happen to me before.
Use what has been suggested by myself and a few other people.
RPG code:
  * Loop for all SFL records, validate that SFL Options are valid.
C                   for       wNdx = 1 to SF1RECS
C     wNdx          chain(e)  SFL1
C                   if        %found
C                   eval      *in70 = *off            <--------
inserted
line
C                   select
C                   when      SF1OPT = ' '
C                   when      SF1OPT = '5'
  * Every other option invalid.
C                   other
C                   eval      *in70 = *on
C                   eval      *in90 = *on
C                   update    SFL1
C                   endsl
C                   endif
C                   endfor



Alan Shore

NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx

rpg400-l-bounces@xxxxxxxxxxxx wrote on 03/08/2007 02:19:01 PM:

RPG code:
  * Loop for all SFL records, validate that SFL Options are valid.
C                   for       wNdx = 1 to SF1RECS
C     wNdx          chain(e)  SFL1
C                   if        %found
C                   select
C                   when      SF1OPT = ' '
C                   when      SF1OPT = '5'
  * Every other option invalid.
C                   other
C                   eval      *in70 = *on
C                   eval      *in90 = *on
C                   update    SFL1
C                   endsl
C                   endif
C                   endfor

DDS Code
A          R SFL1                      SFL
A            SF1OPT         1   B  6  5
A  51                                  DSPATR(ND)
A  70                                  DSPATR(PC)
A          R S1                        SFLCTL( SFL1 )
...
A  70                                  SFLMSG('Invalid option +
A                                      keyed.' 70)


Bob P. Roche wrote:
can you show us some of your code where you read update the
indicator
and
update the subfile, maybe someone can spot the problem?



Nick_Radich@xxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/08/2007 01:05 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Invalid subfile options and SFLMSG






Booth,

Did you update the subfile record after you turned *off the
indicator?

HTH,

Nick



Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct  (320) 679-6683
Toll free  (800) 388-2155  ext. 6683
Fax  (320) 679-4516
nick_radich@xxxxxxxxxxxxxx



Booth Martin <booth@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/08/07 01:01 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Invalid subfile options and SFLMSG






Why wouldn't the indicator be shut off when the message displays?
The
book says it will.

But, beyond that, I tried what you suggest and that made no
difference.

Sharon Wintermute wrote:
I assume your *in70 is the error indicator.

When you loop thru your subfile records, you need to turn off *in70
when

you initially read it in.

Sharon


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Booth Martin
Sent: Thursday, March 08, 2007 12:17 PM
To: RPG programming on the AS400 / iSeries
Subject: Invalid subfile options and SFLMSG


Invalid subfile options and SFLMSG

Time to get a tad smarter.  Not necessarily smart, just smarter
than I

am this morning.

OK, here's the scenario:  A subfile with a subfile option field so
one

can key in a '2' to edit, '4' to delete, '5' to view, etc.  I've
added
a


validity checking subroutine to be sure the user keyed in a valid
value
('2','4', '5' for instance).  I do a "for" loop and test each
subfile
record. If the option does not validate then I turn on *in70 and
update
the subfile before continuing the loop.  After the "for" loop there
is

no further processing, and the screen is exfmt'd again.

Everything works fine so far as I can see, excepting one problem
that
I
can not figure out how to solve.

In testing, if I key several invalid options and press enter, it
returns


the error message and places the cursor on the first error of the
subfile.  Fine so far.  Now, if I fix the first invalid option but
none
of the others, and then enter, the cursor goes to the corrected
field
and still shows as an error.



--
---------------------------------
Booth Martin
http://www.Martinvt.com
---------------------------------
--
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 ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.