ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Old program with RGZPFM and MONMSG CPF000 started pushing out CPF2891 errors again

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

  • Old program with RGZPFM and MONMSG CPF000 started pushing out CPF2891 errors again

    Weird program.

    A program in 2012 has this snippet of code...
    Code:
    rgzpfm file(somefile)
    monmsg cpf0000
    Now this program is untouched, working for years without sending a CPF2891 message. Just 2-3 months ago, it started sending this message again to the msgq. This is super bizarre. Did IBM change or update anything that would cause CPF2891 to go past the MONMSG CPF0000?

    I confirmed that no change was done to this program since 2012, it's still the same object.

    I'm about to test this in PUB400 as well. I'm thinking it now needs a CPF0000 CPF9999 MONMSG command.

  • #2
    So both MONMSG CPF0000 and MONMSG CPF9999 properly blocked this escape message, it didn't turn into a MSGW in the jobqueue. I wonder what's triggering it to go to MSGW?

    Comment


    • #3
      It would have been of great help if you had shown us the message with the cause.

      Have you changed the somefile ?

      I wonder why you are receiving CPF2891 that is referring to a parameter TOKEY
      but in RGZPFM there isn't such a parameter.




      Display Formatted Message Text
      Message ID . . . . . . . . . : CPF2891
      Message file . . . . . . . . : QCPFMSG
      Library . . . . . . . . . : QSYS

      Meddelelse . . : TOKEY field value not valid for key field.
      Årsag . . . . . : The TOKEY field value number &5 is not valid for field &4
      in record format &3 in file &1 in library &2. If field &4 is a character
      field or a DBCS (Double Byte Character Set) field, the TOKEY field value is
      longer than the defined field length &6, or the value is the empty string
      and the field is not variable length. If field &4 is a fixed length binary
      character, the TOKEY field value is not equal to the field length. If field
      &4 is a date, time, or timestamp field, the TOKEY field value could not be
      converted to the date, time, or timestamp field format and separator, or the
      value is the empty string.
      Handling . . . : Do one of the following and try the request again:
      -- Specify a shorter value on the TOKEY parameter.
      -- Specify a string of at least one character on the TOKEY parameter if
      the field is not a variable length field.
      -- For DBCS-graphic key fields, specify a shift-out ('0E'x) character
      before and a shift-in ('0F'x) character after the DBCS data. The shift-out
      and shift-in characters are removed before building the key.
      -- For binary character field specify the TOKEY parameter value length
      equal to the field length.
      -- For date key fields, specify the TOKEY parameter value in the same date
      format and separator as defined by the job (use DSPJOB command to
      determine), or in one of the SAA formats, or in the YYYYDDD form (no
      separator).
      -- For time key fields, specify the TOKEY parameter value in the same time
      format and separator as defined by the job (use DSPJOB command to
      determine), or in one of the SAA formats.
      -- For timestamp key fields, specify the TOKEY parameter value in the SAA
      timestamp format, or YYYYMMDDHHMMSS form (no separators).
      Last edited by Peder Udesen; July 18, 2022, 10:47 AM.

      Comment


      • #4
        Originally posted by Peder Udesen View Post
        It would have been of great help if you had shown us the message with the cause.

        Have you changed the somefile ?

        I wonder why you are receiving CPF2891 that is referring to a parameter TOKEY
        but in RGZPFM there isn't such a parameter.




        Display Formatted Message Text
        Message ID . . . . . . . . . : CPF2891
        Message file . . . . . . . . : QCPFMSG
        Library . . . . . . . . . : QSYS

        Meddelelse . . : TOKEY field value not valid for key field.
        Årsag . . . . . : The TOKEY field value number &5 is not valid for field &4
        in record format &3 in file &1 in library &2. If field &4 is a character
        field or a DBCS (Double Byte Character Set) field, the TOKEY field value is
        longer than the defined field length &6, or the value is the empty string
        and the field is not variable length. If field &4 is a fixed length binary
        character, the TOKEY field value is not equal to the field length. If field
        &4 is a date, time, or timestamp field, the TOKEY field value could not be
        converted to the date, time, or timestamp field format and separator, or the
        value is the empty string.
        Handling . . . : Do one of the following and try the request again:
        -- Specify a shorter value on the TOKEY parameter.
        -- Specify a string of at least one character on the TOKEY parameter if
        the field is not a variable length field.
        -- For DBCS-graphic key fields, specify a shift-out ('0E'x) character
        before and a shift-in ('0F'x) character after the DBCS data. The shift-out
        and shift-in characters are removed before building the key.
        -- For binary character field specify the TOKEY parameter value length
        equal to the field length.
        -- For date key fields, specify the TOKEY parameter value in the same date
        format and separator as defined by the job (use DSPJOB command to
        determine), or in one of the SAA formats, or in the YYYYDDD form (no
        separator).
        -- For time key fields, specify the TOKEY parameter value in the same time
        format and separator as defined by the job (use DSPJOB command to
        determine), or in one of the SAA formats.
        -- For timestamp key fields, specify the TOKEY parameter value in the SAA
        timestamp format, or YYYYMMDDHHMMSS form (no separators).
        Sorry! it says CPF2981 Member &3 file &1 in &2 not reorganized. The actual message is even more detailed. but that's the error. It's trying to reorg an empty file.

        Comment


        • #5
          RGZPFM has always returned an error if the file is empty.
          A behaviour I find stupid IMHO.

          Comment


          • #6
            Sorry for updating this thread late. We've figured it out. The source I'm looking at was the updated source. It wasn't pushed to this specific site hence causing the error.

            Comment

            Working...
            X