1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r11
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 ------------------------------------------------------------------------*/
7 DEF INPUT PARAMETER freq-code
LIKE FrequencyType.FrequencyCode
NO-UNDO.
8 DEF OUTPUT PARAMETER fraction
AS DEC NO-UNDO.
10 /* _UIB-CODE-BLOCK-END
*/
14 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
16 /* ******************** Preprocessor Definitions
******************** */
18 &Scoped-define PROCEDURE-TYPE Procedure
22 /* _UIB-PREPROCESSOR-BLOCK-END
*/
27 /* *********************** Procedure Settings
************************ */
29 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
30 /* Settings for
THIS-PROCEDURE
34 Add Fields to
: Neither
35 Other Settings
: CODE-ONLY
COMPILE
37 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
39 /* ************************* Create Window
************************** */
41 &ANALYZE-SUSPEND _CREATE-WINDOW
42 /* DESIGN Window definition
(used by the UIB
)
43 CREATE WINDOW Procedure
ASSIGN
52 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
55 /* *************************** Main Block
*************************** */
57 FIND FrequencyType
WHERE FrequencyType.FrequencyCode
= freq-code
60 IF NOT AVAILABLE FrequencyType
THEN RETURN.
62 fraction
= Frequencytype.UnitCount
*
63 IF RepeatUnits
= "DAYS" THEN ( 1 / 365 ) ELSE
64 IF RepeatUnits
= "WEEKS" THEN ( 7 / 365 ) ELSE
65 IF RepeatUnits
= "MONTHS" THEN ( 1 / 12 ) ELSE
66 IF RepeatUnits
= "YEARS" THEN 1 ELSE 0.
68 /* _UIB-CODE-BLOCK-END
*/