I created one display file for that
dds as follows:
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 a Journal receiver (SALARYRCV) and Journal (SALARYJRN), and also used the command
STRJRNPF FILE (KRGUNN/SALARY) JRN(KRGUNN/SALARYJRN) IMAGES(*BOTH) LOGLVL(*ALL)
I called my RPGLE program but keep getting a run time error. The 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).