Looking at the DDS you do not have a OVRDTA on the field in question and the
Record format has a PUTOVR key word on it. Therefore the data will not change
when you display the record. See the cut/paste from the DDS manual
When selected fields in a record that has already been displayed are to be
changed, an output or an output/input operation sent to the record with the
PUTOVR, OVRDTA, and OVRATR
keywords in effect changes only the fields for which the OVRDTA or OVRATR
keyword is in effect. The OVRDTA keyword permits a change in the data contents
of the field and the
OVRATR keyword permits a change in the display attributes of the field. The way
in which fields are to be changed is controlled by setting option indicators.
Hope this helps
-----Original Message-----
From: rpg400-l-bounces+acr12345=chambers-owen.com@xxxxxxxxxxxx
[
mailto:rpg400-l-bounces+acr12345=chambers-owen.com@xxxxxxxxxxxx] On Behalf Of
Alan Shore
Sent: Wednesday, April 04, 2007 11:02 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Wrong data being displayed.
Derek - I'm not saying what I am about to tell you is the answer to your
problem, but you never know.
I noticed that you use ERRMSG in your DDS
There is nothing wrong with that, we USED it in our main order entry
program.
Notice I emphasized USED.
We have since converted to using a message subfile instead.
The reason was due to that we were sure the program had gremlins (or at
least 1 or 2 poltergeist) living in it
For some reason I cannot get to the IBM website to see the definition of
ERRMSG to highlight our reasoning why,
but in essence
when ERRMSG is invoked (whether or not the index is reset) any changes made
to the data on the DDS screen(s) is(are) NEVER displayed.
We couldn't understand why in debug we could see the values of a number of
different fields being changed, but when we reached the EXFMT, the data was
NOT changed. (Hence the gremlins).
Some of us were thinking we were certifiably insane.
Then we came across the write up of ERRMSG and it ALL made sense.
Since we changed to error subfile, those particular gremlins have
disappeared.
Alan Shore
NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx
"If you're going through Hell, keep going" - Winston Churchill
"derek gonsalves"
<d_gons@xxxxxxxxx
om> To
Sent by: rpg400-l@xxxxxxxxxxxx
rpg400-l-bounces@ cc
midrange.com
Subject
RE: Wrong data being displayed.
04/04/2007 07:53
AM
Please respond to
RPG programming
on the AS400 /
iSeries
<rpg400-l@midrang
e.com>
Hi,
Buck, the new field is not being passed as a parameter.
Should i use RSTDSP(*YES) for compiling the calling program DSPF OR called
program DSPF?
DDS for the display file. The field i have added is #PLTPC , and also moved
each field one line down, since the new field had to be inserted in
between.
A DSPSIZ(24 80 *DS3)
A REF(*LIBL/RMSREF)
A PRINT(*LIBL/RMSPRT04)
A OPENPRT
A R OBC35101
A TEXT('Order / Quote Prompt')
A CA02
/D A***/Z01 CF05
A BLINK
A OVERLAY
A PUTOVR
A 1 2'OBC351.01'
/Z06 A 2 2'Mode:'
/Z06 A DSPATR(HI)
/Z06 A 11 2 8'INQUIRY'
/Z06 A N11 2 8'MAINTENANCE'
A #CMPNO R O 1 15REFFLD(@COMPANY)
A EDTCDE(Z)
A 1 30' Warehouse Review '
A DSPATR(RI)
A 1 62TIME
A 1 72DATE
A EDTCDE(Y)
A 3 2'Order No ..............'
A #IDNO R O 3 26REFFLD(ORDNO OBCOP100)
A TEXT('ORDER ID')
A OVRDTA
/Z03A 51 ERRMSG('Order has been shipped'
51)
/Z03A 52 ERRMSG('Order has not been pick
-
/Z03A slip released' 52)
A 4 2'Customer Number........'
A #CUSNO R Y O 4 26REFFLD(ARCUSTNO)
A TEXT('CUSTOMER NUMBER')
A EDTCDE(Z)
A OVRDTA
A 4 45'Ship-to Number............'
A #SHPNO R Y O 4 72REFFLD(OBSHIPTONO)
A TEXT('SHIP TO NUMBER')
A EDTCDE(Z)
A OVRDTA
A 6 2'Order Date.............'
A #ORDAT 6Y 0O 6 26TEXT('ORDER DATE')
A OVRDTA
A EDTCDE(Y)
A 6 45'Requested Delivery Date...'
A #RQEFD 6Y 0O 6 72TEXT('DELIVERY DATE')
A OVRDTA
A EDTCDE(Y)
A 7 2'Ship Date..............'
A #SCEXD 6Y 0B 7 26TEXT('SHIP DATE')
A OVRDTA
A EDTCDE(Y)
/Z06A 25 DSPATR(PR)
/Z06A N25 DSPATR(UL)
A 66 DSPATR(RI)
A 66 DSPATR(PC)
A***/Z06 DSPATR(UL)
A 66 ERRMSG('Invalid Date' 66)
A***/Z04 50 ERRMSG('No items on this
order'
50)
/Z04A 64 ERRMSG('No items on this order'
64)
A 7 45'Scheduled Delivery Date...'
A #ARRD 6Y 0B 7 72TEXT('Arrival Date')
A OVRDTA
A EDTCDE(Y)
/Z06 A 25 DSPATR(PR)
/Z06 A N25 DSPATR(UL)
A 67 DSPATR(RI)
A 67 DSPATR(PC)
A***/Z06 DSPATR(UL)
A 67 ERRMSG('Invalid Date' 67)
A 9 2'Customer P.O. .........'
A #CUSPO R O 9 26REFFLD(OBCUSTPO)
A TEXT('CUST PO #')
A OVRDTA
A 9 45'Ship-to P.O. .......'
A #SHPPO R O 9 66REFFLD(OBCUSTPO)
A TEXT('SHIP PO #')
A OVRDTA
A 10 2'Warehouse..............'
A***/D #HOUSE R B 10 26REFFLD(INWAREHOUS)
/D A***/Z01 #HOUSE R O 10 26REFFLD(INWAREHOUS)
/Z01 A #HOUSE R B 10 26REFFLD(INWAREHOUS)
A TEXT('Warehouse')
A***/D OVRDTA
/Z08 A 77
/Z08 AO 25 DSPATR(PR)
/Z06 A***/Z08 25 DSPATR(PR)
/Z06 A N25 DSPATR(UL)
/F A OVRDTA
A***/B 75 DSPATR(RI)
A***/B 75 DSPATR(PC)
/B A***/Z01 75
/B A***/Z01O 76 DSPATR(RI)
/Z01 A 76 DSPATR(RI)
/B A***/Z01 75
/B A***/Z01O 76 DSPATR(PC)
/Z01 A 76 DSPATR(PC)
A 75 ERRMSG('Invalid Warehouse' 75)
/B A 76 ERRMSG('In Order to be
Modified,
-
/B A Warehouse Must Be within the
Same -
/B A Warehouse Group' 76)
/Z08 A 77 ERRMSG('This order has been
process-
/Z08 A ed in WMS,it cannot be
changed.'
77)
A***/D DSPATR(UL)
A***/D 10 45'All Items:'
/Z01 A***/Z06 DSPATR(UL)
/Z01 A 10 45'All Items:'
A #ALL 1A B 10 56TEXT('Change All Items')
A VALUES('Y' 'N')
/Z06 A 25 DSPATR(PR)
/Z06 A N25 DSPATR(UL)
A***/D DSPATR(UL)
/Z01 A***/Z06 DSPATR(UL)
/D A***/Z01 DSPATR(ND)
/D A***/Z01 DSPATR(PR)
A OVRDTA
A #WNAME R O 11 3REFFLD(INHOUSNAME)
A TEXT('Warehouse Name')
A OVRDTA
/AB A***/C02 10 45'Weight..............'
/C02 A 11 45'Weight..............'
/AB A***/C02 #WGHT R B 10 66REFFLD(INTWEIGHT)
/C02 A #WGHT R B 11 66REFFLD(INTWEIGHT)
/AB A EDTCDE(L)
/AB A OVRDTA
/AB A***/C02 11 45'Number of Pallets...'
/C02 A 12 45'Number of Pallets...'
/AB A***/C02 #PLT R B 11 66REFFLD(@NUM3)
/C02 A #PLT R B 12 66REFFLD(@NUM3)
/AB A EDTCDE(L)
/AB A OVRDTA
/AC A 12 71'P/W'
/AC A #WOOD R B 12 75REFFLD(@NUM3)
/AC A EDTCDE(L)
/AC A OVRDTA
A***/C 12 2'Load Number............'
/C A 12 2'Load ID................'
A #C1UF4 15A O 12 26TEXT('Load Group')
A OVRDTA
A***/E 12 45'Sequence............'
/E A***/Z05 N15 12 45'Sequence............'
/Z05 A N15
/Z05 AAN16 12 45'Sequence............'
/E A***/C02 15 12 45'Drop Sequence.......'
/Z05 A***/C02 16 12 45'Load Sequence.......'
/C02 A***/A01 15 13 45'Drop Sequence.......'
/A01 A 13 45'# of pallet places..'
/A01 A #PLTPC 2Y 0B 13 66
/A01 A EDTCDE(L)
/A01 A***/A01 OVRDTA
/A01 A 15 14 45'Drop Sequence.......'
/C02 A***/A01 16 13 45'Load Sequence.......'
/A01 A 16 14 45'Load Sequence.......'
/B A***/E 15 #STSEQ 2Y 0B 12 66OVRDTA
/E A***/Z05 15 #STSEQ 3Y 0B 12 66OVRDTA
Program code
The lines added by me are under mod /A01, i have just moved a field from
the
database to the display file.
Mainline of the code..
* INITIALIZE PROGRAM
C EXSR $INIP
*
*------------------------------------------------------------------------
* HEADER SCREEN
*------------------------------------------------------------------------
* INITIALIZE FIRST SCREEN
C Z-ADD ORDR #IDNO
C EXSR $LOAD1
C MOVE '1' SCREEN 1
/Z06 C EXSR $EDIT1
/Z06 C***/Z11 WRITEOBC35101 NECESSARY FOR
MSGS
*
* LOOP TO DISPLAY HEADER SCREEN
C SCREEN DOWEQ '1'
/Z02 C @@MODE IFEQ 'I'
/Z02 C SETON 25
/Z02 C ELSE
/Z02 C SETOFF 25
/Z02 C ENDIF
C EXFMT OBC35101
C *INKB IFEQ '1'
C MOVE '0' SCREEN
C ELSE
C EXSR $EDIT1
C ERROR1 IFNE '1'
C EXSR $DTAIL
C END
C END
C END
C***/D MOVE '1' *INLR
* CLOSE FILES
C***/D MOVE '1' @INLR
C***/D EXSR $ORDTX
C RETURN
*------------------------------------------------------------------------
* $LOAD1 - LOAD SCREEN 1
*------------------------------------------------------------------------
C $LOAD1 BEGSR
C Z-ADD ORDR ORDNO
C Z-ADD ORDR #IDNO
C***/E KYCO1 CHAINOBCOP100 99
/E C KYCO1 CHAIN(N) OBCOP100 99
C *IN99 CABEQ '1' NOTF
C MOVEL CUSPO #CUSPO
C MOVE CUSNO #CUSNO
C MOVE SHPNO #SHPNO
C***/I MOVE 'Y' #ALL
/I C MOVE 'N' #ALL
C*
C* GET ORDER TYPE INFORMATION
/Z02 C*
/Z02 C* If in Inquiry mode do not lock records.
/Z02 C*
/Z02 C @@MODE IFEQ 'I'
/Z02 C C1OTP CHAIN(N) OOT100 90
/Z02 C ELSE
C C1OTP CHAIN OOT100 90
/Z02 C ENDIF
/Z02 C*
C*
* SCHEDULED DELIVERY DATE
C C1UF1 IFNE *BLANKS
C MOVEL C1UF1 #ARRD
C ELSE
/21C C Z-ADD OHRYMD $$$NUM
/21C C EXSR $$$21C
/21C C Z-ADD $$$NUM OHRYMD
C Z-ADD OHRYMD @@@YMD
C EXSR $@FORM
C Z-ADD @@DATE #ARRD
C END
* REQUESTED DELIVERY DATE
/21C C Z-ADD OHRYMD $$$NUM
/21C C EXSR $$$21C
/21C C Z-ADD $$$NUM OHRYMD
C Z-ADD OHRYMD @@@YMD
C EXSR $@FORM
C Z-ADD @@DATE #RQEFD
* SCHEDULED SHIP DATE
/21C C Z-ADD OSCYMD $$$NUM
/21C C EXSR $$$21C
/21C C Z-ADD $$$NUM OSCYMD
C Z-ADD OSCYMD @@@YMD
C EXSR $@FORM
C Z-ADD @@DATE #SCEXD
* ORDER DATE
/21C C Z-ADD COOYMD $$$NUM
/21C C EXSR $$$21C
/21C C Z-ADD $$$NUM COOYMD
C Z-ADD COOYMD @@@YMD
C EXSR $@FORM
C Z-ADD @@DATE #ORDAT
*
C MOVE *BLANKS STNAM
C MOVE CUSPO #CUSPO
C MOVE SHPPO #SHPPO
C MOVEL C1UF4 #C1UF4
C MOVEL OREGN #RSALN
C MOVE OSALN #RSALN
C MOVE HOUSE #HOUSE
C MOVE C1UF3 #APPT
/Z12 C MOVE #HOUSE W@WHSE 2
/C *
C***/Z04 @MFC05 IFEQ 'Y'
/Z04 C @MFC05 IFEQ 'L'
/Z04 C @MFC05 OREQ 'D'
/C C* CONVERT CHARACTER TO STRING IF VALID
/C C MOVE *ZEROS #STSEQ
/C C***/K MOVE *BLANKS #C1UF7
/C C MOVEL C1UF6 TSEQ
/C *
/C C***/K NUM IFGE '0'
/K C NUM IFGE '000'
/K C NUM ANDLE '999'
/C C***/K NUM ANDLE'99'
/C C MOVEL NUM #STSEQ
/C C***/K MOVELALP #C1UF7
/C C***/K ELSE
/C C***/K MOVELC1UF6 #C1UF7
/C C END
/C *
/C C ELSE
C MOVE C1UF6 #SEQ
/C C END
/C *
/AB * The load weight and number of pallets are stored in file
/AB * OBLCB20R, so the user can update the values.
/AB *
/AB C MOVE 'O' KOTP
/AB C MOVE #IDNO KORD#
/AB C KYLC2R CHAIN OBLCA20R 92
/AB C *IN92 IFEQ *OFF
*IN92
/AB C MOVE LCPLT #PLT
/AB C MOVE LCWGT #WGHT
/AC C MOVE LCWOOD #WOOD
/A01 C MOVE LCPLTP #PLTPC
/AB C ELSE
*IN92
/AB C MOVE *ZERO #PLT
/AB C MOVE *ZERO #WGHT
/AC C MOVE *ZERO #WOOD
/A01 C MOVE *ZERO #PLTPC
/AB C ENDIF
*IN92
/AB *
C MOVEL TRUCK #TRUCK
C MOVEL C1VOL #TLLTL
C MOVEL OSNAM #OSNAM
C MOVEL OSAD1 #OSAD1
C MOVEL RELS# #RELS#
C MOVEL OSAD2 #OSAD2
C MOVEL C1UF5 #C1UF5
C MOVEL OSADX #OSADX
C MOVEL OSAD3 #OSAD3
C MOVEL OSSTA #OSSTA
C MOVEL OSZIP #OSZIP
/Z11 C WRITE OBC35101
/Z02 C*
/Z02 C* If in Inquiry mode do not lock records.
/Z02 C*
/Z02 C @@MODE IFEQ 'I'
/Z02 C KYSM01 CHAIN(N) SASML100 99
/Z02 C ELSE
C KYSM01 CHAIN SASML100 99
/Z02 C ENDIF
/Z02 C*
C N99 MOVEL SMNAM #SMNAM
C 99 MOVE *BLANKS #SMNAM
/Z02 C*
/Z02 C* If in Inquiry mode do not lock records.
/Z02 C*
/Z02 C @@MODE IFEQ 'I'
/Z02 C***/PLE98 HOUSE CHAIN(N) MSWMP100 99
PLE98C EVAL APOPCD='CHAIN(N)'
PLE98C EVAL APKEY#= 1
PLE98C EVAL W@HOUSE01=HOUSE
PLE98C EXSR $MWM100
PLE98C EVAL *IN99=APRDHI
/Z02 C ELSE
C***/PLE98 HOUSE CHAIN MSWMP100
99
PLE98C EVAL APOPCD='CHAIN'
PLE98C EVAL APKEY#= 1
PLE98C EVAL W@HOUSE01=HOUSE
PLE98C EXSR $MWM100
PLE98C EVAL *IN99=APRDHI
/Z02 C ENDIF
/Z02 C*
C N99 MOVEL WNAME #WNAME
C 99 MOVE *BLANKS #WNAME
C MOVEA '00000000' *IN(60)
C MOVEA '0000' *IN(68)
/C C MOVE '0' *IN97
C NOTF ENDSR
From: "Sharon Wintermute" <SWintermute@xxxxxxxxxxxx>
Reply-To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Subject: RE: Wrong data being displayed.
Date: Tue, 3 Apr 2007 16:38:43 -0500
You are using RSTDSP(*YES)?
With out it, the OVRDTA would not take affect the 2nd time you enter
program2.
Sharon
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Alan Shore
Sent: Tuesday, April 03, 2007 3:38 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Wrong data being displayed.
Derek - it would help if you post some code. Any answer would be something
of a guess.
Alan Shore
NBTY, Inc
(631) 244-2000 ext. 5019
AShore@xxxxxxxx
"If you're going through Hell, keep going" - Winston Churchill
rpg400-l-bounces@xxxxxxxxxxxx wrote on 04/03/2007 04:08:39 PM:
Hi,
I am facing a problem in a program.
There is a subfile with a set of order numbers,
When i select a particular order number, it goes to a different program
,
and shows some details for that order. The screen in this program is a
normal display screen(not a subfile). A few calculations are done and
the
record format is written to the screen(not EXFMT). Then a few more
calculations are done and the same record format is EXFMT on the
screen.
Now
i have added a new field on this screen.
When I select a particular record on the subfile screen(program1), and
move
to the second screen, i change the value of this new field and update
it
by
pressing <F5>.
Now the program returns back to the first screen after pressing <F5>.
when i
select a different order number, the value of the field still remains
the
same(the value changed for the previous order number is reflected for
all
the order numbers on the screen but not in the databse), but during
debug,
before the screen is EXFMT, the value is the actual value moved from
the
database file, but displayed value is the value entered the first time.
I guess this has got something to do with the PUTOVR or OVRDTA
keyword(OVRDTA keyword has been used for this field).
Any suggestions would really be of great help.
Thanks in advance
Derek
_________________________________________________________________
Can’t afford to quit your job? – Earn your AS, BS, or MS degree
online in
1
year.
http://www.classesusa.com/clickcount.cfm?id=866145&goto=http%3A%2F%
2Fwww.classesusa.com%2Ffeaturedschools%2Fonlinedegreesmp%2Fform-
dyn1.html%3Fsplovr%3D866143
--
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.
--
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.
--
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.