KEY2 KLIST
KFLD TCVDEV
KFLD TCCURC
OPEN ADCMTC0P
EVAL TCVDEV = VDEV$
EVAL TCCURC = CURC
KEY2 CHAIN(E) RDCMTC
IF %found(ADCMTC0P)
Starting Cash
EVAL TCSTCA = #CA$H
EVAL NTA1B$ = TCSTCA
EVAL NTA1CC = '360'
Cash Out
EVAL TCCAIN = 0
EVAL TCCAOU = 0
update RDCMTC
ELSE
Starting Cash
EVAL TCSTCA = #CA$H
EVAL NTA1B$ = TCSTCA
EVAL NTA1CC = '360'
EVAL TCCAIN = 0
EVAL TCCAOU = 0
write(e) RDCMTC
ENDIF
I get a case where the current value update file sometimes it does not contain values that should, for example field value NTA1B $ = 500, but when these programs are on the run, the field value TCSTCA = 0, while its own corresponding key field of its value.
whether there is something wrong with my logic method? please help.
I describe the files that will be updated field value TCSTCA her.
Field Definitions for File: XXXXXXXXXX/AXXXXXXC0P/RDCMTC
Key Fields: 2
K# Field From To Length Typ Description
1A TCVDEV 1 10 10 A Virtual device name
2A TCCURC 11 13 3 A Currency Code
TCSTCA 14 21 15 0 P Starting Cash
TCCAIN 22 29 15 0 P Cash In
TCCAOU 30 37 15 0 P Cash Out
Thanks,
faisalfn
KFLD TCVDEV
KFLD TCCURC
OPEN ADCMTC0P
EVAL TCVDEV = VDEV$
EVAL TCCURC = CURC
KEY2 CHAIN(E) RDCMTC
IF %found(ADCMTC0P)
Starting Cash
EVAL TCSTCA = #CA$H
EVAL NTA1B$ = TCSTCA
EVAL NTA1CC = '360'
Cash Out
EVAL TCCAIN = 0
EVAL TCCAOU = 0
update RDCMTC
ELSE
Starting Cash
EVAL TCSTCA = #CA$H
EVAL NTA1B$ = TCSTCA
EVAL NTA1CC = '360'
EVAL TCCAIN = 0
EVAL TCCAOU = 0
write(e) RDCMTC
ENDIF
I get a case where the current value update file sometimes it does not contain values that should, for example field value NTA1B $ = 500, but when these programs are on the run, the field value TCSTCA = 0, while its own corresponding key field of its value.
whether there is something wrong with my logic method? please help.
I describe the files that will be updated field value TCSTCA her.
Field Definitions for File: XXXXXXXXXX/AXXXXXXC0P/RDCMTC
Key Fields: 2
K# Field From To Length Typ Description
1A TCVDEV 1 10 10 A Virtual device name
2A TCCURC 11 13 3 A Currency Code
TCSTCA 14 21 15 0 P Starting Cash
TCCAIN 22 29 15 0 P Cash In
TCCAOU 30 37 15 0 P Cash Out
Thanks,
faisalfn
Comment