How to resolve error message CPF4326 in RPGLE

230 pts.
Tags:
AS/400
AS/400 commands
AS400 RPGLE
I created a file (salary dds) as follows: 

A R RSALARY A NAME 10 A SURNAME 10 A SAL 10 0 

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) and STRCMTCTL LCKLVL(*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). 

Can you please help me to resolve this error?


Software/Hardware used:
i-series

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    created rpgle program   How?   What were the command parameters that you used? (And have any command parameter defaults been changed on your system?)   Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    File must be journalled and the job must issue the STRCMTCTL command prior to oppening the files to start commitment control
    49,730 pointsBadges:
    report
  • TomLiotta
    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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following