Input Statement causing -6609 Error

Steven Evans <[email protected]>
Newsgroups gmane.comp.lang.4gl.fourjs.user
Message-ID <[email protected]>
Okay, I'm at a complete loss.  I've been fighting this code for 2 days
and I'm about ready to throw this computer out the window (which isn't a
good thing because I work off a laptop...)

After ripping apart the code and compiling after every complete
statement is entered, I've managed to isolate the troublesome code down
to this:

FUNCTION inputCriteria()
    DEFINE cInputProgram LIKE crse_subj.course_cd,
           dInputEffDate LIKE crse_subj.effective_dt,
           iInputGroup LIKE crse_subj.group,
           cGroup CHAR(10),
           iCount SMALLINT

    INITIALIZE iInputGroup TO NULL
    DISPLAY " "

    INPUT cInputProgram,
          dInputEffDate,
          iInputGroup
    FROM FORMONLY.program,
         FORMONLY.effDate,
         FORMONLY.group
    END INPUT
    RETURN cInputProgram, dInputEffDate, iInputGroup
END FUNCTION
-----------------------------------------------------------------------------------------
If I try to compile the entire program, I get

FUNCTION inputCriteria()
    DEFINE cInputProgram LIKE crse_subj.course_cd,
           dInputEffDate LIKE crse_subj.effective_dt,
           iInputGroup LIKE crse_subj.group,
           cGroup CHAR(10),
           iCount SMALLINT

    INITIALIZE iInputGroup TO NULL
    DISPLAY " "

    INPUT cInputProgram,
          dInputEffDate,
          iInputGroup
    FROM FORMONLY.program,
         FORMONLY.effDate,
         FORMONLY.group
    END INPUT
| A grammatical error has been found at 'INPUT' expecting: FUNCTION.
| See error number -6609.
    RETURN cInputProgram, dInputEffDate, iInputGroup
END FUNCTION
-----------------------
but if I take out the input command, it compiles fine (forget about
running it, because this is the first function to get called for input
and that input statement needs A LOT more to it...)

Every message board I come across only seems to mention about FOR ...
END FOR; UPDATE.  So that's why the Display is in there because I
thought there might be NULL INPUT or something like that.


On a side note, I did have my entire program working at one time.  All
of a sudden it just decided to stop compiling correctly.  I do have a
similar program that is nearly identical (same screen layout, same
function calls, same logic), just different tables used and it compiles
fine, so I'm guessing it has to be code related...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.