+ Reply to Thread
Results 1 to 4 of 4

Thread: MSGW in RPG I do not understand

  1. #1

    Default 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. #2

    Default

    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.

  3. #3

    Default

    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.

  4. #4
    Join Date
    Jul 2011
    Location
    Decatur, IL
    Posts
    9

    Default

    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.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts