In actuality, input can be in one of three forms:
In case (1), the utility simply returns the same term. It ensures that the year is numeric and that the term is Fall, Spring or Summer.
In case (2), input is blank (or 0). The routine will fetch the current term and will return it.
In case (3), a displacement from the current term (e.g., +1, -5, etc.) is given. The routine will determine the current term and will then determine the desired term based on the term displacement specified.
Output is the term desired and a return code. The output term is returned in the original input field. The return code is sent back in the second parameter field.
The routine is only useable in Easytrieve Plus. There are two include members that are used.
Include #1
The first include member is SI0900D. It contains
the working storage fields and DB2 Declares necessary for the routines
to work. It should be the last entry in your Files
section (the last entry before your first Job
statement).
This include uses an Easytrieve Plus Macro variable. This Macro variable is named SISVER and must be a Macro variable in the original program. It specifies the version of the SIS system from which the term is determined (BASE, TEST or PROD).
Include #2
This Include is named SI0900E. It does the actual
work to determine the term. It takes two arguments:
The SI0900E Include is invoked as follows:
where xxx is the variable containing the term displacement and yyy is the variable containing the return code (at least 2 bytes).
Once the current term is determined, the displacement factor (if any) is applied.
If an actual term is supplied, no calendar lookup is performed. Actual term input is determined by:
MACRO SISVER FILE FILE01 WTERM W 003 A VALUE '+1' WRTNCD W 002 A %SI0900D &SISVER JOB INPUT NULL %SI0900E WQTR WRTNCD DISPLAY 'TERM=' WTERM DISPLAY 'RETURN CODE=' WRTNCD STOP
This is a very simplistic example of use of the SI0900E routine. It will return the term one term beyond the current term.
All variables used by this routine have a suffix of ## to prevent duplicate variable names. Should a program using this routine use the same convention, see the SI0900D Include module for variable definitions.
Last Modified: Friday, 27-Feb-2004 10:10:51 CST
© 2004;All Rights Reserved