image of READY prompt

Wang2200.org

Listing of file='OREN120A' on disk='vmedia/701-2616C.wvd.zip'

# Sector 618, program filename = 'OREN120A'
0010 REM OREN120A, RELEASE 2.0, (06/01/79) THIS PROGRAM IS A COPYRIGHT PRODUCT
      OF WANG LABORATORIES INC. UNAUTHORIZED REPRODUCTION OR USE IS PROHIBITED
0020 REM ---------------------------------------------------------------------
     ---
0030 REM SYSTEM & MODULE   =  GBS/MVP ORDER ENTRY SYSTEM, POST INVOICES
0040 REM PROGRAM FUNCTION  =  CHECK CONTROL FILE, SWITCH INVOICE FILES,OPEN FI
     LES
0050 REM DATE WRITTEN      =  07/07/78 MK
0060 REM LAST REVISION     =  08/12/79 MK
0070 REM ---------------------------------------------------------------------
     ---
0170      COM O3$(3)83
0172      DIM T0$(4)60,T$(3)48,K$8,K1$8,R9$(16),K9$8,A8$(4)3,V$18
0198      GOTO 4000
3994 REM ******************************************
3995 REM ! INVOICE UPDATE, INITIALIZATION PROGRAM !
3996 REM ******************************************
3997 REM
4000     SELECT @PARTS$
4010     V$=@V$
   : REM SAVE $PACK SPEC
4020     SELECT @PARTS0$
4030     A8$()=STR(M$(),,6)&STR(M$(),46,6)
   : REM SAVE KEY FILE ADDRESSES
4040 REM READ TRANSACTION FILE KDR - CALCULATE MAXIMUM NUMBER OF INVOICES
4050     Q6$=S$(1)
4060     STR(Q6$,5,2)="K1"
4070     SELECT #T1<A8$(3)>
4080     LIMITS T#T1,Q6$,Q6,Q7,Q8
4090     DATA LOAD DA T#T1,(Q6)Q9,T$()
4100     Q9 = MOD(VAL(STR(T$(2),4),2) + VAL(STR(T$(2),12)),65536)
4110     Q9 = INT((Q9+2)/3)
4120 REM CHECK A/R OPEN ITEM FILE SPACE
4130     LIMITS T#5,S$(5),Q6,Q7,Q8
4140     IF (Q7-Q6-Q8+1)*5> Q9 THEN 4180
4150     PRINT AT(3,0,80);"The A/R Open Item file will probably be filled by t
     his posting process.";HEX(07)
4160     GOTO 4240
4170 REM ASSUME EVERY INVOICE WILL GENERATE A BACK ORDER - CHECK FILE SPACE
4180     LIMITS T#9,S$(9),Q6,Q7,Q8
4190     Q8 = (Q7-Q6-Q8+1)*83
4200     IF Q8 >= Q9 THEN 4310
4210     PRINT AT(5,0,240);"The file that has a list of back order numbers is
     not large enough for the list of back order numbers that might be generat
     ed during Post Invoices."
4220     PRINT AT(8,0,240);"If you run the update program now, the back order
     print program will only print the back orders generated by this process."
4230     PRINT AT(11,0,240);"Back orders generated in previous posting process
     es can only be printed by individual selection in the Shipping Papers pri
     nt program"
4240     GOSUB '100("Y,N","YyNn",1,1,"DO YOU WISH TO CONTINUE (Y OR N)",2)
4250     IF Q6$ = "N" THEN LOAD TM$
4260 REM OVER-WRITE BACKORDER KEYS FILE
4270     INIT(FF)O3$()
4280     DATA SAVE DC #9,O3$()
4290     GOSUB '218(S$(9),9," ",0)
4300 REM %INITIALIZE OLD TRANSACTION FILE
4310     K$,K1$=S$(2)
   : REM USER FILE NAME
4320     K=2
   : REM USER FILE DEVICE NO.
4330     STR(K1$,5,2)="K1"
   : REM KEY FILE NAME
4340     K1=14
   : REM KEY FILE DEVICE NO.
4350     SELECT #K1<A8$(4)>
4360     LIMITS T#K,K$,Q9,L2,Q9
4370     DATA LOAD DC OPEN T#K,K$
4380     DATA SAVE DC #K,END
4390     R9$()=HEX(A00002FD)&"MUX "&K$
4400     DATA SAVE BA T$#K,(L2)R9$()
   : REM WRITE ACCESS TABLE - USER FILE
4410 REM %INITIALIZE KDR - KEY FILE
4420     DATA LOAD DC OPEN T#K1,K1$
   : REM OPEN KEY FILE
4430     DATA LOAD DC #K1,Q9,T$()
   : REM READ OLD KEY DESCRIPTOR RECORD (KDR)
4440     DBACKSPACE #K1,1S
4450     $UNPACK(F=V$)T$(2)TO T0,T2$,Q2$,V2$,T8,V6$,V3$,Q3$,V8$
4460     V1$=STR(T$(2),18)
   : REM IMPORTANT INFO, INCLUDING KEY LENGTH
4470     Q9=VAL(V6$)
4480     Q2$=BIN(Q9-1,2) XOR ALL(FF)
   : REM LAST SECTOR USED (NEGATIVE), UF
4490     T4=VAL(STR(V1$,5))
   : REM KEY LENGTH
4500     T2$,V2$,T9$=HEX(0001)
   : REM HIGH LEVEL SECTOR - ADDRESS
4510     T0=1
   : REM NUMBER OF LEVELS
4520     T8=0
   : REM RECORD COUNT
4530     INIT(5A)T$(1)
   : REM COMPLETION CODES  - 'MUX' VERSION
4540     INIT(FF)STR(T$(1),17)
   : REM PROTECTED SECTORS - 'MUX' VERSION
4550     $PACK(F=V$)T$(2)FROMT0,T2$,Q2$,V2$,T8
4560 REM 'FINDNEW' SECTORS ( LAST RECORD IN BLOCK, PER STATION)
4570     T$(3)=STR(Q3$) & V8$ & STR(T$(3))
4580     DATA SAVE DC $#K1,0,T$()
   : REM SAVE KEY DESCRIPTOR RECORD (KDR)
4590     INIT(FF)T0$()
   : REM FIRST KEY INDEX RECORD (KIR)
4600     INIT(00)STR(T0$(1),,T4)
   : REM DUMMY KEY INDEX ENTRY (KIE)
4610     DATA SAVE DC $#K1,T9$,T0$()
   : REM SAVE FIRST KIR
4620     DATA SAVE DC $#K1,END
   : REM WRITE END OF KEY FILE
4630 REM SAVE RECOVERY INFORMATION - USER FILE
4640     R9$()=HEX(A0FD)&T$()
4650     DATA SAVE BA T$#K,(L2-1)R9$()
4660 REM SET T9=0 TO SUPPRESS THE SAVING OF KDR PARAMETERS WITH NEXT KFAM ACCE
     SS
4670     T9=0
4680 REM UPDATE CONTROL FILE
4690     $OPEN #8
4700     GOSUB '46(8,0,1)
4710     IF M(11)=1THEN M(11)=0
   : ELSE M(11)=1
4730     GOSUB '46(8,0,0)
4740     $CLOSE#8
4750     STR(M5$,8)="B"
4760     LOAD TM5$4000,
9000 REM %VARIABLES
9010 REM   A8$() = SAVE FILE ADDRESSES
9998 DEFFN'29"Q$=";HEX(22);"OREN120A";HEX(22);":SCRATCH TQ$:SAVET$()Q$";HEX(0D
     )
9999 DEFFN'30"DIM Z$57:IF STR(I0$,,1)=HEX(20)THENI0$=HEX(323135):Z$=";HEX(22);
     "GBS/MVP - Post invoices - initialization.";HEX(22);":SELECT#15<I0$>:$OPE
     N#15:SELECTLIST<I0$>(132): LIST Z$:LIST Z$#:LIST Z$V:LIST Z$':$CLOSE#15:S
     ELECTLIST005(80)";HEX(0D)