image of READY prompt

Wang2200.org

Listing of file='SAC102BA' on disk='vmedia/701-2003.wvd.zip'

# Sector 110, program filename = 'SAC102BA'
0010 REM PROGRAM ID     = SAC102BA
0020 REM SYSTEM NAME    = BAS1A
0030 REM PROGRAM NAME   = CUSTOMER SALES ANALYSIS FILE MAINTENANCE
0040 REM MODULE NAME    = INSERT,REPLACE
0050 REM *************************************************
0060 REM *   THIS PROGRAM IS PART OF A GENERALIZED       *
0070 REM * APPLICATION. COPYRIGHT WANG LABS INC. 1973    *
0080 REM *************************************************
0090 REM DATE WRITTEN   = NOVEMBER,1973
0100 REM REVISION DATE  = 5/74
0110 REM LIBRARY NUMBER =
0120 REM
1380 REM ENTER CUST ID-THEN INSERT,DELETE, OR REPLACE
1390 REM
1400     IF Z=1 THEN 1650
1410 REM THIS IS BLOCK 1-F1
1440 REM
1450     GOSUB '243("ENTER CUST-ID",5)
1452     IF Q6$<>" " THEN 1460
1454     GOSUB '248(3,0,1)
1456     PRINT "RE-ENTER"
1458     GOTO 1450
1459 REM
1460     B$=Q6$
1470     IF B$="END" THEN 1595
1480 REM
1490     GOSUB '243("ENTER TRANS-CODE",1)
1500     T$=Q6$
1510 REM THIS IS BLOCK 1-G2
1520     IF B$>"ZZZZZ" THEN 1742
1530     IF B$<A$THEN 1570
1540     A$=B$
1550     GOTO 1650
1560 REM
1570     GOSUB '248(3,0,1)
1580     PRINT "SEQ-ERROR CUST-ID"
1590     GOTO 1450
1594 REM
1595     PRINT HEX(03)
1600 REM THIS IS BLOCK 1-H2
1610 REM
1620    T=1
1630 REM THIS IS BLOCK 1-J1
1640 REM
1650     IF W=1 THEN 2050
1660 REM
1670     IF T=1 THEN 1830
1680     IF M=1 THEN 1710
1690     IF B$>=C$ THEN 1870
1700 REM
1710     IF T$="I" THEN 2150
1720     IF T$="D" THEN 1750
1730     IF T$<>"R"THEN 1790
1735     GOTO 1750
1740 REM
1742     GOSUB '248(3,0,1)
1744     PRINT "ILLEGAL CUSTOMER ID WAS ENTERED"
1746     GOTO 1450
1748 REM
1750     GOSUB '248(3,0,1)
1760     PRINT "RECORD NOT ON FILE"
1770     GOTO 1450
1780 REM
1790     GOSUB '248(3,0,1)
1800     PRINT "INVALID TRANS-CODE"
1810     GOTO 1490
1820 REM
1830     IF M=0 THEN 1870
1835     PRINT HEX(03)
1850     LOAD DC F"SAC102CA"1400,8499
1860 REM
1870     C1$=C$
1880     R1$=R$
1890     N1$=N$
1900     S1=S
1910     FOR I=1 TO 12
1920       T1(I)=T(I)
1930       L1(I)=L(I)
1940     NEXT I
1950     W=1
1960     GOSUB 180
1970     IF R$="A2"THEN 2020
1980     GOSUB 1020
1990     C1=C1+1
2000     GOTO 2050
2010 REM
2020     M=1
2030 REM THIS IS BLOCK 1-J2
2040 REM
2050     IF T=1 THEN 2620
2060     IF B$=C1$ THEN 1090
2070     IF B$<C1$ THEN 2100
2080     GOTO 2620
2090 REM
2100     GOSUB '248(3,0,1)
2110     PRINT "SEQ-ERROR INPUT FILE"
2120     STOP
2130 REM INSERTION
2140 REM
2150     PRINT HEX(03)
2160     GOSUB '248(4,0,0)
2170     PRINT "CUSTOMER ID ";B$
2180     C1$=B$
2185 REM
2190     GOSUB '243("ENTER CUST NAME",18)
2192     IF Q6$="*" THEN 2196
2194     IF Q6$<>" " THEN 2200
2195 REM
2196     GOSUB '248(3,0,1)
2197     PRINT "RE-ENTER"
2198     GOTO 2190
2199 REM
2200     N1$=Q6$
2210     GOSUB 4170
2230 REM
2240     GOSUB '245("ENTER SALESMAN NO",5,0)
2250     S1=Q9
2260     GOSUB 4190
2280     FOR I = 1 TO 12
2290       T1(I)=0
2300       L1(I)=0
2310     NEXT I
2500     R1$="A1"
2510     W=1
2520     C9=1
2530     GOSUB 620
2540     PRINTUSING 1310,C1$,"INSERT","NAME"," "," ",N1$
2570     SELECT PRINT 005(64)
2580     C3=C3+1
2590     GOTO 1450
2600 REM THIS IS BLOCK 3-A1,CALLS 1A-D2
2610 REM
2620     IF Z=0 THEN 2680
2630     FOR I=1 TO 12
2640       L1(I)=T1(I)
2650       T1(I)=0
2660     NEXT I
2670 REM
2680     GOSUB 380
2690     C4=C4+1
2700     W=0
2710     GOTO 1670
3000 REM THIS IS BLOCK 3-A2, DISPLAYS ENTIRE INPUT RECORD
3010 REM
3020     PRINT HEX(03)
3030     GOSUB '248(4,0,0)
3040     PRINT "CUSTOMER ID ";C1$
3050     PRINT " (NAME) CUSTOMER NAME ";N1$
3060     PRINT " (SLSM) SALESMAN NO  ";S1
3070 REM
3080     PRINT " (TYMS) THIS YR MONTHLY SALES      (LYMS) LAST YR MONTHLY SALE
     S"
3090     PRINT "MO THIS YR SLS  MO  THIS YR SLS MO  LAST YR SLS  MO LAST YR SL
     S"
3100     FOR X = 1 TO 6
3110      GOSUB 4130
3140     NEXT X
3150 REM
3160     GOSUB '243("ENTER FIELD NAME",4)
3170     IF Q6$="END" THEN 1450
3180     IF Q6$<>"NAME" THEN 3290
3185 REM
3190     GOSUB '243("ENTER NEW FIELD",18)
3192     IF Q6$="*" THEN 3196
3194     IF Q6$<>" " THEN 3200
3195 REM
3196     GOSUB '248(3,0,1)
3197     PRINT "RE-ENTER"
3198     GOTO 3190
3199 REM
3200     N2$=Q6$
3205     C9=1
3210     GOSUB 620
3220     PRINTUSING 1310,B$,"REPLACE","NAME"," ",N1$,N2$
3230     SELECT PRINT 005(64)
3240     N1$=N2$
3245     GOSUB 4170
3250 REM
3260     C5=C5+1
3270     GOTO 3160
3280 REM
3290     IF Q6$<>"SLSM" THEN 3390
3300 REM
3310     GOSUB '245("ENTER NEW FIELD",5,0)
3320     C9=1
3330     GOSUB 620
3340     PRINTUSING 3345,B$,S1,Q9
3345     %       #####   REPLACE    SLSM      #####                       ####
     #
3350     SELECT PRINT 005(64)
3360     S1=Q9
3365     GOSUB 4190
3370     GOTO 3260
3380 REM
3390     IF Q6$<>"TYMS" THEN 3600
3400     GOSUB 3970
3410     IF Q6$="Y" THEN 3470
3420     GOSUB 3810
3430     I=Q9
3440     GOSUB 3520
3450     GOTO 3160
3460 REM
3470     FOR I=1 TO 12
3480      GOSUB 3520
3490     NEXT I
3500     GOTO 3160
3510 REM
3520     GOSUB 4060
3530     PRINTUSING 1310,B$,"REPLACE","TYMS",I,T1(I),Q9
3540       SELECT PRINT 005(64)
3550       T3(1)=T3(1)+Q9-T1(I)
3560       T1(I)=Q9
3562 REM
3565       GOSUB 4120
3570       C5=C5+1
3580       RETURN
3590 REM
3600     IF Q6$<>"LYMS" THEN 3930
3610     GOSUB 3970
3620     IF Q6$="Y"THEN 3680
3630     GOSUB 3810
3640     I=Q9
3650     GOSUB 3730
3660     GOTO 3160
3670 REM
3680     FOR I=1 TO 12
3690       GOSUB 3730
3700     NEXT I
3710     GOTO 3160
3720 REM
3730     GOSUB 4060
3740     PRINTUSING 1310,B$,"REPLACE","LYMS",I,L1(I),Q9
3750       SELECT PRINT 005(64)
3760       L3(1)=L3(1)+Q9-L1(I)
3770       L1(I)=Q9
3775     GOTO 3565
3800 REM
3810     GOSUB '248(1,0,1)
3820     PRINT "ENTER MONTH NO."
3830     GOSUB '246(2,0)
3840     IF Q9<1 THEN 3870
3850     IF Q9<13 THEN 3910
3860 REM
3870     GOSUB '248(3,0,1)
3880     PRINT "VALUE MUST BE BETWEEN 1 AND 12"
3890     GOTO 3810
3900 REM
3910     RETURN
3920 REM
3930     GOSUB '248(3,0,1)
3940     PRINT "INVALID FIELD NAME"
3950     GOTO 3160
3960 REM
3970     GOSUB '243("CHANGE ALL MONTHS",1)
3980     IF Q6$="Y" THEN 4040
3990     IF Q6$="N" THEN 4040
4000     GOSUB '248(3,0,1)
4010     PRINT "ENTER 'Y' OR 'N'"
4020     GOTO 3970
4030 REM
4040     RETURN
4050 REM
4060     GOSUB '248(1,0,1)
4070     PRINT "ENTER NEW FIELD-MTH";I
4080     GOSUB '246(-7,2)
4090     C9=1
4100     GOSUB 620
4110     RETURN
4118 REM
4120     IF I<7 THEN 4125
4122     X=I-6
4123     GOTO 4128
4125     X=I
4127 REM
4128     GOSUB '248(X+8,0,1)
4130     PRINTUSING 4150,X,T1(X),X+6,T1(X+6),X,L1(X),X+6,L1(X+6);
4140 REM
4150      %#-#,###,###.##  ##-#,###,###.##  #-#,###,###.##  ##-#,###,###.##
4160     RETURN
4165 REM
4170     GOSUB '248(5,0,1)
4175     PRINT " (NAME) CUSTOMER NAME ";N1$
4180     RETURN
4185 REM
4190     GOSUB '248(6,0,1)
4195     PRINT " (SLSM) SALESMAN NO  ";S1
4200     RETURN
4210 REM $