Enhancements to tenant calls interface for PPG.
[capital-apms-progress.git] / inc / tabledump.i
blobbc7ff942d5995639bf01cf5ffea3ba7388cec91a
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Method-Library
4 /*--------------------------------------------------------------------------
5 Library :
6 Purpose :
8 Syntax :
10 Description :
12 Author(s) :
13 Created :
14 Notes :
15 ------------------------------------------------------------------------*/
17 /* *************************** Definitions ************************** */
19 /* _UIB-CODE-BLOCK-END */
20 &ANALYZE-RESUME
23 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
25 /* ******************** Preprocessor Definitions ******************** */
29 /* _UIB-PREPROCESSOR-BLOCK-END */
30 &ANALYZE-RESUME
33 /* ************************ Function Prototypes ********************** */
35 &IF DEFINED(EXCLUDE-convert-cha) = 0 &THEN
37 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD convert-cha Method-Library
38 FUNCTION convert-cha RETURNS CHAR
39 ( INPUT in-text AS CHAR ) FORWARD.
41 /* _UIB-CODE-BLOCK-END */
42 &ANALYZE-RESUME
44 &ENDIF
46 &IF DEFINED(EXCLUDE-convert-dat) = 0 &THEN
48 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD convert-dat Method-Library
49 FUNCTION convert-dat RETURNS CHAR
50 ( INPUT in-date AS DATE ) FORWARD.
52 /* _UIB-CODE-BLOCK-END */
53 &ANALYZE-RESUME
55 &ENDIF
57 &IF DEFINED(EXCLUDE-convert-dec) = 0 &THEN
59 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD convert-dec Method-Library
60 FUNCTION convert-dec RETURNS CHAR
61 ( INPUT in-dec AS DEC ) FORWARD.
63 /* _UIB-CODE-BLOCK-END */
64 &ANALYZE-RESUME
66 &ENDIF
68 &IF DEFINED(EXCLUDE-convert-int) = 0 &THEN
70 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD convert-int Method-Library
71 FUNCTION convert-int RETURNS CHAR
72 ( INPUT in-int AS INT ) FORWARD.
74 /* _UIB-CODE-BLOCK-END */
75 &ANALYZE-RESUME
77 &ENDIF
79 &IF DEFINED(EXCLUDE-convert-log) = 0 &THEN
81 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD convert-log Method-Library
82 FUNCTION convert-log RETURNS CHARACTER
83 ( INPUT in-log AS LOGICAL ) FORWARD.
85 /* _UIB-CODE-BLOCK-END */
86 &ANALYZE-RESUME
88 &ENDIF
90 &IF DEFINED(EXCLUDE-convert-raw) = 0 &THEN
92 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD convert-raw Method-Library
93 FUNCTION convert-raw RETURNS CHAR
94 ( INPUT in-text AS RAW ) FORWARD.
96 /* _UIB-CODE-BLOCK-END */
97 &ANALYZE-RESUME
99 &ENDIF
101 &IF DEFINED(EXCLUDE-convert-rec) = 0 &THEN
103 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD convert-rec Method-Library
104 FUNCTION convert-rec RETURNS CHAR
105 ( INPUT in-int AS RECID ) FORWARD.
107 /* _UIB-CODE-BLOCK-END */
108 &ANALYZE-RESUME
110 &ENDIF
112 &IF DEFINED(EXCLUDE-convert-row) = 0 &THEN
114 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD convert-row Method-Library
115 FUNCTION convert-row RETURNS CHAR
116 ( INPUT in-int AS ROWID ) FORWARD.
118 /* _UIB-CODE-BLOCK-END */
119 &ANALYZE-RESUME
121 &ENDIF
124 /* *********************** Procedure Settings ************************ */
126 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
127 /* Settings for THIS-PROCEDURE
128 Type: Method-Library
129 Allow:
130 Frames: 0
131 Add Fields to: Neither
132 Other Settings: INCLUDE-ONLY
134 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
136 /* ************************* Create Window ************************** */
138 &ANALYZE-SUSPEND _CREATE-WINDOW
139 /* DESIGN Window definition (used by the UIB)
140 CREATE WINDOW Method-Library ASSIGN
141 HEIGHT = .67
142 WIDTH = 38.
143 /* END WINDOW DEFINITION */
145 &ANALYZE-RESUME
149 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Method-Library
150 /* ************************* Included-Libraries *********************** */
152 /* _UIB-CODE-BLOCK-END */
153 &ANALYZE-RESUME
157 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Method-Library
160 /* *************************** Main Block *************************** */
162 RUN DumpTableData.
164 /* _UIB-CODE-BLOCK-END */
165 &ANALYZE-RESUME
168 /* ************************ Function Implementations ***************** */
170 &IF DEFINED(EXCLUDE-convert-cha) = 0 &THEN
172 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION convert-cha Method-Library
173 FUNCTION convert-cha RETURNS CHAR
174 ( INPUT in-text AS CHAR ) :
175 /*------------------------------------------------------------------------------
176 Purpose: Convert a character string to a string for SQL import
177 ------------------------------------------------------------------------------*/
178 IF in-text = ? THEN RETURN "NULL".
180 in-text = REPLACE( in-text, "'", "''").
181 in-text = REPLACE( in-text, "\", "\\").
182 RETURN "'" + in-text + "'".
184 END FUNCTION.
186 /* _UIB-CODE-BLOCK-END */
187 &ANALYZE-RESUME
189 &ENDIF
191 &IF DEFINED(EXCLUDE-convert-dat) = 0 &THEN
193 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION convert-dat Method-Library
194 FUNCTION convert-dat RETURNS CHAR
195 ( INPUT in-date AS DATE ) :
196 /*------------------------------------------------------------------------------
197 Purpose: Convert a date to a string generically for SQL import
198 ------------------------------------------------------------------------------*/
199 IF in-date = ? THEN RETURN "NULL".
201 RETURN "'" + STRING(in-date, "99-99-9999") + "'".
203 END FUNCTION.
205 /* _UIB-CODE-BLOCK-END */
206 &ANALYZE-RESUME
208 &ENDIF
210 &IF DEFINED(EXCLUDE-convert-dec) = 0 &THEN
212 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION convert-dec Method-Library
213 FUNCTION convert-dec RETURNS CHAR
214 ( INPUT in-dec AS DEC ) :
215 /*------------------------------------------------------------------------------
216 Purpose: Convert a decimal to a string generically for SQL import
217 ------------------------------------------------------------------------------*/
218 IF in-dec = ? THEN RETURN "NULL".
220 RETURN RIGHT-TRIM( RIGHT-TRIM( TRIM(STRING(in-dec, "->>>>>>>>>>>>>>>9.99999999999")), "0"), ".").
222 END FUNCTION.
224 /* _UIB-CODE-BLOCK-END */
225 &ANALYZE-RESUME
227 &ENDIF
229 &IF DEFINED(EXCLUDE-convert-int) = 0 &THEN
231 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION convert-int Method-Library
232 FUNCTION convert-int RETURNS CHAR
233 ( INPUT in-int AS INT ) :
234 /*------------------------------------------------------------------------------
235 Purpose: Convert an Int to a string generically for SQL import
236 ------------------------------------------------------------------------------*/
237 IF in-int = ? THEN RETURN "NULL".
239 RETURN TRIM(STRING(in-int, "->>>>>>>>>>9")).
241 END FUNCTION.
243 /* _UIB-CODE-BLOCK-END */
244 &ANALYZE-RESUME
246 &ENDIF
248 &IF DEFINED(EXCLUDE-convert-log) = 0 &THEN
250 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION convert-log Method-Library
251 FUNCTION convert-log RETURNS CHARACTER
252 ( INPUT in-log AS LOGICAL ) :
253 /*------------------------------------------------------------------------------
254 Purpose:
255 Notes:
256 ------------------------------------------------------------------------------*/
257 IF in-log = ? THEN RETURN "NULL".
259 RETURN STRING( in-log, "TRUE/FALSE").
261 END FUNCTION.
263 /* _UIB-CODE-BLOCK-END */
264 &ANALYZE-RESUME
266 &ENDIF
268 &IF DEFINED(EXCLUDE-convert-raw) = 0 &THEN
270 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION convert-raw Method-Library
271 FUNCTION convert-raw RETURNS CHAR
272 ( INPUT in-text AS RAW ) :
273 /*------------------------------------------------------------------------------
274 Purpose: Convert a character string to a string for SQL import
275 ------------------------------------------------------------------------------*/
276 DEF VAR out-str AS CHAR NO-UNDO.
278 IF in-text = ? THEN RETURN "NULL".
280 out-str = REPLACE( STRING(in-text), "'", "''").
281 RETURN "'" + out-str + "'".
283 END FUNCTION.
285 /* _UIB-CODE-BLOCK-END */
286 &ANALYZE-RESUME
288 &ENDIF
290 &IF DEFINED(EXCLUDE-convert-rec) = 0 &THEN
292 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION convert-rec Method-Library
293 FUNCTION convert-rec RETURNS CHAR
294 ( INPUT in-int AS RECID ) :
295 /*------------------------------------------------------------------------------
296 Purpose: Convert an Int to a string generically for SQL import
297 ------------------------------------------------------------------------------*/
299 IF in-int = ? THEN RETURN "NULL".
300 RETURN TRIM(STRING(in-int)).
302 END FUNCTION.
304 /* _UIB-CODE-BLOCK-END */
305 &ANALYZE-RESUME
307 &ENDIF
309 &IF DEFINED(EXCLUDE-convert-row) = 0 &THEN
311 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION convert-row Method-Library
312 FUNCTION convert-row RETURNS CHAR
313 ( INPUT in-int AS ROWID ) :
314 /*------------------------------------------------------------------------------
315 Purpose: Convert an Int to a string generically for SQL import
316 ------------------------------------------------------------------------------*/
318 IF in-int = ? THEN RETURN "NULL".
319 RETURN TRIM(STRING(in-int)).
321 END FUNCTION.
323 /* _UIB-CODE-BLOCK-END */
324 &ANALYZE-RESUME
326 &ENDIF