ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Cobol ILE program with RPG Procedure Call

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

  • Cobol ILE program with RPG Procedure Call

    I need help here in finding out the compilation error.
    I have added procedure name in the linkage secion like below

    PROCESS NOMONOPRC.

    ENVIRONMENT DIVISION.
    CONFIGURATION SECTION.
    SPECIAL-NAMES.
    LINKAGE TYPE IS PROCEDURE FOR "SgnMax".

    DATA DIVISION.
    WORKING-STORAGE SECTION.
    01 Numeric-Value-1 PIC S9(9).
    01 Numeric-Value-2 PIC S9(9).
    01 Answer PIC S9(9).

    PROCEDURE DIVISION.
    MAIN-LINE.
    CALL "SgnMax" USING BY CONTENT Numeric-Value-1,
    BY CONTENT Numeric-Value-2,
    GIVING Answer.


    The problem is compilation log does not give any 10+ level errors but in the end it gives error -

    LNC9001 40 Compile failed. PGMABC not created.


    . Can someone please advise on potential issues with this?

  • #2
    Re: Cobol ILE program with RPG Procedure Call

    Does it make any difference if you put SGNMAX in all uppercase instead of mixed case?

    Comment


    • #3
      Re: Cobol ILE program with RPG Procedure Call

      The code looks okay for as much as you showed. You might have left out parts that had a problem. If 'SgnMax' is the problem here and there are no compiler errors, you need to look at the joblog. There will probably be an error message saying that 'SgnMax' can't be found.
      Tom

      There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

      Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

      Comment


      • #4
        Re: Cobol ILE program with RPG Procedure Call

        I also hope that you are binding the module/service program which has the Sngmax procedure when creating the program.

        Comment


        • #5
          Re: Cobol ILE program with RPG Procedure Call

          As already noted the job log will identify problem. Either the service program or module is not being found or the named procedure is not being found.

          Assuming that it can't find SgnMax then we need to know how you did the compile.

          If via CRTMOD/CRTPGM then did you specify the correct service program or module name?

          If via CRTBNDCBL then did you include a reference to the correct binding directory?

          If all else is correct then we need to know the message details from the log. Much easier to find if you run the compile interactively.

          Comment


          • #6
            Re: Cobol ILE program with RPG Procedure Call

            Just to followup Ted's question, the RPG procedure might actually be named SGNMAX, depending on how it was coded. Display the RPG module to see exactly what the name is.

            DSPMOD DETAIL(*EXPORT).

            Comment

            Working...
            X