<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: #606420; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: #606420; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=#606420 link=blue>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=Arial
color=#0000ff size=2>Pretty much as you would have in the past: use the template
field names and set CRNT.FA.YEAR in the Process Entry Hook. Here, for example,
is a routine I recently re-wrote from an original in
UniBASIC:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=Arial
color=#0000ff size=2><<</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=r_ansi
size=2>Application: ST, Process: QU4.GET.LAST.YR.AWD.PCT - Get need pct
met last year </FONT></SPAN></DIV>
<DIV><FONT face=r_ansi size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=r_ansi
size=2>Process Type.............: B - Batch Virtual Field
Subroutine</FONT></SPAN></DIV>
<DIV><FONT face=r_ansi size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=r_ansi
size=2>Process Argument: 1.
A.PERCENT
OUT - percent of need
met
<BR>
2.
A.STUDENT.ID
IN - ID of
recipient
<BR>
3.
A.YEAR
IN - Current Academic
Year
</FONT></SPAN></DIV>
<DIV><FONT face=r_ansi size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=r_ansi
size=2>User
Code...........................................................................................................<BR>
0001: * 11 Jul 2007 11:12am Eric Spitzner
<BR>
0002: V.SA.STUDENT.ID = A.STUDENT.ID
<BR>
0003: FOR_THE REFERENCED SA.STUDENT.ID EXISTING
<BR>
0004: V.CS.STUDENT.ID = V.SA.STUDENT.ID
<BR>
0005: FOR_THE REFERENCED CS.STUDENT.ID EXISTING
<BR>
0006: X.CS.NEED = V.CS.NEED -
V.CS.BUDGET.ADJ
<BR>
0007: IF X.CS.NEED GT 0 THEN
<BR>
0008: FOR_EACH ASSOCIATED
SA.AWARD
<BR>
0009: IF
V.SA.AWARD EQ "PELL" |
<BR>
0010: OR
V.SA.AWARD EQ "SEOG" |
<BR>
0011: OR
V.SA.AWARD EQ "CICS" |
<BR>
0012: OR
V.SA.AWARD EQ "QGCT" |
<BR>
0013: OR
V.SA.AWARD EQ "QGRN" |
<BR>
0014: OR
V.SA.AWARD EQ "QGSP" THEN
<BR>
0015:
V.TC.STUDENT.ID = V.CS.STUDENT.ID
<BR>
0016:
V.TC.AWARD.ID = V.SA.AWARD
<BR>
0017:
FOR_THE REFERENCED TC.AWARD.ID
<BR>
0018:
FOR_EACH ASSOCIATED TC.TA.TERMS INTO TL.ACYR.ID
<BR>
0019:
V.AA.ID = V.TL.TERM.ACTION
<BR>
0020:
FOR_THE REFERENCED AA.ID
<BR>
0021:
IF V.AA.CATEGORY EQ "D" |
<BR>
0022:
OR V.AA.CATEGORY EQ "R" THEN
<BR>
0023:
NULL ;* Omit denied and rejected
awards
<BR>
0024:
END ELSE
<BR>
0025:
X.TOTAL.GIFT += V.TL.TERM.AMOUNT ;* Total gift aid
<BR>
0026:
END <BR>
0027:
END_THE AA.ID
<BR>
0028:
END_EACH TC.TA.TERMS
<BR>
0029:
END_THE TC.AWARD.ID
<BR>
0030:
END <BR>
0031: END_EACH SA.AWARD
<BR>
0032: END
<BR>
0033: END_THE CS.STUDENT.ID
<BR>
0034: A.PERCENT = X.TOTAL.GIFT * 100 / X.CS.NEED
<BR>
0035: END_THE SA.STUDENT.ID </FONT></SPAN></DIV>
<DIV><FONT face=r_ansi size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=r_ansi
size=2> Do BEFORE Main
Loop ENTRY
(PRCS.ENTRY)..............................................................................</FONT></SPAN></DIV>
<DIV><FONT face=r_ansi size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=r_ansi
size=2>
0001: * 10 Jul 2007 03:37pm Eric Spitzner
<BR>
0002: X.YEAR =
CRNT.FA.YEAR
;* Save the ambient current year
<BR>
0003: CRNT.FA.YEAR = A.YEAR -
1
;* Set this file's year minus one
<BR>
0004: X.TOTAL.GIFT =
0
;* Initial sum
<BR>
0005: A.PERCENT =
0
;* Initial result </FONT></SPAN></DIV>
<DIV><FONT face=r_ansi size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=r_ansi
size=2> Do upon EXIT from
Process
(PRCS.EXIT)...............................................................................</FONT></SPAN></DIV>
<DIV><FONT face=r_ansi size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=r_ansi
size=2>
0001: * 10 Jul 2007 03:37pm Eric Spitzner
<BR>
0002: CRNT.FA.YEAR =
X.YEAR
;* Restore the ambient </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=Arial
color=#0000ff size=2>>></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=Arial
color=#0000ff size=2>The limitation is that you must set CRNT.FA.YEAR before
your program/subroutine opens its files. Thus no routine can access multiple
years by itself. We have, for example, a routine which sums the awards of a
specified category to a given recipient. In the past this was a single
subroutine which used "GOSUB FILE.OPENS" as necessary to examine all the years
for which the recipient had records. For R18 we've split that routine in two:
one which loops through the years, setting CRNT.FA.YEAR and calling the second;
the second to return the awards it finds processing the year given
it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=456211014-13072007><FONT face=Arial
color=#0000ff size=2>HTH<BR></FONT></SPAN><SPAN class=456211014-13072007><FONT
size=2>Eric Spitzner, CDP (eric.spitzner@quinnipiac.edu)<BR>Senior
Programmer/Analyst<BR>Quinnipiac University; Hamden, Connecticut<BR>Sun V440;
Solaris 2.9; UniData 6.0.9<BR>Colleague 17.0.14 and Benefactor 5.1
</FONT></DIV></SPAN><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">HOW DO YOU ACCESS A FILE SUITE (EX.
CS.2004 OR TA.2005) IN AN “IS SUBROUTINE?
<o:p></o:p></SPAN></FONT></P></DIV></BODY></HTML>