PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04/07/2016 10:49 AM by  John Desmarais
Comment Attachment Processing compile error
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
John Desmarais
Private
Private
Basic Member
(27 points)
Basic Member
Posts:11


Send Message:

--
04/07/2016 10:10 AM

    I'm trying to do something that should be very simple - determine the existence of Comments on Invoice Messages, just like MA66 does when it needs to determine what text to put in the Message Button on the screen.  Simple, no?

    I looked through the API manual to see if there was any voodoo involved - looked pretty easy. copied the code right out of MA66PD and dropped it into my program.

                 INITIALIZE                 WS-CMTMAG.
                 MOVE SPACES             TO CMTMAG-TYPE.
                 SET CMTMAG-KFIND        TO TRUE.
                 PERFORM 900-FIND-BEGRNG-CMT-MAINVMSG.
                 IF (CMTMAG-KFOUND)
                     MOVE 908                TO CRT-MSG-NBR
                 END-IF.

    Failures all over the place:

     43198     INITIALIZE                 WS-CMTMAG.
    *  12-S****************************************                              **
    **    Operand WS-CMTMAG is not declared
     43199     MOVE SPACES             TO CMTMAG-TYPE.
    *  12-S******************************************                            **
    **    Operand CMTMAG-TYPE is not declared
     43200     SET CMTMAG-KFIND        TO TRUE.
    *  12-S********************                                                  **
    **    Operand CMTMAG-KFIND is not declared
     43202     IF (CMTMAG-KFOUND)
    *  12-S*********************                                                 **
    **    Operand CMTMAG-KFOUND is not declared

    On the surface, it looks like the library that contains these members is not getting linked in, but that should happen automatically based on the existence of PERFORM 900-FIND-BEGRNG-CMT-MAINVMSG in my PD - or have I completely misunderstood how this should work? (Or, is there something else that my program needs to contain to cause the library to be automatically linked?)

    John Henley
    Private
    Private
    Senior Member
    (9563 points)
    Senior Member
    Posts:3205


    Send Message:

    --
    04/07/2016 10:30 AM
    Make sure you have a reference to MAINVMSG in order to pull in that DB table's API.

    MOVE ZEROES TO DB-COMPANY.
    MOVE SPACES TO DB-VENDOR.
    MOVE SPACES TO DB-INVOICE.
    MOVE SPACES TO DB-INVOICE.
    MOVE ZEROES TO DB-SUFFIX.
    MOVE ZEROES TO DB-CANCEL-SEQ.
    MOVE ZEROES TO DB-MAD-SEQ-NBR.
    MOVE ZEROES TO DB-SEQ-NBR.
    PERFORM 840-FIND-MAGSET1.
    Thanks for using the LawsonGuru.com forums!
    John
    John Desmarais
    Private
    Private
    Basic Member
    (27 points)
    Basic Member
    Posts:11


    Send Message:

    --
    04/07/2016 10:49 AM

    Doh!

     

     

     

    Yep.  That fixed it.

    You are not authorized to post a reply.