Catching a particular error code in RPG3

2630 pts.
Tags:
RPG ILE
Hi all
How can I monitor a particular error code in RPG3 like we do in RPG ILE. For example I am getting CPFXXXX code and I want it to monitor how I should do that.
Thanks

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: 5  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
  • ToddN2000
    What error message do you want to monitor for? Most errors are monitored from the CLP. something like this
    ADDPFM     FILE(*LIBL/mydata) MBR(mydata)
    MONMSG     MSGID(CPF7306) EXEC(DO) 
    CLRPFM     FILE(mydata)    
    ENDDO 

    15,605 pointsBadges:
    report
  • philpl1jb
    Could you describe in broader terms what you are trying to do, please.
    51,355 pointsBadges:
    report
  • hunshabbir7
    Thanks for reply

    Actually I am getting error CPF1606. In RPG ILE I can have monitor block in which I can handle that error in on-error block. I want the same behavior in RPG3
    2,630 pointsBadges:
    report
  • ToddN2000
    Is there a reason you are doing this in RPG3. The error is for "Error during allocation of subsystem &1." Why not put the job controls into the CL ? Are you allocating the subsystem in  the RPG3 program ??
    15,605 pointsBadges:
    report
  • Splat
    If you're going to execute commands in RPG & expect to be able to determine error codes and/or error handling you need to use QCAPCMD rather than QCMDEXC.
    7,665 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