Compile function RDS_LAYER_Services(@Service, @Params) #pragma precomp SRP_PreCompiler $Insert SERVICE_SETUP $insert APP_INSERTS $insert RDS_LAYER_EQUATES $INSERT RECIPE_PARMS_EQU $Insert RDS_Equates Declare function Database_Services, Error_Services, SRP_JSONX, SRP_JSONX_END, SRP_JSON, Obj_Tables, Obj_Recipe Declare subroutine Error_Services, SRP_JSONX, SRP_JSONX_BEGIN, SRP_JSON, Obj_Tables, Set_Status, Database_Services GoToService Return Response or "" //----------------------------------------------------------------------------- // SERVICES //----------------------------------------------------------------------------- Service ConvertRecordToJSON(KeyID, Record, itemURL) jsonRecord = '' If KeyID NE '' then If Record EQ '' then Record = Database_Services('ReadDataRow', 'RDS_LAYER', KeyID) If Error_Services('NoError') then @DICT = Database_Services('GetTableHandle', 'DICT.RDS_LAYER') @ID = KeyID @RECORD = Record If SRP_JSON(objRDSLayer, 'New', 'Object') then SRP_JSON(objRDSLayer, 'SetValue', 'keyID', @ID) SRP_JSON(objRDSLayer, 'SetValue', 'EpiTime', OCONV(Record, 'MD1')) SRP_JSON(objRDSLayer, 'SetValue', 'DiluentAdjParam', OCONV(Record,'MD2')) SRP_JSON(objRDSLayer, 'SetValue', 'DopantFlow', OCONV(Record,'MD2')) SRP_JSON(objRDSLayer, 'SetValue', 'HCLFlow', OCONV(Record,'MD2')) SRP_JSON(objRDSLayer, 'SetValue', 'BakeTime', OCONV(Record,'[SECONDS_CONV]')) SRP_JSON(objRDSLayer, 'SetValue', 'EpiH2Flow', OCONV(Record,'MD0')) SRP_JSON(objRDSLayer, 'SetValue', 'TCSFlow', OCONV(Record, 'MD1')) SRP_JSON(objRDSLayer, 'SetValue', 'DCSFlow', OCONV(Record,'MD0')) SRP_JSON(objRDSLayer, 'SetValue', 'FOffset', OCONV(Record,'MD0')) SRP_JSON(objRDSLayer, 'SetValue', 'SOffset', OCONV(Record,'MD0')) SRP_JSON(objRDSLayer, 'SetValue', 'ROffset', OCONV(Record,'MD0')) SRP_JSON(objRDSLayer, 'SetValue', 'Etch1', OCONV(Record,'[SECONDS_CONV]')) SRP_JSON(objRDSLayer, 'SetValue', 'Etch2', OCONV(Record,'[SECONDS_CONV]')) SRP_JSON(objRDSLayer, 'SetValue', 'Etch3', OCONV(Record,'[SECONDS_CONV]')) SRP_JSON(objRDSLayer, 'SetValue', 'AUX1', OCONV(Record,'[SECONDS_CONV]')) SRP_JSON(objRDSLayer, 'SetValue', 'AUX2', OCONV(Record,'[SECONDS_CONV]')) SRP_JSON(objRDSLayer, 'SetValue', 'ULTemp', OCONV(Record,'MD0')) SRP_JSON(objRDSLayer, 'SetValue', 'SuscEtch', OCONV(Record,'MD1')) jsonRecord = SRP_JSON(objRDSLayer, 'Stringify', 'Styled') SRP_JSON(objRDSLayer, 'Release') end end end else Error_Services('Add', 'KeyID argument was missing in the ' : Service : ' service.') end Response = jsonRecord end service Service UpdateRDSLayerSpecs(RDSNo) ErrMsg = '' IF RDSNo = '' THEN Error_Services('RDSNo parameter missing from service') return end RDSLayerKeys = Xlate('RDS', RDSNo, 'RDS_LAYER_KEYS', 'X') LayerCount = DCount(RDSLayerKeys, @VM) For I = 1 to LayerCount RLKey = RDSLayerKeys<1,I> LayerSet = Field(RLKey, '*', 2) RDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', RLKey, '', '', '') IF Error_Services('NoError') then RecipeNo = RDSLayerRec WOStepKey = XLATE('RDS',RDSNo,RDS_WO_STEP_KEY$,'X') PSNId = XLATE('WO_STEP',WOStepKey,1,'X') IF INDEX(LayerSet,'L',1) THEN LayerLimits = obj_Recipe('GetLimits',RecipeNo:@RM:PSNId:@RM:LayerSet) RDSLayerRec = RecipeNo RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits RDSLayerRec = LayerLimits END Database_Services('WriteDataRow', 'RDS_LAYER', RLKey, RDSLayerRec, True$, False$, False$) end else Errmsg = Error_Services('GetMessage') end Until Errmsg NE '' Next I If ErrMsg NE '' then Error_Services('Add',ErrMsg) end service