Removed unnecessary code in GetRDSKeys
This commit is contained in:
@ -2064,36 +2064,28 @@ Service GetRDSKeys(WONo)
|
||||
ErrorMsg = ''
|
||||
If (WONo NE '') then
|
||||
If RowExists('WO_LOG', WONo) then
|
||||
Open 'DICT.RDS' to hDict then
|
||||
TableName = 'RDS'
|
||||
SortList = 'RUN_ORDER_NUM'
|
||||
ReduceScript = 'WITH {WO} EQ ':Quote(WONo)
|
||||
Mode = NEXT_CUR$
|
||||
Flag = ''
|
||||
Cursor = ''
|
||||
GoSub ClearCursors
|
||||
Reduce(ReduceScript, SortList, Mode, TableName, Cursor, Flag)
|
||||
If Flag then
|
||||
Select TableName by SortList using Cursor then
|
||||
Open TableName to hTable then
|
||||
EOF = False$
|
||||
Loop
|
||||
Readnext KeyId using Cursor by AT else EOF = True$
|
||||
Until EOF
|
||||
Response<0, -1> = KeyId
|
||||
Repeat
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening ':TableName:' table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error selecting ':TableName:' table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Reduce'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening DICT.RDS'
|
||||
end
|
||||
TableName = 'RDS'
|
||||
SortList = 'RUN_ORDER_NUM'
|
||||
ReduceScript = 'WITH {WO} EQ ':Quote(WONo)
|
||||
Mode = NEXT_CUR$
|
||||
Flag = ''
|
||||
Cursor = ''
|
||||
GoSub ClearCursors
|
||||
Reduce(ReduceScript, SortList, Mode, TableName, Cursor, Flag)
|
||||
If Flag then
|
||||
Select TableName by SortList using Cursor then
|
||||
EOF = False$
|
||||
Loop
|
||||
Readnext KeyId using Cursor by AT else EOF = True$
|
||||
Until EOF
|
||||
Response<0, -1> = KeyId
|
||||
Repeat
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error selecting ':TableName:' table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Reduce'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. WO_LOG ':WONo:' does not exist.'
|
||||
end
|
||||
@ -2449,3 +2441,4 @@ ClearCursors:
|
||||
Next counter
|
||||
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user