COMPILE FUNCTION obj_Install(Method,Parms) /* Methods for displaying Installation information 07/17/2003 JCH - Initial Coding Properties: Methods: Get_Prop(PropName) ;* Values to be printed @FM delimited (see Lables insert) */ DECLARE FUNCTION Get_Status, Msg DECLARE FUNCTION Utility DECLARE SUBROUTINE Set_Status, Msg $INSERT MSG_EQUATES $INSERT LABELS $INSERT COMPANY_CFG_EQU ErrTitle = 'Error in Stored Procedure "obj_Install"' ErrorMsg = '' IF NOT(ASSIGNED(Method)) THEN ErrorMsg = 'Unassigned parameter "Method" passed to subroutine' IF NOT(ASSIGNED(Parms)) THEN Parms = '' IF ErrorMsg NE '' THEN Set_Status(-1,ErrTitle:@SVM:ErrorMsg) RETURN '' END Methods = 'Get_Prop' Result = '' BEGIN CASE CASE Method = 'Get_Prop' ; GOSUB Get_Prop END CASE IF ErrorMsg NE '' THEN Set_Status(-1,ErrTitle:@SVM:ErrorMsg) RETURN '' END RETURN Result * * * * * * * Get_Prop: * * * * * * * Props = Parms[1,@RM] IF Props = '' THEN RETURN InstCompRec = XLATE('CONFIG','COMPANY','','X') FOR I = 1 TO COUNT(Props,@FM) + (Props NE '') Prop = Props IF Prop = 'Company' THEN Result = InstCompRec IF Prop = 'Division' THEN Result = InstCompRec IF Prop = 'Address' THEN Result = InstCompRec IF Prop = 'City' THEN Result = InstCompRec IF Prop = 'State' THEN Result = InstCompRec IF Prop = 'ZIP' THEN Result = InstCompRec IF Prop = 'Country' THEN Result = InstCompRec IF Prop = 'Phone' THEN Result = InstCompRec IF Prop = 'FAX' THEN Result = InstCompRec IF Prop = 'WebSite' THEN Result = InstCompRec IF Prop = 'Duns' THEN Result = InstCompRec IF Prop = 'EMail' THEN Result = InstCompRec IF Prop = 'ColorBMP' THEN Result = InstCompRec IF Prop = 'BWBMP' THEN Result = InstCompRec IF Prop = 'ZebraGRF' THEN Result = InstCompRec IF Prop = 'CompTitle' THEN Result = InstCompRec:' ':InstCompRec IF Prop = 'CSZ' THEN Result = InstCompRec:', ':InstCompRec:' ':InstCompRec END IF Prop = 'CSZC' THEN Line = InstCompRec:', ':InstCompRec:' ' Line := InstCompRec:', ':InstCompRec Result = Line END IF Prop = 'Phones' THEN Line = 'Phone ':InstCompRec:@VM Line := 'FAX ':InstCompRec Result = Line END IF Prop = 'AddrLine' THEN Line = InstCompRec SWAP @VM WITH ', ' IN Line Result = Line END IF Prop = 'ZIPShort' THEN Line = InstCompRec[1,'-'] Result = Line END IF Prop = 'CompAddr' THEN Line = InstCompRec:', ':InstCompRec SWAP @VM WITH ', ' IN Line Result = Line END NEXT I RETURN