perm filename CB[B,PMP] blob sn#008140 filedate 1972-01-09 generic text, type T, neo UTF8
00100	BEGIN "CB"
00200	INTEGER I,J,K,L,M,N,T1,T2,D1,D2,D3,INO;
00300	INTEGER ARRAY C[1:4,1:1000];
00400	STRING ARRAY CS[1:1000];
00500	LABEL L1,L2;
00600	STRING S,S1,NAM;
00700	INTEGER IIQ,BR,EOF;
00800	PROCEDURE CLINE(INTEGER A,B);
00900	     BEGIN INTEGER K,L,M;
01000		K←C[1,A];
01100		L←K/10000;
01200		M←(K-L*10000)/100;
01300		K←K-L*10000-M*100;
01400		OUT(B,CVS(L)&"-"&CVS(M)&"-"&CVS(K)&"    	");
01500		IF C[3,A]<0 THEN OUT(B,"DEPOSIT	")
01600		ELSE OUT(B,CVS(C[3,A])&9);
01610		IF C[4,A]=0 THEN OUT(B,"  ") ELSE OUT(B,"* ");
01700		K←C[2,A];
01800		L←K/100;
01900		K←K-L*100;
02000		FOR M←LENGTH(CVS(L)) STEP 1 UNTIL 6 DO OUT(B," ");
02100		OUT(B,CVS(L)&".");
02200		IF K<10 THEN OUT(B,"0");
02300		OUT(B,CVS(K)&9);
02310	    END;
02400	I←0;IIQ←0;
02410	OPEN (2,"TTY",1,1,1,200,BR,IIQ);
02455	SETBREAK(1,", 	-"&13,10,"ISN");
02477	OUTSTR("FILE: ");
02488	NAM←INPUT(2,1);
02500	OPEN(1,"DSK",1,2,0,200,BR,EOF);
02600	SETBREAK(2," 	"&13,10,"ISN");
02700	SETBREAK(3,13,10,"ISN");
02800	LOOKUP(1,NAM,IIQ);
02900	IF IIQ≠0 THEN GO TO L1;
03000	EOF←0;
03100	S←INPUT(1,2);
03200	WHILE EOF=0 DO
03300	    BEGIN
03400		I←I+1;
03500		C[1,I]←CVD(S);
03600		C[2,I]←CVD(INPUT(1,2));
03700		C[3,I]←CVD(INPUT(1,2));
03725		IF C[3,I]>0 THEN INO←C[3,I];
03750		C[4,I]← CVD(INPUT(1,2));
03800		CS[I]←INPUT(1,3);
03900		S←INPUT(1,2);
04000	    END;
04100	L1:
04400	OUTSTR("TYPE NEW CHECKS  AS:
04500	DATE	AMOUNT	CHECK #(OR D)	NAME
04600	2-3-70	3460	101	STANDARD OIL
04700	3-21-69	12000	D
04800	");
04900	OUTSTR("END WITH E FOR DATE
05000	");
05100	L2:
05200	S←INPUT(2,1);
05300	IF S≠"E" THEN
05400	   BEGIN
05500		I←I+1;
05550		IF S≠"S" THEN
05575		    BEGIN
05600			D1←CVD(S);
05700			D2←CVD(INPUT(2,1));
05800			IF BR="-" THEN D3←CVD(INPUT(2,1)); 
05900		    END;
06100		C[1,I]←D1*10000+D2*100+D3;
06200		C[2,I]←CVD(INPUT(2,1));
06250		C[4,I]←0;
06300		S←INPUT(2,1);
06400		IF S="D" THEN C[3,I]←-1
06450		 ELSE IF S="I" THEN BEGIN INO←INO+1;C[3,I]←INO END
06500		 ELSE BEGIN C[3,I]←CVD(S);INO←C[3,I];END;
06600		IF BR=13 THEN CS[I]←" "  ELSE
06700		CS[I]←INPUT(2,3);
06800		GO TO L2;
06900	    END;
07000	CLOSE(1);
07100	RELEASE(1);
07105	OUTSTR("DOES BANK KNOW ABOUT THESE?:
07110	");
07115	FOR J←1 STEP 1 UNTIL I DO
07120	 IF C[4,J]=0 THEN
07125	    BEGIN
07130		CLINE(J,2);
07132		OUT(2,CS[J]);
07135		OUT(2,"? ");
07140		S←INCHRW;
07145		IF S="Y" THEN C[4,J]←1;
07150		OUTSTR("
07155	");
07160	    END;
07200	OPEN(1,"DSK",1,0,2,200,BR,EOF);
07300	ENTER(1,NAM,IIQ);
07400	T1←T2←0;
07500	FOR J←1 STEP 1 UNTIL I DO
07600	    BEGIN
07700		OUT(1,CVS(C[1,J])&" "&CVS(C[2,J])&" ");
07800		OUT(1,CVS(C[3,J])&" "&CVS(C[4,J])&" "&CS[J]&13&10);
07900	    END;
08000	RELEASE(1);
08100	OPEN(3,"LPT",1,0,2,200,BR,EOF);
08200	FOR J←1 STEP 1 UNTIL I DO
08300	    BEGIN
08400		IF C[3,J]<0 THEN K←C[2,J] ELSE K←-C[2,J];
08500		T1←T1+K;
08510		CLINE(J,3);
08600		IF C[4,J]≠0 THEN T2←T2+K;
08610		FOR M←T1,T2 DO
08620		    BEGIN
08630			K←M/100;
08640			L←M-K*100;
08644			IF K<0 THEN BEGIN
08648				K←K+1;
08652				L←100-L;
08656				END;
08700			FOR N←LENGTH(CVS(K)) STEP 1 UNTIL 7 DO OUT(3," ");
08800			OUT(3,CVS(K)&".");
08900			IF L<10 THEN OUT(3,"0");
09000			OUT(3,CVS(L)&9);
09010		    END;
09100		OUT(3,CS[J]&13&10);
09200	    END;
09300	RELEASE(3);RELEASE(2);RELEASE(1);END;END;END;END;END;
09400