From 487246af4679c02d2fe3c58502b2450b991037d6 Mon Sep 17 00:00:00 2001 From: "Infineon\\StieberD" Date: Fri, 12 Sep 2025 11:32:07 -0700 Subject: [PATCH] Removed unnecessary code in GetRDSKeys --- LSL2/STPROC/RDS_SERVICES.txt | 53 ++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/LSL2/STPROC/RDS_SERVICES.txt b/LSL2/STPROC/RDS_SERVICES.txt index bbbc533..43a1a1f 100644 --- a/LSL2/STPROC/RDS_SERVICES.txt +++ b/LSL2/STPROC/RDS_SERVICES.txt @@ -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 +