*------------------------------------------------------------------ *PGM NAME: REL8.CONV.INV *PURPOSE: TO CONVERT INVENTORY FROM REL8 TO NEW REL8 *AUTHOR: BARKSDALE *CREATED: 01/17/95 *------------------------------------------------------------------ $INCLUDE BP.MASTER GEN.COM2 $INCLUDE BP.MASTER INV * OPEN 'INV.OLD' TO INV.OLD ELSE ABORT 201,'GRACE.INV' OPEN 'INVENTORY' TO INV.NEW ELSE ABORT 201,'INVENTORY' * EOF=0; NUM.READ=0; NUM.DONE=0 * SELECT INV.OLD * LOOP READNEXT ID ELSE EOF=1 UNTIL EOF DO IF REM(NUM.READ,100) ELSE GOSUB 2000 GOSUB 1000 REPEAT GOSUB 2000 CRT @(0,22):CL:"Press to continue...": INPUT ANY STOP * 1000 * READ OLDREC FROM INV.OLD,ID THEN NUM.READ=NUM.READ+1 SKIPFLAG=0 NEWREC="" STATUS=OLDREC<11> IF STATUS="N" THEN STATUS="A" NEWREC=STATUS GROUP=OLDREC<9> BEGIN CASE CASE GROUP="CO"; GROUP="SP" END CASE TYPE=OLDREC<10> BEGIN CASE CASE TYPE="MS"; TYPE="X" CASE TYPE="DN"; SKIPFLAG=1 END CASE NEWREC=GROUP NEWREC=TYPE NEWREC=OLDREC<12> NEWREC=OLDREC<40> IF OLDREC<46>="" THEN KEYITM="N" END ELSE KEYITM=OLDREC<46> END NEWREC=KEYITM IF OLDREC<26>#"" THEN ASSEM=OLDREC<26> END ELSE ASSEM="N" END NEWREC=ASSEM NEWREC=OLDREC<5> NEWREC="" IF OLDREC<43>="" THEN MEAS="EA" END ELSE MEAS=OLDREC<43> END NEWREC=MEAS NEWREC=OLDREC<4> NEWREC="" NEWREC="MAIL" NEWREC=OLDREC<2> NEWREC=0 NEWREC=0 NEWREC="PHONE" NEWREC=OLDREC<2> NEWREC=0 NEWREC=0 NEWREC=OLDREC<27> NEWREC=OLDREC<28> NEWREC=OLDREC<15> NEWREC=OLDREC<44> NEWREC=OLDREC<45> NEWREC=OLDREC<47> NEWREC=OLDREC<17> NEWREC=OLDREC<8> NEWREC="MTEK" NEWREC=0 NEWREC=0 NEWREC=0 NEWREC=0 NEWREC=0 NEWREC="" NEWREC="30" NEWREC=OLDREC<18> NEWREC=OLDREC<19> NEWREC=OLDREC<14> NEWREC=OLDREC<13> IF NOT(SKIPFLAG) THEN WRITE NEWREC ON INV.NEW,ID 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