Function Test_Dakota(Param1)
#pragma precomp SRP_PreCompiler

Declare subroutine Set_Property,  Set_Status, ErrMsg, Set_Property, obj_AppWindow, Send_Message, Logging_Services
Declare subroutine Btree.Extract, Send_Event, Security_Err_Msg, Forward_Event, End_Window, Start_Window, FTP_Services
Declare subroutine EditCell, obj_NCR, obj_Notes, Post_Event, obj_WO_Mat, obj_WO_Mat_Log, obj_WO_Wfr, obj_Tables, obj_RDS
Declare subroutine Error_Services, RDS_Services, Dialog_Box, Insert, Unlock, QA_Services, Validate, Development_Services
Declare subroutine Update_Index, Database_Services, Obj_WO_Mat_QA, Fmt, Yield, WinYield, Sleepery, Qa_Services, 
Declare subroutine Obj_Post_Log, GaN_Services, Excel_Services, obj_WO_React, Activate_Save_Select, Reduce, FSMsg
Declare subroutine SRP_Stopwatch, Copy_Record_To_SQL, SQL_Services, Material_Services, Messaging_Services
Declare subroutine Reactor_Services, Reactor_Services_Dev, SRP_Stopwatch, Btree.Extract, Set_Env, RDS_React_Run
Declare subroutine obj_Prod_Spec, Security_Services, Make.List, Write_OI_To_SQL, Send_Info, PSN_Services, Free_Class.Net
Declare subroutine Work_Order_Services, Test_Daniel2, obj_RDS_Layer, Report_Services, Pass_To_Sql, SRP_JSON, SRP_Run_Command
Declare subroutine Httpclient_Services, SRP_TcpClient, RTI_Set_Debugger, Sleepery, Set_Env, Extract_SI_Keys, Repository
Declare function   Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists, Utility
Declare function   Dialog_Box, obj_WO_Log, obj_NCR, Check_Notes, obj_MUWafers, obj_WO_Mat, Error_Services, RDS_Services
Declare function   MemberOf, obj_Tables, obj_RDS, Environment_Services, Logging_Services, Material_Services, ErrMsg
Declare function   Work_Order_Services, RetStack, Min, Max, Obj_Prod_Spec, Insert, SRP_Trim, Xlate, Obj_Wo_Mat
Declare function   Security_Services, QA_Services, Database_Services, RowExists, Rti_Lh_Info, UNICODE_ANSI, UNICODE_UTF8
Declare function   index, Httpclient_Services, SRP_Encode, SRP_Decode, DirList, Obj_Rds_Test, Tool_Parms_Services
Declare function   SQL_Services, RDS_Services, Obj_WM_out, Schedule_Services, Obj_Tool, SRP_Sort_Array, ICONV
Declare function   Development_Services, Obj_WO_Mat_QA, SRP_Join_Arrays, NextKey, Obj_Prod_Spec, FTP_Services, SQL_Format
Declare function   DateTime, GaN_Services, SRP_Array, Excel_Services, EpiPro_Services, Repository, RTI_Task_Submit
Declare function   RTI_Task_Status, Rds_Services, StartDotNet, Reactor_Services, SRP_Get_FileVersion, Direct_Print
Declare function   obj_React_Run, RTI_Lock_Owner, obj_WM_In, Get_Repos_Entities, Get_Printer, Schedule_Services
Declare function   Location_Services, Replication_Services, SRP_Logon, List_User_Locks, Start_Window, SRP_JSON
Declare function   Httpclient_Services, SRP_TcpClient, GetTickCount, Repository, Select_Into, SQL_services_New, Database_Services

$INSERT LOGICAL
* $Insert RLIST_EQUATES
* $INSERT ENVIRON_CONSTANTS
* $Insert REVCAPI_EQUATES
* $INSERT MSG_EQUATES
* $INSERT APPCOLORS
* $INSERT WM_IN_EQUATES
* $Insert WM_OUT_EQUATES
* $INSERT WO_LOG_EQU
* $INSERT WO_STEP_EQU
$INSERT WO_MAT_EQUATES
* $INSERT ORDER_EQU
* $INSERT RDS_EQUATES
* $INSERT PROD_SPEC_EQU
* $INSERT NOTIFICATION_EQU
* $INSERT LSL_USERS_EQU
* $INSERT SECURITY_RIGHTS_EQU
* $INSERT POPUP_EQUATES
* $INSERT RTI_LH_INFO_EQUATES
* $INSERT WO_MAT_QA_EQUATES
* $INSERT CUST_EPI_PART_EQUATES
* $INSERT PRS_STAGE_EQUATES
* $Insert RLIST_EQUATES
* $Insert CLEAN_INSP_EQUATES
* $Insert TOOL_PARMS_EQUATES
* $Insert SCHEDULE_EQU
* $Insert SCHED_DET_EQUATES
* $Insert SCHEDULER_EQUATES
* $Insert NCR_EQUATES
* $Insert REACT_RUN_EQUATES
* $Insert TOOL_EQUATES
* $Insert TOOL_LOG_EQUATES
* $Insert PM_EQUATES
* $Insert WO_WFR_EQUATES
* $Insert REVDOTNETEQUATES
* $Insert REACTOR_EQUATES
* $Insert RDS_TEST_EQUATES
* $Insert RUN_STAGE_WFR_EQUATES
* $Insert RTI_DEBUG_COMMON
* $Insert DICT_EQUATES
* $Insert SRPMAIL_INSERTS
* $Insert SCHED_DET_NG_EQUATES
* $Insert RDS_LAYER_EQUATES
* $Insert PROD_VER_EQUATES
* $Insert PM_SPEC_EQUATES
* // 02/22/2023 48312 50112 ; // 5 hours = 14400 seconds
* // Reduce modes (for Select statement)
* Equ NEW_EXIST$ To 0 
* Equ NEXT_CUR$  To 1
* Equ ADD_EXIST$ To 2   
* 
* EQU COL$QA_MET_PHASE_MIN TO 17
* 
Equ Tab$                    to \09\
Equ CRLF$                   to \0D0A\
Equ LF$                     to \0A\
Equ Comma$                  to ','
* 
* $INSERT PRINTSETUP_EQUATES
* equ REV_CREATE_ENGINE_NO_UI$ to 0x040

Main:
    Debug
    Locks = Database_Services('GetUserLocks')
    Result = Database_Services('UnlockKeyID', 'RDS', '456789')
    Debug
return
    
*     LockList = Database_Services('GetUserLocks')
*    debug
*    If Error_Services('NoError') then
*        ResponseJSON = ''
*        If SRP_JSON(objJSON, 'New', 'Object') then
*            If SRP_JSON(objReactArray, 'New', 'Array') then
*                For each Row in LockList using @FM setting fPos
*                        If SRP_JSON(objRow, 'New', 'Object') then
*                            SRP_JSON(objRow, 'SetValue', 'ComputerName', Row<0, 1>)
*                            SRP_JSON(objRow, 'SetValue', 'Volume', Row<0, 2>)
*                            SRP_JSON(objRow, 'SetValue', 'Table', Row<0, 3>)
*                            SRP_JSON(objRow, 'SetValue', 'RecordKey', Row<0, 4>)
*                            SRP_JSON(objRow, 'SetValue', 'Exclusive', Row<0, 5>)
*                            SRP_JSON(objRow, 'SetValue', 'OSTableFile', Row<0, 6>)
*                            SRP_JSON(objReactArray, 'Add', objRow)
*                            SRP_JSON(objRow, 'Release')
*                        end
*                Next Row
*                SRP_JSON(objJSON, 'Set', 'Report', objReactArray)
*                SRP_JSON(objReactArray, 'Release')
*            end
*            LockJSON = SRP_JSON(objJSON, 'Stringify', 'Styled')
*            SRP_JSON(objJSON, 'Release')
*        end
*        
*    end
*    
*    J = 5000
*    NamePrefix = 'DJM'
*    Table = 'RDS'
*        
*       
*    For I = 0 to 6000
*        //If I = J then debug
*        //debug
*        RecName = NamePrefix : I
*        NewRec = @FM: 20 :@FM
*        Result = Database_Services("WriteDataRow", Table, RecName, NewRec, 1, 0, 1)
*        Test = Xlate(Table, RecName, '','X', '')
*        If Test = '' then debug
*    Next I
    
return


////////////For Testing memory leak////////////////////////////
*    Free_Class.Net()
*    
*    J = 2500
*     *J = 500
*    
*    For I = 0 to 10000
*    	Result = SQL_Services('PostSQLRequest', 'SPC', 'SELECT * FROM RDS')
*        If I = J then debug
*        Result = ''
*        //debug
*        
*    	Result = SQL_Services('GetDataRows', 'SPC', 'SELECT TOP (10) * FROM [LSL2SQL].[dbo].[RDS]', 1)
*    	ConnString = Environment_Services("GetSQLScrapeConnectionString")
*        //Set_Property('CLIPBOARD', 'TEXT', ConnString)
*    	QueryString = 'SELECT [key],[col1],[col2] FROM [LSL2SQL].[dbo].[OI_TESTING] '
*    	QueryString := 'USE [LSL2SQL] GO INSERT INTO [dbo].[OI_TESTING]([key],[col1],[col2])VALUES(<key, int,>,<col1, varchar(max),>,<col2, varchar(max),>) GO'
*    	
*    	Obj = Sql_Services("GetConnectionObject", "Scrape DB Test", 1, ConnString)
*    	//SQL_Services('PostSQLStatement', 'Scrape DB Test', QueryString)
*        //Res = Sql_Services("PostSQLRequest", "Scrape DB Test", QueryString)
*    	//Result = SQL_Services("ProcessSQLRequests")
*    	If Result = '' then debug
*    	//Free_Class.Net()
*    	SQL_Services('ExecuteQuery', 
*    	Groups = SRP_Logon('GetADGroups', 'StieberD', 'Infineon')
*    	
*    Next I
*    debug
/////////////////////////////////////////////////////////////////


