COMPILE ROUTINE LOAD_CUST_PART(Dummy) ROWDEF(CHARSTR) DECLARE SUBROUTINE Send_Dyn,Send_Info, Send_Dyn, Set_Status, RList, ErrMsg DECLARE FUNCTION Get_Status, Set_Printer $INSERT RDS_EQU $INSERT QUOTE_DET_EQU $INSERT ORDER_DET_EQU $INSERT QUOTE_EQU $INSERT PROD_SPEC_EQU $INSERT PART_EQUATES $INSERT CUST_PART_EQUATES EQU TARGET_ACTIVELIST$ to 5 OPEN 'PART' TO PartTable ELSE ErrMsg('Unable to open PART') GOTO Bail END OPEN 'CUST_PART' TO CustPartTable ELSE ErrMsg('Unable to open CUST_PART') GOTO Bail END OPEN 'QUOTE' TO QuoteTable ELSE Errmsg('Unable to open QUOTE') GOTO Bail END OPEN 'PROD_SPEC' TO PSNTable ELSE ErrMsg('Unable to open PROD_SPEC') GOTO Bail END SelectSent = 'SELECT PART' RList(SelectSent,TARGET_ACTIVELIST$, "", "", "") IF Get_Status(errCode) THEN ErrMsg(errCode) GOTO Bail END DEBUG RecCnt = 0 Done = 0 LOOP READNEXT PartNo ELSE Done = 1 UNTIL Done READ PartRec FROM PartTable,PartNo THEN CustNo = PartRec CustPartNo = PartRec ShipSpecNo = PartRec[-1,'B':@VM] IF CustNo NE '' AND CustPartNo NE '' THEN ProdSpecRec = XLATE('PROD_SPEC',ShipSpecNo,'','X') LOCATE CustPartNo IN ProdSpecRec USING @VM SETTING Pos THEN CustPnDesc = ProdSpecRec InboundPNo = ProdSpecRec END ELSE CustPnDesc = '' InboundPNo = '' END SpecNo = ProdSpecRec SpecDesc = ProdSpecRec SpecRev = ProdSpecRec SpecRevDt = ProdSpecRec SpecHardcopy = ProdSpecRec PartRec = '' PartRec = CustPNDesc PartRec = InboundPNo PartRec = SpecNo PartRec = SpecRev PartRec = SpecRevDt PartRec = SpecDesc PartRec = SpecHardcopy PartRec = PartNo PartRec<20> = ShipSpecNo WRITE PartRec ON CustPartTable,CustNo:'*':CustPartNo THEN RecCnt += 1 Send_Info(RecCnt:' ':CustNo:'*':CustPartNo) END END END REPEAT * * * * * * * Bail: * * * * * * * END