Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

MSGW in RPG I do not understand

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

  • MSGW in RPG I do not understand

    I encountered an error today where the below if statement caused the program to fail.

    When I serviced the job OIRLINECOUNT was 0 and SPLNE had a value of 6448. I do not understand why it would blow up....does anyone have any idea?


    D OIRLINECOUNT S 5S 0

    D SYSPRT ds
    D SYSPRT_BSNUM 123 124B 0
    D SPLNE 367 368B 0
    D SPPGE 369 372B 0

    IF ( OIRLINECOUNT + SPLNE ) > 62

  • #2
    Respond to this message with a "D" option. Also let us know exactly what the message is.
    Review the dump. It may give you more clues as to what is happening.

    Comment


    • #3
      Is SYSPRT the DS specified as the INFDS for the print file? It's easy to overlook the silly things sometimes. Is the print file USROPN? Maybe the DS needs INZ.

      Comment


      • #4
        Hi! I think the error you are most likely getting is 'Receiver value too small to hold result'. You have SPLNE described as binary, but when I look in the RPG reference manual's INFDS examples, it should be described as integer. When I describe the field as integer, I do not get an error. The value in the SPLNE when described as integer is 16448.

        Here's how the INFDS is described in the manual. The from/to values are the same, only the type is different.

        DPRTFBK DS
        D CUR_LINE 367 368I 0 * Current line num
        D CUR_PAGE 369 372I 0 * Current page cnt

        See if that helps.

        Comment

        Working...
        X