I tried commitment control for that I created file salary dds is as follow
A R RSALARY
A NAME 10
A SURNAME 10
A SAL 10 0
created one disply file for that
dds is as follow
A*%%TS SD 20121218 034714 KRGUNN REL-V6R1M0 5761-WDS
A*%%EC
A DSPSIZ(24 80 *DS3)
A R RSALDSPF
A*%%TS SD 20121218 034714 KRGUNN REL-V6R1M0 5761-WDS
A CF03(03 'exit')
A CF05(05 'update')
A 23 6'f3:exit'
A 10 7'enter amount'
A $MSG 30A O 21 23
A 23 23'f5=update'
A 6 23'bal :'
A 7 23'nam2'
A 7 28':'
A $NAME 10A B 7 34
A $SAL 10S 0B 10 27
A $BAL 10 0O 6 35
created rpgle program
fsalary uf e disk COMMIT
fsaldspf cf e workstn
d var1 s 10 0
d var2 s 10 0
c eval *inlr = *on
c read rsalary
c dow *in03=*off
c eval $bal = *zeros
c eval $bal = sal
c eval $bal = sal
c exfmt rsaldspf
c if *in03= *on
c leave
c endif
c if *in05 = *on and
c $sal *zeros
c* read salary
c eval var1 = sal - $sal
c eval sal = var1
c eval name = $name
c update rsalary
c if sal > 0
c COMMIT
c eval $bal = sal
c eval $msg = 'record updated'
c else
c ROLBK
c eval $msg = 'record NOT updated'
c endif
c
c
c endif
c
c enddo
c
I created Journel receiver SALARYRCV and Journal SALARYJRN
also use command
STRJRNPF FILE(KRGUNN/SALARY) JRN(KRGUNN/SALARYJRN) IMAGES(*BOTH) LOGLVL(*ALL)
and
STRCMTCTL LCKLVL(*ALL)
called my RPGLE program but getting run time error that
Error message CPF4326 appeared during OPEN for file SALARY (C S D F).
Additional Message Information
Message ID . . . . . . : RNQ1216 Severity . . . . . . . : 99
Message type . . . . . : Inquiry
Date sent . . . . . . : 12/19/12 Time sent . . . . . . : 00:06:31
Message . . . . : Error message CPF4326 appeared during OPEN for file SALARY
(C S D F).
Cause . . . . . : RPG procedure SALARYPGM in program KRGUNN/SALARYPGM
received the message CPF4326 while performing an implicit OPEN operation on
file SALARY. The actual file is SALARY.
Recovery . . . : Check the job log for a complete description of message
CPF4326, and contact the person responsible for program maintenance. If the
file has a device type of SPECIAL, there may be no message in the job log.
Possible choices for replying to message . . . . . . . . . . . . . . . :
D -- Obtain RPG formatted printout of system storage.
S -- Obtain printout of system storage.
F -- Obtain full formatted printout of system storage.
Also see the job log
4>> CALL KRGUNN/SALARYPGM
Commitment definition *N not valid for open of SALARY.
Error message CPF4326 appeared during OPEN for file SALARY.
Function check. RNX1216 unmonitored by SALARYPGM at statement 0001000001,
instruction X'0000'.
Error message CPF4326 appeared during OPEN for file SALARY (C S D F).
Error message CPF4326 appeared during OPEN for file SALARY (C S D F).
Can you please help me to resolve this error?
Software/Hardware used:
i-series
ASKED:
December 19, 2012 6:08 AM
UPDATED:
December 19, 2012 2:46 PM
created rpgle program
How?
What were the command parameters that you used? (And have any command parameter defaults been changed on your system?)
Tom
File must be journalled and the job must issue the STRCMTCTL command prior to oppening the files to start commitment control
The question says journal and receiver created, STRJRNPF for the file, STRCMTCTL in the job, and then calling the program and getting the error. Assuming those are true, a likely issue is the activation group of the program. But we need to know the program creation attributes. The other elements can all be done, and the error can still happen. — Tom