Compile function RDS_LAYER_Services(@Service, @Params) #pragma precomp SRP_PreCompiler $insert LOGICAL $insert RDS_LAYER_EQUATES $INSERT RECIPE_PARMS_EQU 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 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 * SRP_JsonX_Begin('rdslayer', '{') * SRP_JsonX('keyId',@ID) * SRP_JsonX('EpiTime', OCONV(Record, 'MD1')) * SRP_JsonX('DiluentAdjParam', OCONV(Record,'MD2')) * SRP_JsonX('DopantFlow', OCONV(Record,'MD2')) * SRP_JsonX('HCLFlow', OCONV(Record,'MD2')) * SRP_JsonX('BakeTime', OCONV(Record,'[SECONDS_CONV]')) * SRP_JsonX('EpiH2Flow', OCONV(Record,'MD0')) * SRP_JsonX('TCSFlow', OCONV(Record, 'MD1')) * SRP_JsonX('DCSFlow', OCONV(Record,'MD0')) * SRP_JsonX('FOffset', OCONV(Record,'MD0')) * SRP_JsonX('SOffset', OCONV(Record,'MD0')) * SRP_JsonX('ROffset', OCONV(Record,'MD0')) * SRP_JsonX('Etch1', OCONV(Record,'[SECONDS_CONV]')) * SRP_JsonX('Etch2', OCONV(Record,'[SECONDS_CONV]')) * SRP_JsonX('Etch3', OCONV(Record,'[SECONDS_CONV]')) * SRP_JsonX('AUX1', OCONV(Record,'[SECONDS_CONV]')) * SRP_JsonX('AUX2', OCONV(Record,'[SECONDS_CONV]')) * SRP_JsonX('ULTemp', OCONV(Record,'MD0')) * SRP_JsonX('SuscEtch', OCONV(Record,'MD1')) * jsonRecord = SRP_JsonX_End('Pretty') end end else Error_Services('Add', 'KeyID argument was missing in the ' : Service : ' service.') end Response = jsonRecord end service Service UpdateRDSLayerSpecs(RDSNo) IF RDSNo = '' THEN Error_Services('RDSNo parameter missing from service') return end RDSLayerKeys = Xlate('RDS', RDSNo, 'RDS_LAYER_KEYS', 'X') LayerCount = DCount(RDSLayerKeys, @FM) For I = 1 to LayerCount RLKey = RDSLayerKeys LayerSet = Field(RLKey, '*', 2) Set_Status(0) RLParms = 'RDS_LAYER':@RM:RLKey RDSLayerRec = obj_Tables('ReadOnlyRec',RLParms) IF Get_Status(errCode) THEN Error_Services('Add', errCode) RETURN END 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 RLParms = FieldStore(RLParms, @RM, 4, 1, RDSLayerRec) obj_Tables('WriteOnlyRec',RLParms) Next I end service