title: OpenCOBOL can't find my external module to run the program
body: <p>I'm trying to create a COBOL program using OpenCobol that has an external module when it does a calculation and then brings the result back into the main program using CALL. But everytime I try to run the program it says it can't find the module. I have already changed my module to Program Type &quot;Module&quot; from executable and I have added the module path as a Library path but nothing is working so far</p>
  <p>Here is my main program code:</p>
  <pre><code>   PROGRAM-ID. Project2 AS &quot;Project2&quot;.
  
     ENVIRONMENT DIVISION.
     INPUT-OUTPUT SECTION.
     FILE-CONTROL.
    *****The student input file
         SELECT STUDENT-FILE-IN
             ASSIGN TO &quot;C:\STUFILE.TXT&quot;
             ORGANIZATION IS LINE SEQUENTIAL.
  
    *****The program input file
         SELECT PROGRAM-FILE-IN
             ASSIGN TO &quot;C:\PROGRAM.TXT&quot;
             ORGANIZATION IS LINE SEQUENTIAL.
  
    *****The student report output file
         SELECT STUDENT-REPORT-FILE-OUT
             ASSIGN TO &quot;C:\REPORT.TXT&quot;
             ORGANIZATION IS LINE SEQUENTIAL.
  
     DATA DIVISION.
     FILE SECTION.
    *Student input file
     FD STUDENT-FILE-IN.
     01 STUDENT-RECORD.
         05 STUDENT-NUMBER   PIC 9(6).
         05 TUITION-OWED-IN  PIC 9(4)V99.
         05 STUDENT-NAME-IN  PIC X(40).
         05 PROGRAM-OF-STUDY PIC X(5).
         05 COURSE-CODE-1    PIC X(7).
         05 COURSE-AVERAGE-1 PIC 9(3).
         05 COURSE-CODE-2    PIC X(7).
         05 COURSE-AVERAGE-2 PIC 9(3).
         05 COURSE-CODE-3    PIC X(7).
         05 COURSE-AVERAGE-3 PIC 9(3).
         05 COURSE-CODE-4    PIC X(7).
         05 COURSE-AVERAGE-4 PIC 9(3).
         05 COURSE-CODE-5    PIC X(7).
         05 COURSE-AVERAGE-5 PIC 9(3).
  
    *Program input file
     FD PROGRAM-FILE-IN.
     01 PROGRAM-RECORD-IN.
         05 PROGRAM-CODE-IN PIC X(5).
         05 PROGRAM-NAME-IN PIC X(20).
  
    *Student report output file
     FD STUDENT-REPORT-FILE-OUT.
     01 STUDENT-REPORT-RECORD-OUT PIC x(90).
  
  
  
     WORKING-STORAGE SECTION.
    *Table to hold program records
     01 PROGRAM-RECORD.
         05 PROGRAM-TABLE.
             10 PROGRAM-CODE PIC X(5)  OCCURS 20 TIMES.
             10 PROGRAM-NAME PIC X(20) OCCURS 20 TIMES.
  
    *The student report record
     01 STUDENT-REPORT-RECORD.
         05 STUDENT-NAME     PIC X(40).
         05 FILLER           PIC X(2) VALUE SPACES.
         05 PROGRAM-NAME-OUT PIC X(20).
         05 FILLER           PIC X(4) VALUE SPACES.
         05 TUITION-OWED     PIC Z,ZZ9.99.
  
    *A line to make the output look good
     01 HEADER-LINE.
         05 FILLER PIC X(90) VALUE ALL &quot;-&quot;.
  
    *The column header
     01 COLUMN-HEADER.
         05 NAME-COLUMN PIC X(42) VALUE &quot;NAME&quot;.
         05 AVG-COLUMN  PIC X(7)  VALUE &quot;AVE&quot;.
         05 PROG-COLUMN PIC X(24) VALUE &quot;PROGRAM NAME&quot;.
         05 OWED-COLUMN PIC X(12) VALUE &quot;TUITION OWED&quot;.
  
     01 CONTROL-FIELDS.
         05 STUFILE-EOF-FLAG  PIC A(3).
         05 PROG-EOF-FLAG     PIC A(3).
         05 PROG-SUB          PIC 9(2).
         05 FOUND-PROG-FLAG   PIC A(3).
  
     01 COUNTERS.
         05 STUDENT-RECORDS-READ-CTR    PIC 9(3).
         05 STUDENT-REPORTS-WRITTEN-CTR PIC 9(3).
  
     01 WW-SEND-AREA.
         05 STUDENT-AVERAGE  PIC 9(3).
  
     01 WW-SUB-PROG PIC X(75)
         VALUE 'C:\Users\google\Program3Call'.
  
     PROCEDURE DIVISION.
     PERFORM 200-INITIALIZATION-RTN.
    *Read and process all student records
     PERFORM 200-PROCESS-STUDENT-RECORD-RTN
         UNTIL STUFILE-EOF-FLAG = &quot;YES&quot;.
     PERFORM 200-FINISH-RTN.
     STOP RUN.
  
     200-INITIALIZATION-RTN.
         PERFORM 300-OPEN-FILES-RTN.
    *****Load all program records into the table
         PERFORM 300-LOAD-PROGRAM-TABLE-RTN
             VARYING PROG-SUB FROM 1 BY 1
             UNTIL PROG-SUB &gt; 20 OR PROG-EOF-FLAG = &quot;YES&quot;.
         PERFORM 300-INITIALIZE-REPORT-FILE-RTN.
         PERFORM 300-INITIALIZE-COUNTERS-RTN.
  
     200-PROCESS-STUDENT-RECORD-RTN.
         PERFORM 300-READ-STUDENT-RECORD-RTN.
         IF STUFILE-EOF-FLAG NOT EQUALS &quot;YES&quot;
    *********Get the program name
             PERFORM 300-GET-PROGRAM-NAME-RTN
                 VARYING PROG-SUB FROM 1 BY 1 UNTIL
                 FOUND-PROG-FLAG = &quot;YES&quot; OR PROG-SUB &gt; 20
             PERFORM 300-GET-STUDENT-AVERAGE
             PERFORM 300-PRINT-STUDENT-REPORT-RTN
         END-IF.
  
     200-FINISH-RTN.
         PERFORM 300-PRINT-COUNTERS-RTN.
         PERFORM 300-CLOSE-FILES-RTN.
  
     300-OPEN-FILES-RTN.
         OPEN INPUT STUDENT-FILE-IN.
         OPEN INPUT PROGRAM-FILE-IN.
         OPEN OUTPUT STUDENT-REPORT-FILE-OUT.
  
     300-LOAD-PROGRAM-TABLE-RTN.
         READ PROGRAM-FILE-IN
         AT END MOVE &quot;YES&quot; TO PROG-EOF-FLAG
         NOT AT END MOVE PROGRAM-CODE-IN TO PROGRAM-CODE (PROG-SUB)
                    MOVE PROGRAM-NAME-IN TO PROGRAM-NAME (PROG-SUB).
  
     300-INITIALIZE-REPORT-FILE-RTN.
         MOVE COLUMN-HEADER TO STUDENT-REPORT-RECORD-OUT.
         WRITE STUDENT-REPORT-RECORD-OUT.
         MOVE HEADER-LINE TO STUDENT-REPORT-RECORD-OUT.
         WRITE STUDENT-REPORT-RECORD-OUT.
  
     300-INITIALIZE-COUNTERS-RTN.
         MOVE 0 TO STUDENT-RECORDS-READ-CTR.
         MOVE 0 TO STUDENT-REPORTS-WRITTEN-CTR.
  
     300-READ-STUDENT-RECORD-RTN.
         READ STUDENT-FILE-IN
             AT END MOVE &quot;YES&quot; TO STUFILE-EOF-FLAG
             NOT AT END ADD 1 TO STUDENT-RECORDS-READ-CTR.
  
     300-GET-PROGRAM-NAME-RTN.
         IF PROGRAM-CODE (PROG-SUB) = PROGRAM-OF-STUDY
             MOVE PROGRAM-NAME (PROG-SUB) TO PROGRAM-NAME-OUT
             MOVE &quot;YES&quot; TO FOUND-PROG-FLAG
         END-IF.
  
     300-GET-STUDENT-AVERAGE.
          CALL WW-SUB-PROG USING WW-SEND-AREA.
  
     300-PRINT-STUDENT-REPORT-RTN.
         MOVE &quot;NO&quot; TO FOUND-PROG-FLAG.
         MOVE STUDENT-NAME-IN TO STUDENT-NAME.
         MOVE TUITION-OWED-IN TO TUITION-OWED.
         MOVE STUDENT-REPORT-RECORD TO STUDENT-REPORT-RECORD-OUT.
         WRITE STUDENT-REPORT-RECORD-OUT.
         ADD 1 TO STUDENT-REPORTS-WRITTEN-CTR.
  
     300-PRINT-COUNTERS-RTN.
         DISPLAY &quot;Student records read: &quot;, STUDENT-RECORDS-READ-CTR.
         DISPLAY &quot;Student reports written: &quot;,
             STUDENT-REPORTS-WRITTEN-CTR.
  
     300-CLOSE-FILES-RTN.
         CLOSE STUDENT-FILE-IN, PROGRAM-FILE-IN
             STUDENT-REPORT-FILE-OUT.
  
  
     END PROGRAM Project2.
  </code></pre>
  <p>Here is my Call Program:</p>
  <pre><code>  ******************************************************************
    * Author: Desiree Hanuman
    * Date: August 14th 2021
    * Purpose:Call Section code for project 3
    * Tectonics: cobc
    ******************************************************************
     IDENTIFICATION DIVISION.
     PROGRAM-ID. Program3Call.
     DATA DIVISION.
     LINKAGE SECTION.
     01 LS-STUDENT-AVERAGE-AREA.
         05 COURSE-AVERAGE-1 PIC 9(3).
         05 COURSE-AVERAGE-2 PIC 9(3).
         05 COURSE-AVERAGE-3 PIC 9(3).
         05 COURSE-AVERAGE-4 PIC 9(3).
         05 COURSE-AVERAGE-5 PIC 9(3).
         05 STUDENT-AVERAGE  PIC 9(3).
  
     PROCEDURE DIVISION.
     MAIN-PROCEDURE.
         100-STUDENT-AVERAGE.
               PERFORM 300-CALCULATE-AVERAGE-RTN.
  
  
         300-CALCULATE-AVERAGE-RTN.
         COMPUTE STUDENT-AVERAGE ROUNDED = (COURSE-AVERAGE-1 +
             COURSE-AVERAGE-2 + COURSE-AVERAGE-3 + COURSE-AVERAGE-4 +
             COURSE-AVERAGE-5) / 5.
     GOBACK.
  </code></pre>