Hi all
Can anybody help me with program logic for adding the sum of a field from a PF file
I did use RCVF command to read the file , but i wan unable to read the next record and the pointer is moving to last record instead of last record
I used the Breaker "Goto" in the programming . But still it is moving to last record
A sanple
Can anybody help me with program logic for adding the sum of a field from a PF file
I did use RCVF command to read the file , but i wan unable to read the next record and the pointer is moving to last record instead of last record
I used the Breaker "Goto" in the programming . But still it is moving to last record
A sanple
Code:
0001.00 PGM 0002.00 DCL VAR(&TBAL) TYPE(*DEC) LEN(12 2) 0003.00 DCL VAR(&CBAL) TYPE(*CHAR) LEN(12) 0004.00 DCLF FILE(BANKAC) RCDFMT() 0005.00 READNEXT:RCVF 0006.00 MONMSG MSGID(CPF0864) EXEC(GOTO X) 0007.00 /* AR(&TBAL) VALUE( &BAL) */ 0008.00 /* MSGID(CPF0864) EXEC(GOTO END) * 0009.00 CHGVAR VAR(&TBAL) VALUE( &BAL) 0010.00 CHGVAR VAR(&TBAL) VALUE(&TBAL +&BAL) 0011.00 GOTO READNEXT 0012.00 X:CHGVAR VAR(&CBAL) VALUE(&TBAL) 0013.00 SNDPGMMSG MSG(&CBAL) 0014.00 ENDPGM
Comment