-
Notifications
You must be signed in to change notification settings - Fork 23
/
getDummyScheme.p
68 lines (52 loc) · 1.63 KB
/
getDummyScheme.p
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*------------------------------------------------------------------------
Name: getDummyScheme.p
Desc: Generate some dummy data for testing generate procedures
----------------------------------------------------------------------*/
{ DataDigger.i }
DEFINE OUTPUT PARAMETER TABLE FOR ttField.
DEFINE OUTPUT PARAMETER TABLE FOR ttIndex.
RUN createFields.
RUN createIndexes.
PROCEDURE createFields:
CREATE ttField.
ASSIGN
ttField.cFieldName = 'rep-nr'
ttField.lShow = TRUE
ttField.cDataType = 'INTEGER'
ttField.cFormat = '>>>9'
ttField.cLabel = 'Rep nr'.
CREATE ttField.
ASSIGN
ttField.cFieldName = 'rep-name'
ttField.lShow = TRUE
ttField.cDataType = 'CHARACTER'
ttField.cFormat = 'x(30)'
ttField.cLabel = 'Rep name'.
CREATE ttField.
ASSIGN
ttField.cFieldName = 'region'
ttField.lShow = FALSE
ttField.cDataType = 'CHARACTER'
ttField.cFormat = 'x(8)'
ttField.cLabel = 'Region'.
CREATE ttField.
ASSIGN
ttField.cFieldName = 'month-quota'
ttField.lShow = FALSE
ttField.cDataType = 'INTEGER'
ttField.cFormat = '->,>>>,>>9'
ttField.cLabel = 'Rep name'
ttField.iExtent = 12.
END PROCEDURE. /* createFields */
PROCEDURE createIndexes:
CREATE ttIndex.
ASSIGN
ttIndex.cIndexName = 'iPrim'
ttIndex.cIndexFlags = 'P U'
ttIndex.cFieldList = 'rep-nr'.
CREATE ttIndex.
ASSIGN
ttIndex.cIndexName = 'iRegion'
ttIndex.cIndexFlags = ''
ttIndex.cFieldList = 'region,rep-name'.
END PROCEDURE. /* createIndexes */