hi spyderman,
Are you trying to link two sub-programs?
I haven't had much experience but i'll give it a go.
What you need is to define the data which will be passed between the programs, in the working storage section of your main-module this may look something like this:
WORKING-STORAGE SECTION.
01 W-DATE PIC 9(6).
01 W-ERROR-FLAG PIC X VALUE 'N'.
(I am assuming that you are writing a date validation)
You would then call the date-module in the procedure division thus:
CALL DATE-MODULE USING W-DATE W-ERROR-FLAG
In the recieving module (date module) you would define the data in the LINKAGE SECTION which comes after the WORKING STORAGE SECTION THUS:
LINKAGE SECTION
01 L-DATE
03 L-DAY PIC 99.
03 L-MONTH PIC 99.
03 L-YEAR PIC 99.
01 03 L-ERROR-FLAG PIC X.
Then the procedure division heading would look like this:
PROCEDURE DIVISION USING L-DATE L-ERROR-FLAG
then just go ahead and code the rest of the program like normal.
IMPORTANT!!
** L-DATE and L-ERROR-FLAG are explicit redefinitions of the data used in the call statemant in the main program.
ie. they occupy the same area of storage, so must appear in the relevant order:-
hope this is some help jimlee