84: -- just leave lines allocated, but start count over.
85: DebugLineCount := 0;
86: debug_msg('debug list reset!');
87: if DebugOn then
88: hr_utility.trace(' Debug is currently on');
89: else
90: hr_utility.trace(' Debug is currently off');
91: end if;
92:
86: debug_msg('debug list reset!');
87: if DebugOn then
88: hr_utility.trace(' Debug is currently on');
89: else
90: hr_utility.trace(' Debug is currently off');
91: end if;
92:
93: END;
94:
102: l_end_line NUMBER;
103: l_tmp_line VARCHAR2(120);
104: BEGIN
105:
106: hr_utility.trace('');
107: hr_utility.trace('');
108: if DebugLineCount = 0 then
109: hr_utility.trace('DEBUG DUMP: no lines to dump');
110: if DebugOn then
103: l_tmp_line VARCHAR2(120);
104: BEGIN
105:
106: hr_utility.trace('');
107: hr_utility.trace('');
108: if DebugLineCount = 0 then
109: hr_utility.trace('DEBUG DUMP: no lines to dump');
110: if DebugOn then
111: hr_utility.trace(' Debug is currently on');
105:
106: hr_utility.trace('');
107: hr_utility.trace('');
108: if DebugLineCount = 0 then
109: hr_utility.trace('DEBUG DUMP: no lines to dump');
110: if DebugOn then
111: hr_utility.trace(' Debug is currently on');
112: else
113: hr_utility.trace(' Debug is currently off');
107: hr_utility.trace('');
108: if DebugLineCount = 0 then
109: hr_utility.trace('DEBUG DUMP: no lines to dump');
110: if DebugOn then
111: hr_utility.trace(' Debug is currently on');
112: else
113: hr_utility.trace(' Debug is currently off');
114: end if;
115: hr_utility.trace('');
109: hr_utility.trace('DEBUG DUMP: no lines to dump');
110: if DebugOn then
111: hr_utility.trace(' Debug is currently on');
112: else
113: hr_utility.trace(' Debug is currently off');
114: end if;
115: hr_utility.trace('');
116: hr_utility.trace('');
117: return;
111: hr_utility.trace(' Debug is currently on');
112: else
113: hr_utility.trace(' Debug is currently off');
114: end if;
115: hr_utility.trace('');
116: hr_utility.trace('');
117: return;
118: end if;
119:
112: else
113: hr_utility.trace(' Debug is currently off');
114: end if;
115: hr_utility.trace('');
116: hr_utility.trace('');
117: return;
118: end if;
119:
120: l_start_line := p_start_line;
121: l_end_line := p_end_line;
122:
123: if l_start_line < 0 then
124: l_start_line := 0;
125: hr_utility.trace('start line negative: ' ||
126: p_start_line || ', using 0.');
127: end if;
128:
129: if l_start_line > DebugLineCount then
127: end if;
128:
129: if l_start_line > DebugLineCount then
130: l_start_line := 0;
131: hr_utility.trace('start line too high: ' ||
132: p_start_line || ', using 0.');
133: end if;
134:
135: if l_end_line >= DebugLineCount then
133: end if;
134:
135: if l_end_line >= DebugLineCount then
136: l_end_line := (DebugLineCount - 1);
137: hr_utility.trace('end line too high: ' ||
138: p_end_line || ', using end of list: ' ||
139: l_end_line);
140: end if;
141:
140: end if;
141:
142: if l_end_line < l_start_line then
143: l_end_line := (l_start_line + 1);
144: hr_utility.trace('end line lower than start line: ' ||
145: p_end_line ||
146: ', using start line + 1: ' ||
147: l_end_line);
148: end if;
146: ', using start line + 1: ' ||
147: l_end_line);
148: end if;
149:
150: hr_utility.trace('DEBUG DUMP: lines: ' ||
151: l_start_line ||
152: ' to ' ||
153: l_end_line);
154: if DebugOn then
151: l_start_line ||
152: ' to ' ||
153: l_end_line);
154: if DebugOn then
155: hr_utility.trace(' Debug is currently on');
156: else
157: hr_utility.trace(' Debug is currently off');
158: end if;
159:
153: l_end_line);
154: if DebugOn then
155: hr_utility.trace(' Debug is currently on');
156: else
157: hr_utility.trace(' Debug is currently off');
158: end if;
159:
160: FOR l_current_line in l_start_line .. l_end_line LOOP
161: begin
159:
160: FOR l_current_line in l_start_line .. l_end_line LOOP
161: begin
162: l_tmp_line := DebugList(l_current_line);
163: hr_utility.trace(l_current_line ||
164: ': ' ||
165: rtrim(l_tmp_line));
166: exception
167: when no_data_found then
164: ': ' ||
165: rtrim(l_tmp_line));
166: exception
167: when no_data_found then
168: hr_utility.trace('Error retrieving debug line!');
169: return;
170: end;
171: END LOOP;
172:
169: return;
170: end;
171: END LOOP;
172:
173: hr_utility.trace('');
174: hr_utility.trace('');
175: hr_utility.trace('END OF DEBUG DUMP');
176: hr_utility.trace('');
177: hr_utility.trace('');
170: end;
171: END LOOP;
172:
173: hr_utility.trace('');
174: hr_utility.trace('');
175: hr_utility.trace('END OF DEBUG DUMP');
176: hr_utility.trace('');
177: hr_utility.trace('');
178:
171: END LOOP;
172:
173: hr_utility.trace('');
174: hr_utility.trace('');
175: hr_utility.trace('END OF DEBUG DUMP');
176: hr_utility.trace('');
177: hr_utility.trace('');
178:
179: END;
172:
173: hr_utility.trace('');
174: hr_utility.trace('');
175: hr_utility.trace('END OF DEBUG DUMP');
176: hr_utility.trace('');
177: hr_utility.trace('');
178:
179: END;
180:
173: hr_utility.trace('');
174: hr_utility.trace('');
175: hr_utility.trace('END OF DEBUG DUMP');
176: hr_utility.trace('');
177: hr_utility.trace('');
178:
179: END;
180:
181: --------------------------------------------------------------------------------
199: l_end_line NUMBER;
200: l_tmp_line VARCHAR2(120);
201: BEGIN
202:
203: hr_utility.trace('');
204: hr_utility.trace('');
205: if DebugLineCount = 0 then
206: hr_utility.trace('DEBUG DUMP LIKE: no lines to dump');
207: if DebugOn then
200: l_tmp_line VARCHAR2(120);
201: BEGIN
202:
203: hr_utility.trace('');
204: hr_utility.trace('');
205: if DebugLineCount = 0 then
206: hr_utility.trace('DEBUG DUMP LIKE: no lines to dump');
207: if DebugOn then
208: hr_utility.trace(' Debug is currently on');
202:
203: hr_utility.trace('');
204: hr_utility.trace('');
205: if DebugLineCount = 0 then
206: hr_utility.trace('DEBUG DUMP LIKE: no lines to dump');
207: if DebugOn then
208: hr_utility.trace(' Debug is currently on');
209: else
210: hr_utility.trace(' Debug is currently off');
204: hr_utility.trace('');
205: if DebugLineCount = 0 then
206: hr_utility.trace('DEBUG DUMP LIKE: no lines to dump');
207: if DebugOn then
208: hr_utility.trace(' Debug is currently on');
209: else
210: hr_utility.trace(' Debug is currently off');
211: end if;
212: hr_utility.trace('');
206: hr_utility.trace('DEBUG DUMP LIKE: no lines to dump');
207: if DebugOn then
208: hr_utility.trace(' Debug is currently on');
209: else
210: hr_utility.trace(' Debug is currently off');
211: end if;
212: hr_utility.trace('');
213: hr_utility.trace('');
214: return;
208: hr_utility.trace(' Debug is currently on');
209: else
210: hr_utility.trace(' Debug is currently off');
211: end if;
212: hr_utility.trace('');
213: hr_utility.trace('');
214: return;
215: end if;
216:
209: else
210: hr_utility.trace(' Debug is currently off');
211: end if;
212: hr_utility.trace('');
213: hr_utility.trace('');
214: return;
215: end if;
216:
217: l_start_line := 0;
220: if l_end_line < l_start_line then
221: l_end_line := (l_start_line + 1);
222: end if;
223:
224: hr_utility.trace('DEBUG DUMP LINES LIKE: ' || p_string_like);
225: if DebugOn then
226: hr_utility.trace(' Debug is currently on');
227: else
228: hr_utility.trace(' Debug is currently off');
222: end if;
223:
224: hr_utility.trace('DEBUG DUMP LINES LIKE: ' || p_string_like);
225: if DebugOn then
226: hr_utility.trace(' Debug is currently on');
227: else
228: hr_utility.trace(' Debug is currently off');
229: end if;
230:
224: hr_utility.trace('DEBUG DUMP LINES LIKE: ' || p_string_like);
225: if DebugOn then
226: hr_utility.trace(' Debug is currently on');
227: else
228: hr_utility.trace(' Debug is currently off');
229: end if;
230:
231: FOR l_current_line in l_start_line .. l_end_line LOOP
232: begin
231: FOR l_current_line in l_start_line .. l_end_line LOOP
232: begin
233: l_tmp_line := DebugList(l_current_line);
234: if l_tmp_line like ('%' || p_string_like || '%') then
235: hr_utility.trace(l_current_line || ': ' ||
236: rtrim(l_tmp_line));
237: end if;
238: exception
239: when no_data_found then
236: rtrim(l_tmp_line));
237: end if;
238: exception
239: when no_data_found then
240: hr_utility.trace('Error retrieving debug line!');
241: return;
242: end;
243: END LOOP;
244:
241: return;
242: end;
243: END LOOP;
244:
245: hr_utility.trace('');
246: hr_utility.trace('');
247: hr_utility.trace('END OF DEBUG DUMP LIKE');
248: hr_utility.trace('');
249: hr_utility.trace('');
242: end;
243: END LOOP;
244:
245: hr_utility.trace('');
246: hr_utility.trace('');
247: hr_utility.trace('END OF DEBUG DUMP LIKE');
248: hr_utility.trace('');
249: hr_utility.trace('');
250:
243: END LOOP;
244:
245: hr_utility.trace('');
246: hr_utility.trace('');
247: hr_utility.trace('END OF DEBUG DUMP LIKE');
248: hr_utility.trace('');
249: hr_utility.trace('');
250:
251: END;
244:
245: hr_utility.trace('');
246: hr_utility.trace('');
247: hr_utility.trace('END OF DEBUG DUMP LIKE');
248: hr_utility.trace('');
249: hr_utility.trace('');
250:
251: END;
252:
245: hr_utility.trace('');
246: hr_utility.trace('');
247: hr_utility.trace('END OF DEBUG DUMP LIKE');
248: hr_utility.trace('');
249: hr_utility.trace('');
250:
251: END;
252:
253: --------------------------------------------------------------------------------
261:
262: --------------------------------------------------------------------------------
263: -- PROCEDURE debug_dump_to_trace
264: --
265: -- Same as debug_dump, but uses hr_utility.trace.
266: --
267: -- p_trace_id is passed to hr_utility.trace_on, see pyutilty.pkb
268: -- for description of this parameter.
269: --
263: -- PROCEDURE debug_dump_to_trace
264: --
265: -- Same as debug_dump, but uses hr_utility.trace.
266: --
267: -- p_trace_id is passed to hr_utility.trace_on, see pyutilty.pkb
268: -- for description of this parameter.
269: --
270: --------------------------------------------------------------------------------
271: PROCEDURE debug_dump_to_trace(p_trace_id IN VARCHAR2 DEFAULT NULL)
292: return;
293: end if;
294:
295: -- see if trace is already on, null trace ID means no
296: l_existing_trace_id := hr_utility.get_trace_id;
297:
298: -- turn on trace (if not already on)
299: if l_existing_trace_id is NULL then
300: hr_utility.trace_on(NULL, p_trace_id);
296: l_existing_trace_id := hr_utility.get_trace_id;
297:
298: -- turn on trace (if not already on)
299: if l_existing_trace_id is NULL then
300: hr_utility.trace_on(NULL, p_trace_id);
301: end if;
302:
303: hr_utility.trace('======================================');
304: hr_utility.trace('BALANCE VIEW DEBUG LINES');
299: if l_existing_trace_id is NULL then
300: hr_utility.trace_on(NULL, p_trace_id);
301: end if;
302:
303: hr_utility.trace('======================================');
304: hr_utility.trace('BALANCE VIEW DEBUG LINES');
305:
306: l_start_line := 0;
307: l_end_line := (DebugLineCount - 1);
300: hr_utility.trace_on(NULL, p_trace_id);
301: end if;
302:
303: hr_utility.trace('======================================');
304: hr_utility.trace('BALANCE VIEW DEBUG LINES');
305:
306: l_start_line := 0;
307: l_end_line := (DebugLineCount - 1);
308:
305:
306: l_start_line := 0;
307: l_end_line := (DebugLineCount - 1);
308:
309: hr_utility.trace('DEBUG DUMP: lines: ' ||
310: l_start_line ||
311: ' to ' ||
312: l_end_line);
313: if DebugOn then
310: l_start_line ||
311: ' to ' ||
312: l_end_line);
313: if DebugOn then
314: hr_utility.trace(' Debug is currently on');
315: else
316: hr_utility.trace(' Debug is currently off');
317: end if;
318:
312: l_end_line);
313: if DebugOn then
314: hr_utility.trace(' Debug is currently on');
315: else
316: hr_utility.trace(' Debug is currently off');
317: end if;
318:
319: FOR l_current_line in l_start_line .. l_end_line LOOP
320: begin
318:
319: FOR l_current_line in l_start_line .. l_end_line LOOP
320: begin
321: l_tmp_line := DebugList(l_current_line);
322: hr_utility.trace(l_current_line ||
323: ': ' ||
324: rtrim(l_tmp_line));
325: exception
326: when no_data_found then
323: ': ' ||
324: rtrim(l_tmp_line));
325: exception
326: when no_data_found then
327: hr_utility.trace('Error retrieving debug line!');
328: -- turn off trace, but only if *we* turned it on
329: if l_existing_trace_id is not NULL then
330: hr_utility.trace_off;
331: end if;
326: when no_data_found then
327: hr_utility.trace('Error retrieving debug line!');
328: -- turn off trace, but only if *we* turned it on
329: if l_existing_trace_id is not NULL then
330: hr_utility.trace_off;
331: end if;
332: return;
333: end;
334: END LOOP;
332: return;
333: end;
334: END LOOP;
335:
336: hr_utility.trace(' ');
337: hr_utility.trace(' ');
338: hr_utility.trace('END OF BALANCE VIEW DEBUG LINES');
339: hr_utility.trace('=========================================');
340:
333: end;
334: END LOOP;
335:
336: hr_utility.trace(' ');
337: hr_utility.trace(' ');
338: hr_utility.trace('END OF BALANCE VIEW DEBUG LINES');
339: hr_utility.trace('=========================================');
340:
341: -- turn the trace back off, if it was not already on
334: END LOOP;
335:
336: hr_utility.trace(' ');
337: hr_utility.trace(' ');
338: hr_utility.trace('END OF BALANCE VIEW DEBUG LINES');
339: hr_utility.trace('=========================================');
340:
341: -- turn the trace back off, if it was not already on
342: if l_existing_trace_id is NULL then
335:
336: hr_utility.trace(' ');
337: hr_utility.trace(' ');
338: hr_utility.trace('END OF BALANCE VIEW DEBUG LINES');
339: hr_utility.trace('=========================================');
340:
341: -- turn the trace back off, if it was not already on
342: if l_existing_trace_id is NULL then
343: hr_utility.trace_off;
339: hr_utility.trace('=========================================');
340:
341: -- turn the trace back off, if it was not already on
342: if l_existing_trace_id is NULL then
343: hr_utility.trace_off;
344: end if;
345:
346: END;
347:
364: l_tmp_line := DebugList(p_line_number);
365: return l_tmp_line;
366: exception
367: when no_data_found then
368: hr_utility.trace('Error retrieving debug line!');
369: return NULL;
370: end;
371: END;
372:
561: -- force upper case name, remove leading/trailin spaces
562: l_temp_name := rtrim(ltrim(upper(p_name)));
563:
564: /*
565: hr_utility.trace('set session var, p_name: ' || p_name ||
566: ', l_temp_name: ' || l_temp_name ||
567: ', p_value: ' || p_value);
568: */
569: if SessionVarCount > 0 then
1040: l_ctxid NUMBER;
1041: --
1042: BEGIN
1043: l_pos := p_pos;
1044: hr_utility.trace('');
1045: hr_utility.trace('==== CONTEXT KNOWN AS: ' || p_known_name);
1046: if CtxValueByPos_is_found(l_pos) then
1047: l_ctxid := CtxIdByPos(l_pos);
1048: hr_utility.trace(' context id: ' || l_ctxid);
1041: --
1042: BEGIN
1043: l_pos := p_pos;
1044: hr_utility.trace('');
1045: hr_utility.trace('==== CONTEXT KNOWN AS: ' || p_known_name);
1046: if CtxValueByPos_is_found(l_pos) then
1047: l_ctxid := CtxIdByPos(l_pos);
1048: hr_utility.trace(' context id: ' || l_ctxid);
1049: hr_utility.trace(' name by pos: ' || CtxNameByPos(l_pos));
1044: hr_utility.trace('');
1045: hr_utility.trace('==== CONTEXT KNOWN AS: ' || p_known_name);
1046: if CtxValueByPos_is_found(l_pos) then
1047: l_ctxid := CtxIdByPos(l_pos);
1048: hr_utility.trace(' context id: ' || l_ctxid);
1049: hr_utility.trace(' name by pos: ' || CtxNameByPos(l_pos));
1050: hr_utility.trace(' val by pos: ' || CtxValueByPos(l_pos));
1051: hr_utility.trace(' id by pos: ' || CtxIdByPos(l_pos));
1052: hr_utility.trace(' val by id: ' || CtxValueById(l_ctxid));
1045: hr_utility.trace('==== CONTEXT KNOWN AS: ' || p_known_name);
1046: if CtxValueByPos_is_found(l_pos) then
1047: l_ctxid := CtxIdByPos(l_pos);
1048: hr_utility.trace(' context id: ' || l_ctxid);
1049: hr_utility.trace(' name by pos: ' || CtxNameByPos(l_pos));
1050: hr_utility.trace(' val by pos: ' || CtxValueByPos(l_pos));
1051: hr_utility.trace(' id by pos: ' || CtxIdByPos(l_pos));
1052: hr_utility.trace(' val by id: ' || CtxValueById(l_ctxid));
1053: hr_utility.trace(' id by id: ' || CtxIdById(l_ctxid));
1046: if CtxValueByPos_is_found(l_pos) then
1047: l_ctxid := CtxIdByPos(l_pos);
1048: hr_utility.trace(' context id: ' || l_ctxid);
1049: hr_utility.trace(' name by pos: ' || CtxNameByPos(l_pos));
1050: hr_utility.trace(' val by pos: ' || CtxValueByPos(l_pos));
1051: hr_utility.trace(' id by pos: ' || CtxIdByPos(l_pos));
1052: hr_utility.trace(' val by id: ' || CtxValueById(l_ctxid));
1053: hr_utility.trace(' id by id: ' || CtxIdById(l_ctxid));
1054: hr_utility.trace(' name by id: ' || CtxNameById(l_ctxid));
1047: l_ctxid := CtxIdByPos(l_pos);
1048: hr_utility.trace(' context id: ' || l_ctxid);
1049: hr_utility.trace(' name by pos: ' || CtxNameByPos(l_pos));
1050: hr_utility.trace(' val by pos: ' || CtxValueByPos(l_pos));
1051: hr_utility.trace(' id by pos: ' || CtxIdByPos(l_pos));
1052: hr_utility.trace(' val by id: ' || CtxValueById(l_ctxid));
1053: hr_utility.trace(' id by id: ' || CtxIdById(l_ctxid));
1054: hr_utility.trace(' name by id: ' || CtxNameById(l_ctxid));
1055: else
1048: hr_utility.trace(' context id: ' || l_ctxid);
1049: hr_utility.trace(' name by pos: ' || CtxNameByPos(l_pos));
1050: hr_utility.trace(' val by pos: ' || CtxValueByPos(l_pos));
1051: hr_utility.trace(' id by pos: ' || CtxIdByPos(l_pos));
1052: hr_utility.trace(' val by id: ' || CtxValueById(l_ctxid));
1053: hr_utility.trace(' id by id: ' || CtxIdById(l_ctxid));
1054: hr_utility.trace(' name by id: ' || CtxNameById(l_ctxid));
1055: else
1056: hr_utility.trace(' NOT SET ');
1049: hr_utility.trace(' name by pos: ' || CtxNameByPos(l_pos));
1050: hr_utility.trace(' val by pos: ' || CtxValueByPos(l_pos));
1051: hr_utility.trace(' id by pos: ' || CtxIdByPos(l_pos));
1052: hr_utility.trace(' val by id: ' || CtxValueById(l_ctxid));
1053: hr_utility.trace(' id by id: ' || CtxIdById(l_ctxid));
1054: hr_utility.trace(' name by id: ' || CtxNameById(l_ctxid));
1055: else
1056: hr_utility.trace(' NOT SET ');
1057: end if;
1050: hr_utility.trace(' val by pos: ' || CtxValueByPos(l_pos));
1051: hr_utility.trace(' id by pos: ' || CtxIdByPos(l_pos));
1052: hr_utility.trace(' val by id: ' || CtxValueById(l_ctxid));
1053: hr_utility.trace(' id by id: ' || CtxIdById(l_ctxid));
1054: hr_utility.trace(' name by id: ' || CtxNameById(l_ctxid));
1055: else
1056: hr_utility.trace(' NOT SET ');
1057: end if;
1058: hr_utility.trace('');
1052: hr_utility.trace(' val by id: ' || CtxValueById(l_ctxid));
1053: hr_utility.trace(' id by id: ' || CtxIdById(l_ctxid));
1054: hr_utility.trace(' name by id: ' || CtxNameById(l_ctxid));
1055: else
1056: hr_utility.trace(' NOT SET ');
1057: end if;
1058: hr_utility.trace('');
1059:
1060: debug_msg( 'Exiting dump_context' );
1054: hr_utility.trace(' name by id: ' || CtxNameById(l_ctxid));
1055: else
1056: hr_utility.trace(' NOT SET ');
1057: end if;
1058: hr_utility.trace('');
1059:
1060: debug_msg( 'Exiting dump_context' );
1061: END dump_context;
1062:
1959: RETURN FALSE;
1960:
1961: /*
1962: ELSE
1963: hr_utility.set_message(801, 'NO_EXP_CHECK_FOR_THIS_DIMENSION');
1964: hr_utility.raise_error;
1965: */
1966:
1967: END IF;
1960:
1961: /*
1962: ELSE
1963: hr_utility.set_message(801, 'NO_EXP_CHECK_FOR_THIS_DIMENSION');
1964: hr_utility.raise_error;
1965: */
1966:
1967: END IF;
1968:
1997: v_hours := to_number ( substr ( v_now, 9, 2 ) );
1998: v_minutes := to_number ( substr ( v_now, 12, 2 ) );
1999: v_seconds := to_number ( substr ( v_now, 15, 2 ) );
2000:
2001: --hr_utility.trace ( chr(10) || /* for sanity check */
2002: -- to_char ( v_hours ) || ':' ||
2003: -- to_char ( v_minutes ) || ':' ||
2004: -- to_char ( v_seconds ) ||
2005: -- chr(10)