FOCUS program :
JOIN CLEAR *
OFFLINE CLOSE
FILEDEF OFFLINE DISK TEMP.PRT
-*
-* Select students who are coded as out of state for
-* the given terms. Create a hold file with the key
-* being term and student id.
-*
DEFINE FILE RTFILE
JN_KEY/A14=TERM|STU_ID;
END
TABLE FILE RTFILE
PRINT STU_ID BY JN_KEY
WHERE (TERM_RESIDENCY EQ 'N') AND (TERM EQ '(Enrollment Term(s)');
ON TABLE HOLD AS RTTEMP1
END
-*
-* Select students who have tuition subcodes for
-* the given terms. Sum up this information for
-* each term for each student. Create a hold file
-* with the key being term and student id.
-*
DEFINE FILE BDFILE
JN_KEY/A14=TERM|STU_ID;
END
TABLE FILE BDFILE
SUM STU_ID TRAN_AMT BY JN_KEY
WHERE SUBCODE EQ '111$$';
ON TABLE HOLD AS BDTEMP1
WHERE TERM EQ '(Enrollment Term(s)';
END
-*
-* Select students who meet all criteria above and
-* where the sum of the tuition amounts is not zero.
-*
MATCH FILE RTTEMP1
PRINT STU_ID
BY JN_KEY
RUN
FILE BDTEMP1
PRINT STU_ID TRAN_AMT
BY JN_KEY
WHERE TRAN_AMT NE 0;
AFTER MATCH HOLD OLD-AND-NEW
END
-RUN
-*
-* Print out the student ids, total tuition amounts
-* by term, and sum up the tuition column.
-*
TABLE FILE HOLD
PRINT TRAN_AMT BY STU_ID
COLUMN-TOTAL
END
JOIN CLEAR *
This page hosted by
Get your own Free Homepage