Sponsored Links
Sponsored Link

sponsored links

Collapse

Announcement

Collapse
No announcement yet.

CPA4072 Max Records reached

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

  • CPA4072 Max Records reached

    What is the technique for giving an auto reply to an inquiry message. I have a job that creates a report where the spool file exceeds the max records when the user fails to specify a limit on items/transactions to be reported. I can't seem to track down how to do that. Is it possible to change the message ID to auto reply or changing the QSYSOPR message queue. Giving the spool file NOMAX is not what I am looking for. I need to auto reply "C" to cancel processing.

  • #2
    Put an entry into the system reply list [ADDRPYLE SEQNBR(xxx) MSGID(CPFxxxx) RPY('C')] and then point the job to look at the system reply list first [CHGJOB INQMSGRPY(*SYSPRYL)].

    Comment


    • #3
      An alternative option would be to simply increase the max records for the print file - CHGPRTF MAXRCDS(xxxxxx).

      Comment


      • #4
        The best way is to prevent the user making the selection in the first place.

        Nonetheless, remember that other jobs/printfiles could also be affected by this, including jobs that you do not want to be cancelled.

        So I would suggest:
        1. At the start of the program, add the auto-reply entry (ADDRPYLE).
          You could remove it at the end of the run or, even better and if possible, after catching the message with a MONMSG (I am not sure if MONMSG will activate if there is an auto-reply for it).
        2. You catch the message and reply to it one or x number of times (depending what is deemed acceptable) before issuing an alert.
        Regards

        Kit
        http://www.ecofitonline.com
        DeskfIT - ChangefIT - XrefIT
        ___________________________________
        There are only 3 kinds of people -
        Those that can count and those that can't.

        Comment


        • #5
          If it's a specific print file (not QSYSPRT for example) - you can do the following:

          WRKRPYLE - find a sequence # not used - for sake of example the next available sequence # is 100:

          ADDRPYLE SEQNBR(100) MSGID(CPA4072) CMPDTA('RPTSPLF' 1) RPY(C)

          If the message says 'Maximum number of records reached for file RPTSPLF. (C R NOMAX 1-99999) and if you have the job attribute set to INQMSGRPY set to *SYSRPYL - it will answer any CPA4072 message with file name RPTSPLF with a C - it will ignore any other CPA4072 messages (unless you have other reply list entries for it).

          Comment

          sponsored links

          Collapse

          Working...
          X