Thanks Mike. I was opening the inventory file using OPEN INPUT, but I have changed it to OPEN LOAD at your suggestion. I reran the program and it took 20 minutes which is a big improvement. It should be noted, however, that most of the staff has left for the day so there is not much competition for system resources at the moment.
Here is a code snippet of the read, building of the string for the serial file, and the print to the serial file.
7140 READ (M2INV,END=EOF_INVENTORY)IOL=0460; IF MID(A$,30,2)<>DOLOC$ THEN GOTO *SAME
7145 DIM M2A$[1:32]; READ (M2INVA,KEY=A$,DOM=*NEXT)M2A${ALL}
7155 LET OUT$=STP(A$(1,3),1)+QT$+STP(A$(4,26),2)+QT$+A$(30,2)+QT$+STP(B$,1)+QT$
7155:+C$+QT$+D$+QT$+E$+QT$+F$+QT$+G$+QT$+H$+QT$+I$+QT$+J$+QT$+K$+QT$+MID(L$,1,1
7155:)+QT$+MID(L$,2,1)+QT$+M$+QT$
7156 LET OUT$+=FNMDY$(N$)+QT$+FNMDY$(O$)+QT$+P$+QT$+Q$+QT$+R$+QT$+S$+QT$+T$+QT$
7156:+U$+QT$+V$+QT$+STP(X460$,2)+QT$+Z$+QT$+STP(A27$,1)+QT$+STP(A28$,1)+QT$+STP
7156:(A29$,1)+QT$
7157 LET OUT$+=STP(A30$,2)+QT$+STP(PAD(M2A$[8],12),2)+QT$+STP(MID(PAD(M2A$[8],2
7157:4),13,12),2)+QT$+STP(M2A$[2],1)+QT$+STP(M2A$[3],1)+QT$+STP(M2A$[26],1)+QT$
7157:+STP(M2A$[20],1)
7540 PRINT (1)OUT$
7550 GOTO 7140
The files M2INV and M2INVA both have an embedded IO program, but only for pre_write. I have both IO programs added to memory via ADDR.