open-insight/LSL2/STPROC/OBJ_INSTALL.txt
Infineon\StieberD 7762b129af pre cutover push
2024-09-04 20:33:41 -07:00

122 lines
3.0 KiB
Plaintext

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<I>
IF Prop = 'Company' THEN Result<I> = InstCompRec<COMP_NAME$>
IF Prop = 'Division' THEN Result<I> = InstCompRec<COMP_DIVISION$>
IF Prop = 'Address' THEN Result<I> = InstCompRec<COMP_ADDR$>
IF Prop = 'City' THEN Result<I> = InstCompRec<COMP_CITY$>
IF Prop = 'State' THEN Result<I> = InstCompRec<COMP_ST$>
IF Prop = 'ZIP' THEN Result<I> = InstCompRec<COMP_ZIP$>
IF Prop = 'Country' THEN Result<I> = InstCompRec<COMP_COUNTRY$>
IF Prop = 'Phone' THEN Result<I> = InstCompRec<COMP_PHONE$>
IF Prop = 'FAX' THEN Result<I> = InstCompRec<COMP_FAX$>
IF Prop = 'WebSite' THEN Result<I> = InstCompRec<COMP_WEB$>
IF Prop = 'Duns' THEN Result<I> = InstCompRec<COMP_DUNS$>
IF Prop = 'EMail' THEN Result<I> = InstCompRec<COMP_EMAIL$>
IF Prop = 'ColorBMP' THEN Result<I> = InstCompRec<COMP_COLOR_BMP$>
IF Prop = 'BWBMP' THEN Result<I> = InstCompRec<COMP_BW_BMP$>
IF Prop = 'ZebraGRF' THEN Result<I> = InstCompRec<COMP_ZEBRA_GRF$>
IF Prop = 'CompTitle' THEN Result<I> = InstCompRec<COMP_NAME$>:' ':InstCompRec<COMP_DIVISION$>
IF Prop = 'CSZ' THEN
Result<I> = InstCompRec<COMP_CITY$>:', ':InstCompRec<COMP_ST$>:' ':InstCompRec<COMP_ZIP$>
END
IF Prop = 'CSZC' THEN
Line = InstCompRec<COMP_CITY$>:', ':InstCompRec<COMP_ST$>:' '
Line := InstCompRec<COMP_ZIP$>:', ':InstCompRec<COMP_COUNTRY$>
Result<I> = Line
END
IF Prop = 'Phones' THEN
Line = 'Phone ':InstCompRec<COMP_PHONE$>:@VM
Line := 'FAX ':InstCompRec<COMP_FAX$>
Result<I> = Line
END
IF Prop = 'AddrLine' THEN
Line = InstCompRec<COMP_ADDR$>
SWAP @VM WITH ', ' IN Line
Result<I> = Line
END
IF Prop = 'ZIPShort' THEN
Line = InstCompRec<COMP_ZIP$>[1,'-']
Result<I> = Line
END
IF Prop = 'CompAddr' THEN
Line = InstCompRec<COMP_NAME$>:', ':InstCompRec<COMP_ADDR$>
SWAP @VM WITH ', ' IN Line
Result<I> = Line
END
NEXT I
RETURN