ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

API QUSRSPLA with CPF3C40 error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • API QUSRSPLA with CPF3C40 error

    Hello,
    I'm using the program DLTOLDSPLF (RPG version) from IBM to delete spool files with more then x days.
    All was fine until today when i have a CPF3C40 error message and the DLTOLDSPLF program stop at statment 18000 (the CALL to the API QUSRSPLA). The message is OK since the spool file no longer exists (it was deleted after the API QUSLSPL is called).
    The question is, who to monitorize the CPF message and loop to the next spool?
    Thanks,
    Rui

  • #2
    Re: API QUSRSPLA with CPF3C40 error

    in RPG III there's not a really good way to handle errors, but you could add a PSSR subroutine to handle (inefficiently) the errors.
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: API QUSRSPLA with CPF3C40 error

      IIRC on tne call statement you can also specify a valid resulting indicator in positions 56 and 57 to be set on for an error returned from the called program and in positions 58 and 59 to be set on if the called program is an RPG/400 program that returns with the LR indicator on. If either indicators are on jump to the next entry.

      Edit : on the call statement /Edit
      Last edited by Mercury; November 17, 2009, 03:53 PM.
      Philippe

      Comment


      • #4
        Re: API QUSRSPLA with CPF3C40 error

        I assume you have the source for this then? Why not just convert it to RPGIV and wrap a monitor statement around the call?

        Comment

        Working...
        X