image of READY prompt

Wang2200.org

Listing of file='GENL030A' on disk='vmedia/701-2653B.wvd.zip'

# Sector 121, program filename = 'GENL030A'
0001        IF Q6$=HEX(1F) THEN GOSUB '31
0170 DIM A6$(7)16,A6(7),A9$11,B6$(6)24,B8$2,B9$10
   : GOTO 4000
4000 SELECT @PARTS0$
4100 %######  #,###,###.##
4110 A6$(1)="ACCOUNT NO."
   : A6(1)=VAL(Q0$(5))
   : A6$(2)="SOURCE CODE"
   : A6(2)=2
   : A6$(3)="TRANSACTION DATE"
   : A6(3)=8
   : A6$(4)="DESCRIPTION"
   : A6(4)=MIN(33-A6(1),24)
   : A6$(5)="REFERENCE 1"
   : A6(5)=8
   : A6$(6)="REFERENCE 2"
   : A6(6)=8
   : A6$(7)="GROSS AMOUNT"
   : A6(7)=7.2
   : G6=1
   : G0$()=ALL(FF)
4270 G1$()="CCC"
   : PRINT AT(6,16,64);"0 = Return to menu"
   : PRINT TAB(16);"1 = Add new journal entries"
   : PRINT TAB(16);"2 = Correct journal entries"
   : GOSUB '100("0","2",1,0,"ENTER OPTION DESIRED",1)
   : IF Q9=0OR Q6$=HEX(1F)THEN 5180
   : A9=Q9
   : LIMITS T#8,S$(8),Q6,Q7,Q8
   : Q9=(Q8-2)/(Q7-Q6-1)
4400 IF Q9>.8THEN PRINT AT(3,0);"Audit file is more than";INT(Q9*100);"% full"
   : Q$,Q7$=" "
   : IF Q9>.95THEN 5000
   : LIMITS T#3,S$(3),Q6,Q7,Q8
   : Q9=(Q8-2)/(Q7-Q6-1)
   : IF Q9>.8THEN PRINT AT(3,0);"Old J/E file is more than";INT(Q9*100);"% ful
     l.  "
   : LIMITS T#4,S$(4),Q6,Q7,Q8
   : E9=(Q8-2)/(Q7-Q6-1)
4580 IF E9>.8THEN PRINT AT(3,40);"New J/E file is more than";INT(E9*100);"% fu
     ll.  "
   : Q$,Q7$=" "
   : IF Q9>.95OR E9>.95THEN 5000
   : GOSUB '66(6,0,1)
   : Q$,Q6$=" "
   : Q7$="Error in control file - invalid current fiscal period"
   : IF M(9)<1OR M(9)>12THEN 5000
4690 Q7$="Error in control file - invalid first fiscal month no."
   : IF M(14)<1OR M(14)>12THEN 5000
   : E7=MOD(M(9)+M(14)-2,12)+1
4730 M$()="JANUARY  FEBRUARY MARCH    APRIL    MAY      JUNE     JULY     AUGU
     ST   SEPTEMBEROCTOBER  NOVEMBER DECEMBER"
   : MAT REDIM M$(12)9
   : PRINT AT(6,16,224);"1 = ";M$(E7)
   : PRINT TAB(16);"2 = ";M$(MOD(E7,12)+1)
   : PRINT TAB(16);"3 = STANDARD JOURNAL ENTRIES"
4780 GOSUB '100("1","3",1,0,"ENTER FISCAL PERIOD",1)
   : IF Q6$=HEX(1F)THEN GOSUB '31
   : E8=Q9+2
   : IF A9=1THEN Q6$="Add new"
   : ELSE Q6$="Correct"
   : IF Q9<3THEN Q7$=M$(MOD(E7+Q9-2,12)+1)
   : ELSE Q7$="STANDARD J/E FILE"
   : PRINT AT(0,25,55);"- ";Q6$;" journal entries for ";Q7$
   : MAT REDIM M$(4)62
   : $OPEN #6
   : GOSUB '66(6,0,1)
4910 IF E8=3THEN M3$,F5$(1),F5$(3)=" "
   : GOSUB '66(6,0,0)
   : $CLOSE#6
   : IF E8=3THEN GOSUB '218(S$(7),7," ",0)
   : Q6$=" "
   : Q7$="Error in journal entries file - correct and restart"
   : DSKIP #E8,END
   : ERRORGOTO 5000
4980 ON A9GOTO 5360,5250
5000 GOSUB '91
   : PRINT AT(1,0,80);Q7$;HEX(07)
   : PRINT AT(3,16,64);Q6$
   : GOSUB '254
5040 DEFFN'31
   : IF G7=0THEN 5180
   : CONVERT G7TO Q6$,(##)
   : ERRORQ6$="99"
5130 IF STR(Q6$,,1)="0"THEN STR(Q6$,,1)=" "
   : G2$(G6)=Q6$&" Previous edits for"
   : G3$(G6)="this entry are void"
   : GOSUB 7260
5180 IF G6<>1THEN GOSUB '49(8)
   : LOAD TM$
5250 PRINT AT(5,0,)
   : GOSUB 6890
   : GOSUB 6140
   : GOSUB 6520
   : GOSUB 7180
   : GOTO 5250
5360 PRINT AT(3,0,80);"The source code is normally used as a batch identificat
     ion code"
   : GOSUB '100(" ",HEX(7F),2,0,"ENTER THE DEFAULT SOURCE CODE",2)
   : IF Q6$=HEX(1F)THEN GOSUB '31
   : B8$=Q6$
5400 PRINT AT(5,0,560)
   : PRINT AT(15,22);"*** BATCH TOTALS ***"
   : PRINT TAB(22);"DR AMT"
   : PRINT TAB(22);"CR AMT"
   : GOSUB 5490
   : GOSUB 6140
   : GOSUB 6520
   : GOSUB '63(E8)
   : PRINT AT(13,0,80);"Last entry was for account number ";H0$;", Transaction
      number";H2
   : GOTO 5400
5490 I9=1
   : J9=7
   : B6$()=ALL(20)
   : B6$(2)=B8$
   : B6$(3)=Q1$
5540 FOR I=I9TO J9
5550 A9$=" "
   : B9$=HEX(7F)
   : B9=2
   : IF I<>7THEN 5640
   : A9$="-9999999.99"
   : B9$="9999999.99"
   : B9=1
   : G5$(G6)=A6$(I)
   : IF I<>7THEN G2$(G6),Q6$=B6$(I)
5640 PRINT AT(1,0,80);"ENTER ";A6$(I);
   : IF I=3THEN PRINT " (MM/DD/YY)";
   : IF I=1THEN PRINT " (OR END)"
   : ELSE PRINT
   : Q6$=" "
   : IF I<>7THEN Q6$=B6$(I)
   : IF Q6$<>" "THEN B9=3
   : GOSUB '100(A9$,B9$,A6(I),MOD(A6(I),1)*10," ",B9)
   : IF Q6$=HEX(1F)THEN GOSUB '31
   : PRINT AT(4+I,0)
   : G3$(G6)=Q6$
   : IF I<>1THEN 5900
   : IF Q6$="END"OR Q6$="end"THEN 6700
   : GOSUB '96(5)
   : B6$(1),G3$(G6)=Q6$
5780 STR(B6$(1),9)=" "
   : GOSUB '232(1,0,B6$(1))
   : GOSUB '91
   : IF J0=0THEN 5840
   : B6$(I)=ALL(20)
   : GOTO 5550
5840 GOSUB '75(2)
   : IF O1$="2"AND O3$<>"M"THEN 5880
   : PRINT AT(3,0,80);HEX(07);B6$(I);" - Invalid posting account, re-enter."
   : B6$(I)=ALL(20)
   : GOTO 5550
5880 PRINT 1;TAB(4);A6$(1);TAB(22);B6$(1);TAB(33);"NAME";TAB(40);O5$;TAB(79)
   : GOTO 6080
5900 IF I=7THEN 6030
   : B6$(I)=Q6$
   : IF I<>3THEN PRINT I;TAB(4);A6$(I);TAB(22);B6$(I);TAB(79)
   : IF I<>3THEN 6080
   : IF Q6$=" "THEN Q6$=Q1$
   : GOSUB '121(Q6$)
   : IF Q6$<>"E"THEN 5990
   : PRINT AT(3,0,80);HEX(07);"Illegal date, re-enter"
   : GOTO 5640
5990 GOSUB '123(U9)
   : B6$(I),Q6$=U9$
   : PRINT I;TAB(4);A6$(I);TAB(22);B6$(I);TAB(79)
   : GOTO 6080
6030 B6=Q9
   : B7=1
   : PRINTUSING " #  GROSS AMT    #,###,###.##-",I,B6
   : GOSUB 6390
6080 G7=G7+1
   : IF A9=2THEN GOSUB 7260
   : ELSE G7=G7-1
   : NEXT I
   : RETURN
6140 IF A9=1THEN Q6$="7"
   : ELSE Q6$="6"
   : GOSUB '100("-1",Q6$,1,0,"ENTER ITEM NO.(OR 0=END, -1=VOID)",1)
   : IF Q6$=HEX(1F)THEN GOSUB '31
   : IF Q9=0THEN RETURN
   : IF Q9<>-1THEN 6320
   : B7=-1
   : GOSUB 6390
   : RETURN CLEAR
6240 IF G7=0THEN ON A9GOTO 5400,5250
   : CONVERT G7TO Q6$,(##)
   : ERRORQ6$="99"
6260 IF STR(Q6$,,1)="0"THEN STR(Q6$,,1)=" "
   : G2$(G6)=Q6$&" Previous edits for"
   : G3$(G6)="this entry are void"
   : GOSUB 7260
   : ON A9GOTO 5400,5250
6320 I9,J9=Q9
   : B7=-1
   : IF Q9=7THEN GOSUB 6390
   : GOSUB 5540
   : GOTO 6140
6390 IF A9=2THEN RETURN
   : PRINT AT(16,22);
   : IF B6<0THEN 6450
   : P6=P6+B6*B7
   : PRINTUSING 4100,"DR AMT",ABS(P6)
   : RETURN
6450 N6=N6+B6*B7
   : PRINT AT(17,22);
   : PRINTUSING 4100,"CR AMT",ABS(N6)
   : RETURN
6520 H0$=B6$(1)
   : H1$=B6$(2)
   : GOSUB '121(B6$(3))
   : IF Q6$="E"THEN U9=Q1
   : H=U9
   : H3$=B6$(4)
   : H4$=B6$(5)
   : H5$=B6$(6)
   : H1=B6
   : H2=A9
   : RETURN
6700 RETURN CLEAR
6710 IF ABS(N6)=ABS(P6)THEN 6790
   : PRINT AT(3,0,80);HEX(07);"Batch entries out of balance"
   : GOSUB '100("Y,N","YyY Nn",1,1,"CORRECTION DESIRED (Y OR N)",2)
   : IF Q9=1THEN 5400
6790 PRINT AT(4,0,960)
   : N6,P6=0
6810 GOSUB '100("Y,N","YyY Nn",1,1,"ANY MORE BATCHES TO PROCESS (Y OR N)",2)
   : ON Q9GOTO 4730,5040
6890 GOSUB '100("0","99999",5,0,"ENTER TRANSACTION NO. (0=END)",1)
   : G7=0
   : IF Q6$=HEX(1F)THEN GOSUB '31
   : IF Q9=0THEN 6810
   : LIMITS T#E8,S$(E8),Q6,Q7,Q8
   : IF Q9<=(Q8-2)*4THEN 6970
6950 PRINT AT(3,0,80);HEX(07);"Record not found"
   : GOTO 6890
6970 DBACKSPACE #E8,BEG
   : DSKIP #E8,INT((Q9-1)/4)S
   : DATA LOAD DC #E8,M$()
   : E9=MOD(Q9-1,4)+1
   : IF STR(M$(E9),,1)=HEX(FF)THEN 6950
   : $UNPACK(F=L3$)M$(E9)TO B5,B6$(1),B6$(2),U9,B6$(4),B6$(5),B6$(6),B6
   : Q7$="Error in journal entries file - correct and restart"
   : Q$,Q6$=" "
   : IF B5<>Q9THEN 5000
   : GOSUB '123(U9)
   : IF Q6$="E"THEN U9$="NO DATE"
7080 B6$(3)=U9$
   : PRINT AT(5,0,)
   : FOR I=1TO 6
   : PRINT I;TAB(4);A6$(I);TAB(22);B6$(I)
   : NEXT I
   : PRINTUSING " *  GROSS AMT    #,###,###.##-",B6
   : RETURN
7180 DBACKSPACE #E8,1S
   : DATA LOAD DC #E8,M$()
   : $PACK(F=L3$)M$(E9)FROMB5,B6$(1),B6$(2),U9,B6$(4),B6$(5),B6$(6),B6
   : DBACKSPACE #E8,1S
   : DATA SAVE DC #E8,M$()
   : RETURN
7260 Q6$=ALL(00)
   : PRINTUSING TO Q6$,"##### #",B5,E8-2
   : G0$(G6)="A"&STR(Q6$,3,7)
   : G6=G6+1
   : IF G6<4THEN RETURN
   : GOSUB '49(8)
   : G6=1
   : G0$()=ALL(FF)
   : IF Q9<.95THEN RETURN
   : Q$,Q6$=" "
   : Q7$="PROGRAM WILL BE TERMINATED"
   : GOTO 5000
9999 DEFFN'29"Q6$=";HEX(22);"GENL030A";HEX(22);":SCRATCHTQ6$:SAVET()Q6$";HEX(0
     D)