added LSL2 stored procedures
This commit is contained in:
71
LSL2/STPROC/LOAD_PART.txt
Normal file
71
LSL2/STPROC/LOAD_PART.txt
Normal file
@ -0,0 +1,71 @@
|
||||
COMPILE ROUTINE LOAD_PART(Dummy)
|
||||
ROWDEF(CHARSTR)
|
||||
|
||||
DECLARE SUBROUTINE Send_Dyn,Send_Info, Send_Dyn, Set_Status, RList, ErrMsg, obj_Part
|
||||
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 PART_WORK_EQUATES
|
||||
|
||||
EQU TARGET_ACTIVELIST$ to 5
|
||||
|
||||
OPEN 'ORDER_DET' TO OrdDetTable ELSE
|
||||
ErrMsg('Unable to open PART')
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
OPEN 'PART' TO PartTable ELSE
|
||||
ErrMsg('Unable to open PART')
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
|
||||
OPEN 'PART_WORK' TO PartWorkTable ELSE
|
||||
ErrMsg('Unable to open PART_WORK')
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
|
||||
SelectSent = 'SELECT ORDER_DET'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$, "", "", "")
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
GOTO Bail
|
||||
END
|
||||
|
||||
DEBUG
|
||||
|
||||
RecCnt = 0
|
||||
Done = 0
|
||||
|
||||
LOOP
|
||||
READNEXT OrdDetKey ELSE Done = 1
|
||||
UNTIL Done
|
||||
READ OrdDetRec FROM OrdDetTable,OrdDetKey THEN
|
||||
|
||||
Set_Status(0)
|
||||
obj_Part('Convert',OrdDetKey:@RM:OrdDetRec)
|
||||
IF Get_Status(errCode) THEN DEBUG
|
||||
RecCnt += 1
|
||||
Send_Info(RecCnt)
|
||||
END ;* End of OrderDetRec Read
|
||||
REPEAT
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
Bail:
|
||||
* * * * * * *
|
||||
|
||||
END
|
Reference in New Issue
Block a user