*------------------------------------------------------------------ *PGM NAME: REL8.CONV.IVT *PURPOSE: TO CONVERT INVENTORY TRANSACTION HISTORY *AUTHOR: BARKSDALE *CREATED: 07/20/95 *------------------------------------------------------------------ $INCLUDE GEN.COMMON $INCLUDE INV $INCLUDE IVT $INCLUDE IMA * OPEN 'IVT.OLD' TO IVT.OLD ELSE ABORT 201,'IVT.OLD' OPEN 'INVENTORY' TO INVENTORY ELSE ABORT 201,'INVENTORY' OPEN 'INV.TRANS' TO INV.TRANS ELSE ABORT 201,'INV.TRANS' OPEN 'INV.ACTIVITY' TO INV.ACTIVITY ELSE ABORT 201,'INV.ACTIVITY' OPEN 'INV.JOURNAL' TO INV.JOURNAL ELSE ABORT 201,'INV.JOURNAL' OPEN 'INV.COST' TO INV.COST ELSE ABORT 201,'INV.COST' OPEN 'GEN.KEYS' TO GEN.KEYS ELSE ABORT 201,'GEN.KEYS' * EOF=0; NUM.READ=0; NUM.DONE=0 * EXECUTE \SSELECT IVT.OLD BY ITEM BY PERIOD\ LOOP READNEXT ID ELSE EOF=1 UNTIL EOF DO IF REM(NUM.READ,10) ELSE GOSUB 2000 GOSUB 1000 REPEAT GOSUB 2000 CRT @(0,22):CL:"Press to continue...": INPUT ANY STOP * 1000 * READ TREC FROM IVT.OLD,ID THEN NUM.READ=NUM.READ+1 ITEM=FIELD(ID,"|",2) READV ASMFLAG FROM INVENTORY,ITEM,INV$ASSEMBLED ELSE ASMFLAG="N" TCT=DCOUNT(TREC<1>,VM) FOR T=TCT TO 1 STEP -1 TYPE=TREC QTY=TREC BEGIN CASE CASE TYPE="DNR" TYPE="SLS" QTY=QTY*-1 CASE TYPE="ASM" IF ASMFLAG="Y" THEN TYPE="ASM.UPDATE" END ELSE TYPE="ASM" END CASE TYPE="TRF"; TYPE="ADJ" CASE TYPE="MR"; TYPE="ADJ" CASE TYPE="RT"; TYPE="RTS" END CASE IMA.DATA="" IMA.DATA=TYPE IMA.DATA=ITEM IMA.DATA=QTY IMA.DATA="MTEK" IMA.DATA=TREC IMA.DATA=TREC IMA.DATA=TREC IMA.DATA=TREC IMA.DATA=TREC IMA.DATA="REL8.CONV.IVT" IMA.DATA=DATE() IMA.DATA=TIME() CALL CMSD.INV.MASTER(IMA.DATA) IF IMA.DATA#"PASS" THEN CRT @(0,22):"Problem exists...": INPUT DUMMY END NEXT T NUM.DONE=NUM.DONE+1 END RETURN * 2000 * CRT CS CRT @(0,5):"NUMBER RECORDS READ: ":NUM.READ CRT @(0,6):"NUMBER RECORDS DONE: ":NUM.DONE RETURN