× 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.



At least until another record is read.

Alan Shore <AlanShore@xxxxxxxx> 02/22/07 11:30 AM >>>

Doug - whether the field is on the physical file - or - a field
defined
within the program itself, the field STILL needs to be initializes,
cleared
etc., otherwise once the field has "X" moved to it, it will ALWAYS
remain
"X"



Alan Shore

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

rpg400-l-bounces@xxxxxxxxxxxx wrote on 02/22/2007 12:01:32 PM:

I can do that with no prob, but as I said before to another poster,
the
GPRTSM is a PF field and that record is written after the snippet I
posted.
My apologies for not stating that earlier.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of MWHopkins@xxxxxxxxxxxxxxx
Sent: Thursday, February 22, 2007 10:15 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Minor issue with subst

It looks like your GPRTSM field is not cleared before each read. Once
you

hit a record that has an 'X' and you load the 'X' into GPRTSM then
the
'X'
will always stay.

Why don't you just move FLGFLD to GPRTSM every time you get a good
read?


Matt Hopkins
Sr. Programmer/Analyst
Web: www.pdpgroupinc.com
Email: MWHopkins@xxxxxxxxxxxxxxx
Office: 410-584-0330
Fax: 410-584-0336





"Douglas Palme" <dpalme@xxxxxxxxxxx>
Sent by: rpg400-l-bounces+mwhopkins=pdpgroupinc.com@xxxxxxxxxxxx
02/22/2007 11:06 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


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

Fax to

Subject
Minor issue with subst






One of our customer files has a field for customer flags that has a
length
of 64.  Each position can be turned on with an X in that position.



I am having to modify an old RPG III program that checks this flag
position
and I must doing something wrong because I am getting far more
records
than
I should be.



Here is the relevant code and my explanation of what I am doing:



C                     MOVE *BLANKS   FLGFLD  1

C           GCUSNR    CHAINCORCSTEX             37

C           *IN37     IFEQ *OFF

C           1         SUBSTCXFLGS:28 FLGFLD

C           FLGFLD    IFEQ 'X'

C                     MOVE 'X'       GPRTSM

C                     ENDIF

C                     ENDIF



I need to make sure that for each pass through the primary file I am
working
with a blank FLGLD (which is just my own internal variable) and only
if
CXFLGS position 28 has an 'X' in it do I want to update my work
file,
although I do not have a line that moves *blanks to it if not equal I
did
not think that would have been necessary.



Does anyone see any issue with the code as it is written?





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-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.