       module module1
       newfile star.pcalc.out
       sum=pc_star(*refund_jo)
       sum=sum+pc_star(*refund_kiki)
       sum=sum+pc_star(*refund_sa)
       sum=sum+pc_star(*refund_ec)
       write star.pcalc.out "refund_jo/kiki/sa/ec = pc_calc(sum,F.2)"
       end

       module check_misc
       i=nint(pc_star(&misc.target)*100)
       j=nint((pc_star(#)-pc_star(#prev))*2600/12)
       if(gt(j,i)) then
           print "%pstar - &misc should be increased by     pc_calc((j-i)/100,f10.2)"
       else if(lt(j,i)) then
           print "%pstar - &misc should be decreased by     pc_calc((j-i)/100,f10.2)"
       else
           return
       endif
       print "%pstar - the new value of &misc should be pc_calc(j/100,f10.2)"
       end

       module ltdebt
       if(le(pc_star(*ltdebt),-360)) then
           star ltdebt 360
       else if(ne(pc_star(*ltdebt),0)) then
          star refund_hr1 pc_calc(360+pc_star(*ltdebt))
          star ltdebt pc_calc(-pc_star(*ltdebt))
       else
          star refund_hr1 360
       endif
       end

       module module2
       newfile star.pcalc.out
       write "etgt        = pc_calc(pc_star(#etgt),F.2)"
       write "ss.etgt     = pc_calc(pc_star(&ss.etgt),F.2)"
       write "simsys.etgt = pc_calc(pc_star(&simsys.etgt),F.2)"
       write "left        = pc_calc(pc_star(#left),F.2)"
       write "ss.left     = pc_calc(pc_star(&ss.left),F.2)"
       write "simsys.left = pc_calc(pc_star(&simsys.left),F.2)"
       write "simsys.left = pc_calc(pc_star(&simsys.left),F.2)"
       write "target      = pc_calc(pc_star(#target),F.2)"
       write "ss.target   = pc_calc(pc_star(&ss.target),F.2)"
       write "simsys.target = pc_calc(pc_star(&simsys.target),F.2)"
       write "tottgt      = pc_calc(pc_star(#tottgt),F.2)"
       end

       module module3
       newfile star.pcalc.out
       sum=0
       list % sum=sum+pc_star(*~stk_%)
       write star.pcalc.out "STK = pc_calc(sum,I)"
       sum=0
       list % sum=sum+pc_star(*~bnd_%)
       write star.pcalc.out "BND = pc_calc(sum,I)"
       sum=pc_star(#)
       sum=sum+pc_star(star.b1\*refund_hr1)
       sum=sum+pc_star(*~B1_hr1tfu)
       sum=sum+pc_star(*~B1_hr1tbu)
       sum=sum+pc_star(*~B1_hr1adp)
       write star.pcalc.out "Working Capital = pc_calc(sum,F.2)"
       end

       module module4
       parameter ignore nofind
       beginline loop1 module5
       gas=0
       cln=0
       msc=0
       rst=0
       sas=0
       tvl=0
       rjo=0
       rki=0
       rsa=0
       rec=0
       rhr=0
       ltd=0
       sms=0
       hlt=0
       bls=0
       ccd=0
       do while (pc_nextline_sts)
           gas=gas+pc_star(pc_line(loop1)\&gas)
           cln=cln+pc_star(pc_line(loop1)\&cleaners)
           msc=msc+pc_star(pc_line(loop1)\&misc)
           msc=msc+pc_star(pc_line(loop1)\&nyt)
           rst=rst+pc_star(pc_line(loop1)\&rest)
           sas=sas+pc_star(pc_line(loop1)\&ss)
           tvl=tvl+pc_star(pc_line(loop1)\&refund_misc)
           tvl=tvl+pc_star(pc_line(loop1)\&refund_tks)
           tvl=tvl+pc_star(pc_line(loop1)\&refund_trip)
           tvl=tvl+pc_star(pc_line(loop1)\&refund_etvl)
           tvl=tvl+pc_star(pc_line(loop1)\&refund_ktvl)
           tvl=tvl+pc_star(pc_line(loop1)\&refund_tvl)
           tvl=tvl+pc_star(pc_line(loop1)\&refund_xmas)
           rjo=rjo+pc_star(pc_line(loop1)\&refund_jo)
           rki=rki+pc_star(pc_line(loop1)\&refund_kiki)
           rki=rki+pc_star(pc_line(loop1)\&refund_ret)
           rsa=rsa+pc_star(pc_line(loop1)\&refund_sa)
           rec=rec+pc_star(pc_line(loop1)\&refund_ed)
           rec=rec+pc_star(pc_line(loop1)\&refund_ec)
           rec=rec+pc_star(pc_line(loop1)\&refund_cbs)
           rhr=rhr+pc_star(pc_line(loop1)\&refund_hr1)
           rhr=rhr+pc_star(pc_line(loop1)\&refund_hr2)
           ltd=ltd+pc_star(pc_line(loop1)\&evelyn)
           ltd=ltd+pc_star(pc_line(loop1)\&ltdebt)
           sms=sms+pc_star(pc_line(loop1)\&simsys)
           hlt=hlt+pc_star(pc_line(loop1)\&health)
           bls=bls+pc_star(pc_line(loop1)\&bills)
           ccd=ccd+pc_star(pc_line(loop1)\#)
           nextline loop1 module5
       end do
       tot=gas+cln+msc+rst+sas+ltd+tvl+rjo+rsa+rhr
       print "gas = pc_calc(gas) ave = pc_calc(gas/12)"
       print "cln = pc_calc(cln) ave = pc_calc(cln/12)"
       print "msc = pc_calc(msc) ave = pc_calc(msc/12)"
       print "rst = pc_calc(rst) ave = pc_calc(rst/12)"
       print "sas = pc_calc(sas) ave = pc_calc(sas/12)"
       print "ltd = pc_calc(ltd) ave = pc_calc(ltd/12)"
       print "tvl = pc_calc(tvl) ave = pc_calc(tvl/12)"
       print "rjo = pc_calc(rjo) ave = pc_calc(rjo/12)"
       print "rsa = pc_calc(rsa) ave = pc_calc(rsa/12)"
       print "rhr = pc_calc(rhr) ave = pc_calc(rhr/12)"
       print
       print "tot = pc_calc(tot) ave = pc_calc(tot/12)"
       print "rki = pc_calc(rki) ave = pc_calc(rki/12)"
       print "rec = pc_calc(rec) ave = pc_calc(rec/12)"
       print "sms = pc_calc(sms) ave = pc_calc(sms/12)"
       print "hlt = pc_calc(hlt) ave = pc_calc(hlt/12)"
       print "bls = pc_calc(bls) ave = pc_calc(bls/12)"
       print "ccd = pc_calc(ccd) ave = pc_calc(ccd/12)"
       print "dif = pc_calc(ccd+tot+rki+rec+sms+hlt+bls)"
       end

       module module5
       save\0302.c1
       save\0303.c1
       save\0304.c1
       save\0305.c1
       save\0306.c1
       save\0307.c1
       save\0308.c1
       save\0309.c1
       save\0310.c1
       save\0311.c1
       save\0312.c1
       save\0401.c1
       end

