FOCUS program :

-*begin doc
-*
-*FEX:  FA07_BACH
-*
-*      This FOCUS program will produce the batch transactions for those 
-*      students who need BACH tracking.
-*
-*INPUT
-*      Award Year
-*      Award Period
-*      Tracking Item
-*
-*end doc
-**********************************************************************
-*
-SET &HDRKEY = (Batch Header Id); 
-SET &TRKFORM = (Tracking document to check for); 
-SET &IAWYR = (Financial Aid Award Year); 
-SET &IAWPD = (Financial Aid Award Period);
JOIN CLEAR *                                                                    
-*
-*  Create batch header
-*
-INCLUDE IR_BATCH_HEADER_FA.SEG 
=======================================================================
-*begin doc
-*
-*FEX:  IR_BATCH_HEADER.SEG
-*
-*      This FOCUS segment will produce the batch header based upon
-*      the input parameters.
-*
-*INPUT
-*      Batch Header Key : Information To Be Used Within Batch Header.
-*
-*end doc
-**********************************************************************
-*
JOIN CLEAR *
SET LINES=999999                                                                
SET PAGE=NOPAGE                                                                 
FILEDEF HLDTRANS DISK HLDTRANS.FTM APPEND LREC 80 RECFM F
-*
-*  Create The Batch Header
-*
DEFINE FILE AAFILE                                                              
BH1/A35 = '$$$FIN'||'&HDRKEY'|'        FAM TRACK'||'&HDRKEY'|'   YFA';
BH2/A45 = '                    ';
BATCH_HEADER/A80=BH1|BH2;
END                                                                             
TABLE FILE AAFILE                                                               
PRINT BATCH_HEADER
BY STU_ID NOPRINT
IF RECORDLIMIT EQ 1                                                             
ON TABLE SAVE AS HLDTRANS
END                                                                             
JOIN CLEAR *
=======================================================================
-*
-*  Select eligible financial aid students.
-*
TABLE FILE SAFILE
PRINT ROOT_KEY
IF AWD_YR EQ '&IAWYR'
IF PELL_CNTR GT 0
ON TABLE HOLD AS SATEMP1
END
-*
-*  Select students who meet selection criteria for input tracking item.
-*
JOIN ROOT_KEY IN SATEMP1 TO ROOT_KEY IN SAFILE AS J1
MATCH FILE SATEMP1
PRINT AWD_YR BY STU_ID
WHERE (AWD_YR EQ '&IAWYR') AND (DEGREE_BY_JUL EQ 'Y');
RUN
-*
-*  Check to see if item is already being tracked; if not create batch
-*  transaction to add item to screen 306.
-*
-INCLUDE IR_TRACK_TRANS_FA.SEG 
=======================================================================
-*begin doc
-*
-*FEX:  IR_TRACK_TRANS_FA.SEG
-*
-*      This FOCUS segment will complete the tracking logic for the
-*      input item. 
-*
-*INPUT
-*      Award Year
-*      Award Period
-*      Tracking Item
-*
-*end doc
-**********************************************************************
-*
-*  Eliminate students who are already being tracked for input item.
-*
FILE STFILE
SUM AWD_PER BY STU_ID
IF TRK_CNTR GT 0
IF AWD_YR EQ '&IAWYR'
IF AWD_PER EQ '&IAWPD'
IF TRK_FORM EQ '&TRKFORM'
WHERE ST020_ORDER LE TRK_CNTR;
AFTER MATCH HOLD OLD-NOT-NEW
END
-RUN
-*
-*  Create batch transactions for students who need to be tracked for 
-*  input item. 
-*
DEFINE FILE HOLD
BTH_TRANS1/A29 = ('72B'|STU_ID|'  '|'&IAWYR'|'&IAWPD'|' '|'&TRKFORM');
BTH_TRANS2/A51 = '                                        A';
END
TABLE FILE HOLD
PRINT BTH_TRANS1 IN 1 AS '' BTH_TRANS2 AS '' 
ON TABLE SAVE AS HLDTRANS
END
=======================================================================
JOIN CLEAR *

 

 

This page hosted by Get your own Free Homepage

Hosted by www.Geocities.ws

1