Subroutine TEST4(Param1, Param2, Param3)
#pragma precomp SRP_PreCompiler

DECLARE SUBROUTINE  SEND_INFO, SEND_DYN, Utility, RList, Btree.Extract, msg, ErrMsg,Security_Err_Msg, Set_FSError, obj_Tables, Create_Table, Logging_Services, PrintSetup
DECLARE SUBROUTINE  obj_React_Run,obj_React_Run_CI,obj_RDS_Test, obj_RDS_Layer, Set_Status, BTREE.READ, obj_Post_Log, REACT_RUN_RDS, Reactor_Services, SRP_TcpClient, FTP_Services, Print_Shipment_Dev
DECLARE SUBROUTINE  Extract_SI_Keys, Btree.Extract, Set_List_Box_Data, Print_Shipment, Database_Services, Activate_Save_Select, GetTempPath, obj_Export, obj_WO_Mat, Messaging_Services, SRP_Stopwatch
DECLARE FUNCTION    obj_Popup, Dialog_Box, obj_Install, FindWindow, Security_Check, obj_rds2, obj_Tables, Get_Status, obj_ICAR, obj_Recipe, obj_JCH_Log, Min, Max, obj_Export, obj_Prod_spec
Declare function    Database_Services, Error_Services, RTI_Task_Submit, RTI_Task_Status, RTI_CreateGUID, Environment_Services, Logging_Services, MCP, PrintSetup, FTP_Services, SRP_Encode, RTI_Task_Status
Declare function    SRP_Trim, SRPLogonAPI_ValidateUser, Obj_Calendar, RTI_LH_Info, SRP_TcpClient, Date_Services, obj_WM_In, SRP_Path, RTI_IsMember, RTI_LDAP_Groups_For_User, RTI_LDAP_Groups_For_User_RTI, RTI_Task_Submit
Declare function    SQL_Services, Get_App_Info, HTTPClient_Services, NextKey
Declare subroutine  SQL_Services, Add_Repos_App, HTTPClient_Services, obj_SAP,sap_services

$INSERT LOGICAL
$INSERT SEC_GROUPS_EQU
$INSERT RDS_EQU
$INSERT WO_LOG_EQU
$INSERT WO_MAT_EQUATES
$INSERT WO_STEP_EQUATES
$INSERT WM_OUT_EQUATES
$Insert COC_EQUATES
$INSERT QUOTE_SPEC_EQU
$INSERT PROD_SPEC_EQU
$INSERT RDS_TEST_EQUATES
$INSERT RDS_LAYER_EQUATES
$INSERT REACT_RUN_EQUATES
$INSERT REACT_MODE_EQUATES
$INSERT POPUP_EQUATES
$INSERT SECURITY_RIGHTS_EQU
$INSERT CLEAN_INSP_EQUATES
$insert RTI_LH_INFO_EQUATES
$insert PRINTSETUP_EQUATES
$insert REPOSITORY_EQUATES


// Code to massage data in the PROD_SPEC.SPEC_SPI column.
Open 'PROD_SPEC' to hProdSpec then
    RList('SELECT PROD_SPEC', 5, '', '', '')
*    call Make.List(0, 4962, '', '')
*    call Make.List(0, 5011, '', '')
    EOF     = False$
    Loop
        ReadNext KeyID else EOF = True$
    Until EOF EQ True$
        Locate KeyID in '4962,5011,5012' using ',' setting cPos else
            Read Record from hProdSpec, KeyID then
                SpecEPI     = Record<15>
                NumLayers   = DCount(SpecEPI, Char(248))
                For LayerCnt = 1 to NumLayers
                    LayerData   = Field(SpecEPI, Char(248), LayerCnt, 1)
                    ThickMin    = LayerData<0, 7>
                    ThickMax    = LayerData<0, 8>
                    ThickMin   := 0
                    ThickMax   := 0
                    LayerData<0, 7> = ThickMin
                    LayerData<0, 8> = ThickMax
                    SpecEPI         = FieldStore(SpecEPI, Char(248), LayerCnt, 1, LayerData)
                Next LayerCnt
                Record<15>  = SpecEPI
                Write Record to hProdSpec, KeyID else
                    
                end
            end else
                
            end
        end
    Repeat
end
