24: if EC_DEBUG.G_debug_level >= 2 then
25: ec_debug.push('EC_EXECUTION_UTILS.PRINTPARAMS');
26: ec_debug.pl(3,'i_procedure_name',i_procedure_name);
27: end if;
28: for i in 1..ec_utils.g_parameter_stack.COUNT
29: loop
30: if ec_utils.g_parameter_stack(i).procedure_name = i_procedure_name
31: then
32: if EC_DEBUG.G_debug_level >= 3 then
26: ec_debug.pl(3,'i_procedure_name',i_procedure_name);
27: end if;
28: for i in 1..ec_utils.g_parameter_stack.COUNT
29: loop
30: if ec_utils.g_parameter_stack(i).procedure_name = i_procedure_name
31: then
32: if EC_DEBUG.G_debug_level >= 3 then
33: ec_debug.pl(3,ec_utils.g_parameter_stack(i).parameter_name,ec_utils.g_parameter_stack(i).value);
34: end if;
29: loop
30: if ec_utils.g_parameter_stack(i).procedure_name = i_procedure_name
31: then
32: if EC_DEBUG.G_debug_level >= 3 then
33: ec_debug.pl(3,ec_utils.g_parameter_stack(i).parameter_name,ec_utils.g_parameter_stack(i).value);
34: end if;
35: end if;
36: end loop;
37: if EC_DEBUG.G_debug_level >= 2 then
37: if EC_DEBUG.G_debug_level >= 2 then
38: ec_debug.pop('EC_EXECUTION_UTILS.PRINTPARAMS');
39: end if;
40: exception
41: WHEN EC_UTILS.PROGRAM_EXIT then
42: raise;
43: WHEN OTHERS THEN
44: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.PRINTPARAMS');
45: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
42: raise;
43: WHEN OTHERS THEN
44: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.PRINTPARAMS');
45: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
46: ec_utils.i_ret_code :=2;
47: raise EC_UTILS.PROGRAM_EXIT;
48: end printparams;
49:
50: procedure describeproc
43: WHEN OTHERS THEN
44: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.PRINTPARAMS');
45: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
46: ec_utils.i_ret_code :=2;
47: raise EC_UTILS.PROGRAM_EXIT;
48: end printparams;
49:
50: procedure describeproc
51: (
71: -- This code is added for NULL procedure name
72: if nvl(length(replace(i_procedure_name, ' ')),0) < 1 then
73: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
74: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',' ===> NULL supplied as procedure name');
75: ec_utils.i_ret_code :=2;
76: raise EC_UTILS.PROGRAM_EXIT;
77: end if;
78:
79: --- Describe and Load the procedure on Procedure Stack only if not loaded
72: if nvl(length(replace(i_procedure_name, ' ')),0) < 1 then
73: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
74: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',' ===> NULL supplied as procedure name');
75: ec_utils.i_ret_code :=2;
76: raise EC_UTILS.PROGRAM_EXIT;
77: end if;
78:
79: --- Describe and Load the procedure on Procedure Stack only if not loaded
80: for i in 1..ec_utils.g_procedure_stack.COUNT
76: raise EC_UTILS.PROGRAM_EXIT;
77: end if;
78:
79: --- Describe and Load the procedure on Procedure Stack only if not loaded
80: for i in 1..ec_utils.g_procedure_stack.COUNT
81: loop
82: if ec_utils.g_procedure_stack(i).procedure_name = i_procedure_name
83: then
84: i_procedure_loaded := TRUE;
78:
79: --- Describe and Load the procedure on Procedure Stack only if not loaded
80: for i in 1..ec_utils.g_procedure_stack.COUNT
81: loop
82: if ec_utils.g_procedure_stack(i).procedure_name = i_procedure_name
83: then
84: i_procedure_loaded := TRUE;
85: exit;
86: end if;
113: WHEN OTHERS THEN
114: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
115: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
116: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
117: ec_utils.i_ret_code :=2;
118: raise EC_UTILS.PROGRAM_EXIT;
119: END;
120:
121:
114: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
115: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
116: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
117: ec_utils.i_ret_code :=2;
118: raise EC_UTILS.PROGRAM_EXIT;
119: END;
120:
121:
122: v_proc_string := 'BEGIN '|| i_procedure_name || ' ( ';
151: then
152: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
153: ec_debug.pl(0,'EC','ECE_UNSUPPORTED_DATATYPE','Unsupported Data Type');
154: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
155: ec_utils.i_ret_code :=2;
156: raise EC_UTILS.PROGRAM_EXIT;
157: end if;
158:
159: /**
152: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
153: ec_debug.pl(0,'EC','ECE_UNSUPPORTED_DATATYPE','Unsupported Data Type');
154: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
155: ec_utils.i_ret_code :=2;
156: raise EC_UTILS.PROGRAM_EXIT;
157: end if;
158:
159: /**
160: Check For Function
162: if v_position(v_argcounter) = 0
163: then
164: is_function := TRUE;
165: v_proc_string := 'BEGIN :i_return_value := '||i_procedure_name||' (';
166: i := ec_utils.g_parameter_stack.COUNT+1;
167: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
168: ec_utils.g_parameter_stack(i).parameter_name := 'i_return_value';
169: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
170: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
163: then
164: is_function := TRUE;
165: v_proc_string := 'BEGIN :i_return_value := '||i_procedure_name||' (';
166: i := ec_utils.g_parameter_stack.COUNT+1;
167: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
168: ec_utils.g_parameter_stack(i).parameter_name := 'i_return_value';
169: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
170: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
171:
164: is_function := TRUE;
165: v_proc_string := 'BEGIN :i_return_value := '||i_procedure_name||' (';
166: i := ec_utils.g_parameter_stack.COUNT+1;
167: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
168: ec_utils.g_parameter_stack(i).parameter_name := 'i_return_value';
169: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
170: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
171:
172: goto end_fun;
165: v_proc_string := 'BEGIN :i_return_value := '||i_procedure_name||' (';
166: i := ec_utils.g_parameter_stack.COUNT+1;
167: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
168: ec_utils.g_parameter_stack(i).parameter_name := 'i_return_value';
169: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
170: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
171:
172: goto end_fun;
173: end if;
166: i := ec_utils.g_parameter_stack.COUNT+1;
167: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
168: ec_utils.g_parameter_stack(i).parameter_name := 'i_return_value';
169: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
170: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
171:
172: goto end_fun;
173: end if;
174:
172: goto end_fun;
173: end if;
174:
175: -- Load the definition on the Parameter Stack.
176: i := ec_utils.g_parameter_stack.COUNT+1;
177: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
178: ec_utils.g_parameter_stack(i).parameter_name := v_argumentname(v_argcounter);
179: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
180: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
173: end if;
174:
175: -- Load the definition on the Parameter Stack.
176: i := ec_utils.g_parameter_stack.COUNT+1;
177: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
178: ec_utils.g_parameter_stack(i).parameter_name := v_argumentname(v_argcounter);
179: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
180: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
181:
174:
175: -- Load the definition on the Parameter Stack.
176: i := ec_utils.g_parameter_stack.COUNT+1;
177: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
178: ec_utils.g_parameter_stack(i).parameter_name := v_argumentname(v_argcounter);
179: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
180: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
181:
182:
175: -- Load the definition on the Parameter Stack.
176: i := ec_utils.g_parameter_stack.COUNT+1;
177: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
178: ec_utils.g_parameter_stack(i).parameter_name := v_argumentname(v_argcounter);
179: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
180: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
181:
182:
183: if is_function
176: i := ec_utils.g_parameter_stack.COUNT+1;
177: ec_utils.g_parameter_stack(i).procedure_name := upper(i_procedure_name);
178: ec_utils.g_parameter_stack(i).parameter_name := v_argumentname(v_argcounter);
179: ec_utils.g_parameter_stack(i).data_type := v_datatype(v_argcounter);
180: ec_utils.g_parameter_stack(i).in_out := v_inout(v_argcounter);
181:
182:
183: if is_function
184: then
201:
202:
203: <
204: if EC_DEBUG.G_debug_level >= 3 then
205: ec_debug.pl(3,'Procedure name',ec_utils.g_parameter_stack(i).procedure_name);
206: ec_debug.pl(3,'Parameter name',ec_utils.g_parameter_stack(i).parameter_name);
207: ec_debug.pl(3,'Data Type',ec_utils.g_parameter_stack(i).data_type);
208: ec_debug.pl(3,'In Out',ec_utils.g_parameter_stack(i).in_out);
209: end if;
202:
203: <
204: if EC_DEBUG.G_debug_level >= 3 then
205: ec_debug.pl(3,'Procedure name',ec_utils.g_parameter_stack(i).procedure_name);
206: ec_debug.pl(3,'Parameter name',ec_utils.g_parameter_stack(i).parameter_name);
207: ec_debug.pl(3,'Data Type',ec_utils.g_parameter_stack(i).data_type);
208: ec_debug.pl(3,'In Out',ec_utils.g_parameter_stack(i).in_out);
209: end if;
210:
203: <
204: if EC_DEBUG.G_debug_level >= 3 then
205: ec_debug.pl(3,'Procedure name',ec_utils.g_parameter_stack(i).procedure_name);
206: ec_debug.pl(3,'Parameter name',ec_utils.g_parameter_stack(i).parameter_name);
207: ec_debug.pl(3,'Data Type',ec_utils.g_parameter_stack(i).data_type);
208: ec_debug.pl(3,'In Out',ec_utils.g_parameter_stack(i).in_out);
209: end if;
210:
211: v_argcounter := v_argcounter + 1;
204: if EC_DEBUG.G_debug_level >= 3 then
205: ec_debug.pl(3,'Procedure name',ec_utils.g_parameter_stack(i).procedure_name);
206: ec_debug.pl(3,'Parameter name',ec_utils.g_parameter_stack(i).parameter_name);
207: ec_debug.pl(3,'Data Type',ec_utils.g_parameter_stack(i).data_type);
208: ec_debug.pl(3,'In Out',ec_utils.g_parameter_stack(i).in_out);
209: end if;
210:
211: v_argcounter := v_argcounter + 1;
212: exception
235: end if;
236: -- Open the Cursor and parse the Statement.
237:
238: -- Load the Procedure Stack
239: j := ec_utils.g_procedure_stack.COUNT + 1;
240: ec_utils.g_procedure_stack(j).procedure_name := i_procedure_name;
241: ec_utils.g_procedure_stack(j).cursor_handle := dbms_sql.open_cursor;
242: ec_utils.g_procedure_stack(j).execution_clause := v_proc_string;
243:
236: -- Open the Cursor and parse the Statement.
237:
238: -- Load the Procedure Stack
239: j := ec_utils.g_procedure_stack.COUNT + 1;
240: ec_utils.g_procedure_stack(j).procedure_name := i_procedure_name;
241: ec_utils.g_procedure_stack(j).cursor_handle := dbms_sql.open_cursor;
242: ec_utils.g_procedure_stack(j).execution_clause := v_proc_string;
243:
244: if EC_DEBUG.G_debug_level >= 3 then
237:
238: -- Load the Procedure Stack
239: j := ec_utils.g_procedure_stack.COUNT + 1;
240: ec_utils.g_procedure_stack(j).procedure_name := i_procedure_name;
241: ec_utils.g_procedure_stack(j).cursor_handle := dbms_sql.open_cursor;
242: ec_utils.g_procedure_stack(j).execution_clause := v_proc_string;
243:
244: if EC_DEBUG.G_debug_level >= 3 then
245: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(j).procedure_name);
238: -- Load the Procedure Stack
239: j := ec_utils.g_procedure_stack.COUNT + 1;
240: ec_utils.g_procedure_stack(j).procedure_name := i_procedure_name;
241: ec_utils.g_procedure_stack(j).cursor_handle := dbms_sql.open_cursor;
242: ec_utils.g_procedure_stack(j).execution_clause := v_proc_string;
243:
244: if EC_DEBUG.G_debug_level >= 3 then
245: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(j).procedure_name);
246: ec_debug.pl(3,'Cursor Handle ',ec_utils.g_procedure_stack(j).cursor_handle);
241: ec_utils.g_procedure_stack(j).cursor_handle := dbms_sql.open_cursor;
242: ec_utils.g_procedure_stack(j).execution_clause := v_proc_string;
243:
244: if EC_DEBUG.G_debug_level >= 3 then
245: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(j).procedure_name);
246: ec_debug.pl(3,'Cursor Handle ',ec_utils.g_procedure_stack(j).cursor_handle);
247: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(j).execution_clause);
248: end if;
249:
242: ec_utils.g_procedure_stack(j).execution_clause := v_proc_string;
243:
244: if EC_DEBUG.G_debug_level >= 3 then
245: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(j).procedure_name);
246: ec_debug.pl(3,'Cursor Handle ',ec_utils.g_procedure_stack(j).cursor_handle);
247: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(j).execution_clause);
248: end if;
249:
250: --Parse the Procedure String
243:
244: if EC_DEBUG.G_debug_level >= 3 then
245: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(j).procedure_name);
246: ec_debug.pl(3,'Cursor Handle ',ec_utils.g_procedure_stack(j).cursor_handle);
247: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(j).execution_clause);
248: end if;
249:
250: --Parse the Procedure String
251: BEGIN
248: end if;
249:
250: --Parse the Procedure String
251: BEGIN
252: dbms_sql.parse(ec_utils.g_procedure_stack(j).cursor_handle,v_proc_string,dbms_sql.native);
253: EXCEPTION
254: WHEN OTHERS THEN
255: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
256: error_position := dbms_sql.last_error_position;
255: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
256: error_position := dbms_sql.last_error_position;
257: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
258: ece_error_handling_pvt.print_parse_error (error_position,v_proc_string);
259: ec_utils.i_ret_code :=2;
260: raise EC_UTILS.PROGRAM_EXIT;
261: END;
262:
263: end if;
256: error_position := dbms_sql.last_error_position;
257: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
258: ece_error_handling_pvt.print_parse_error (error_position,v_proc_string);
259: ec_utils.i_ret_code :=2;
260: raise EC_UTILS.PROGRAM_EXIT;
261: END;
262:
263: end if;
264:
273: if EC_DEBUG.G_debug_level >= 2 then
274: ec_debug.pop('EC_EXECUTION_UTILS.DESCRIBEPROC');
275: end if;
276: exception
277: WHEN EC_UTILS.PROGRAM_EXIT then
278: raise;
279: WHEN OTHERS THEN
280: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
281: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
278: raise;
279: WHEN OTHERS THEN
280: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
281: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
282: ec_utils.i_ret_code :=2;
283: raise EC_UTILS.PROGRAM_EXIT;
284: end describeproc;
285:
286: procedure runproc
279: WHEN OTHERS THEN
280: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.DESCRIBEPROC');
281: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
282: ec_utils.i_ret_code :=2;
283: raise EC_UTILS.PROGRAM_EXIT;
284: end describeproc;
285:
286: procedure runproc
287: (
315: i_procedure_name
316: );
317: end if;
318:
319: for i in 1..ec_utils.g_procedure_stack.COUNT
320: loop
321: if ec_utils.g_procedure_stack(i).procedure_name = i_procedure_name
322: then
323: -- Bind the procedure parameters.
317: end if;
318:
319: for i in 1..ec_utils.g_procedure_stack.COUNT
320: loop
321: if ec_utils.g_procedure_stack(i).procedure_name = i_procedure_name
322: then
323: -- Bind the procedure parameters.
324: for j in 1..ec_utils.g_parameter_stack.COUNT
325: loop
320: loop
321: if ec_utils.g_procedure_stack(i).procedure_name = i_procedure_name
322: then
323: -- Bind the procedure parameters.
324: for j in 1..ec_utils.g_parameter_stack.COUNT
325: loop
326: if ec_utils.g_parameter_stack(j).procedure_name = i_procedure_name
327: then
328:
322: then
323: -- Bind the procedure parameters.
324: for j in 1..ec_utils.g_parameter_stack.COUNT
325: loop
326: if ec_utils.g_parameter_stack(j).procedure_name = i_procedure_name
327: then
328:
329: -- First set the Parameter Name
330: if EC_DEBUG.G_debug_level >= 3 then
327: then
328:
329: -- First set the Parameter Name
330: if EC_DEBUG.G_debug_level >= 3 then
331: ec_debug.pl(3,'Name',ec_utils.g_parameter_stack(j).parameter_name);
332: ec_debug.pl(3,'Datatype',ec_utils.g_parameter_stack(j).data_type);
333: end if;
334:
335: -- Bind based on the parameter type
328:
329: -- First set the Parameter Name
330: if EC_DEBUG.G_debug_level >= 3 then
331: ec_debug.pl(3,'Name',ec_utils.g_parameter_stack(j).parameter_name);
332: ec_debug.pl(3,'Datatype',ec_utils.g_parameter_stack(j).data_type);
333: end if;
334:
335: -- Bind based on the parameter type
336: -- 2 Number
333: end if;
334:
335: -- Bind based on the parameter type
336: -- 2 Number
337: IF ec_utils.g_parameter_stack(j).data_type = 2
338: then
339: i_number := to_number(ec_utils.g_parameter_stack(j).value);
340: dbms_sql.bind_variable
341: (
335: -- Bind based on the parameter type
336: -- 2 Number
337: IF ec_utils.g_parameter_stack(j).data_type = 2
338: then
339: i_number := to_number(ec_utils.g_parameter_stack(j).value);
340: dbms_sql.bind_variable
341: (
342: ec_utils.g_procedure_stack(i).cursor_handle,
343: ':'||ec_utils.g_parameter_stack(j).parameter_name,
338: then
339: i_number := to_number(ec_utils.g_parameter_stack(j).value);
340: dbms_sql.bind_variable
341: (
342: ec_utils.g_procedure_stack(i).cursor_handle,
343: ':'||ec_utils.g_parameter_stack(j).parameter_name,
344: i_number
345: );
346: if EC_DEBUG.G_debug_level >= 3 then
339: i_number := to_number(ec_utils.g_parameter_stack(j).value);
340: dbms_sql.bind_variable
341: (
342: ec_utils.g_procedure_stack(i).cursor_handle,
343: ':'||ec_utils.g_parameter_stack(j).parameter_name,
344: i_number
345: );
346: if EC_DEBUG.G_debug_level >= 3 then
347: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
343: ':'||ec_utils.g_parameter_stack(j).parameter_name,
344: i_number
345: );
346: if EC_DEBUG.G_debug_level >= 3 then
347: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
348: end if;
349: -- 1 VARCHAR2
350: elsif ec_utils.g_parameter_stack(j).data_type = 1
351: then
346: if EC_DEBUG.G_debug_level >= 3 then
347: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
348: end if;
349: -- 1 VARCHAR2
350: elsif ec_utils.g_parameter_stack(j).data_type = 1
351: then
352: dbms_sql.bind_variable
353: (
354: ec_utils.g_procedure_stack(i).cursor_handle,
350: elsif ec_utils.g_parameter_stack(j).data_type = 1
351: then
352: dbms_sql.bind_variable
353: (
354: ec_utils.g_procedure_stack(i).cursor_handle,
355: ':'||ec_utils.g_parameter_stack(j).parameter_name,
356: ec_utils.g_parameter_stack(j).value,
357: 32000
358: );
351: then
352: dbms_sql.bind_variable
353: (
354: ec_utils.g_procedure_stack(i).cursor_handle,
355: ':'||ec_utils.g_parameter_stack(j).parameter_name,
356: ec_utils.g_parameter_stack(j).value,
357: 32000
358: );
359: if EC_DEBUG.G_debug_level >= 3 then
352: dbms_sql.bind_variable
353: (
354: ec_utils.g_procedure_stack(i).cursor_handle,
355: ':'||ec_utils.g_parameter_stack(j).parameter_name,
356: ec_utils.g_parameter_stack(j).value,
357: 32000
358: );
359: if EC_DEBUG.G_debug_level >= 3 then
360: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
356: ec_utils.g_parameter_stack(j).value,
357: 32000
358: );
359: if EC_DEBUG.G_debug_level >= 3 then
360: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
361: end if;
362: -- 12 DATE
363: elsif ec_utils.g_parameter_stack(j).data_type = 12
364: then
359: if EC_DEBUG.G_debug_level >= 3 then
360: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
361: end if;
362: -- 12 DATE
363: elsif ec_utils.g_parameter_stack(j).data_type = 12
364: then
365: i_date := to_date(ec_utils.g_parameter_stack(j).value,'YYYYMMDD HH24MISS');
366: dbms_sql.bind_variable
367: (
361: end if;
362: -- 12 DATE
363: elsif ec_utils.g_parameter_stack(j).data_type = 12
364: then
365: i_date := to_date(ec_utils.g_parameter_stack(j).value,'YYYYMMDD HH24MISS');
366: dbms_sql.bind_variable
367: (
368: ec_utils.g_procedure_stack(i).cursor_handle,
369: ':'||ec_utils.g_parameter_stack(j).parameter_name,
364: then
365: i_date := to_date(ec_utils.g_parameter_stack(j).value,'YYYYMMDD HH24MISS');
366: dbms_sql.bind_variable
367: (
368: ec_utils.g_procedure_stack(i).cursor_handle,
369: ':'||ec_utils.g_parameter_stack(j).parameter_name,
370: i_date
371: );
372: if EC_DEBUG.G_debug_level >= 3 then
365: i_date := to_date(ec_utils.g_parameter_stack(j).value,'YYYYMMDD HH24MISS');
366: dbms_sql.bind_variable
367: (
368: ec_utils.g_procedure_stack(i).cursor_handle,
369: ':'||ec_utils.g_parameter_stack(j).parameter_name,
370: i_date
371: );
372: if EC_DEBUG.G_debug_level >= 3 then
373: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,i_date);
369: ':'||ec_utils.g_parameter_stack(j).parameter_name,
370: i_date
371: );
372: if EC_DEBUG.G_debug_level >= 3 then
373: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,i_date);
374: end if;
375: -- 96 CHAR
376: elsif ec_utils.g_parameter_stack(j).data_type = 96
377: then
372: if EC_DEBUG.G_debug_level >= 3 then
373: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,i_date);
374: end if;
375: -- 96 CHAR
376: elsif ec_utils.g_parameter_stack(j).data_type = 96
377: then
378: dbms_sql.bind_variable
379: (
380: ec_utils.g_procedure_stack(i).cursor_handle,
376: elsif ec_utils.g_parameter_stack(j).data_type = 96
377: then
378: dbms_sql.bind_variable
379: (
380: ec_utils.g_procedure_stack(i).cursor_handle,
381: ':'||ec_utils.g_parameter_stack(j).parameter_name,
382: ec_utils.g_parameter_stack(j).value,
383: 600
384: );
377: then
378: dbms_sql.bind_variable
379: (
380: ec_utils.g_procedure_stack(i).cursor_handle,
381: ':'||ec_utils.g_parameter_stack(j).parameter_name,
382: ec_utils.g_parameter_stack(j).value,
383: 600
384: );
385: if EC_DEBUG.G_debug_level >= 3 then
378: dbms_sql.bind_variable
379: (
380: ec_utils.g_procedure_stack(i).cursor_handle,
381: ':'||ec_utils.g_parameter_stack(j).parameter_name,
382: ec_utils.g_parameter_stack(j).value,
383: 600
384: );
385: if EC_DEBUG.G_debug_level >= 3 then
386: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
382: ec_utils.g_parameter_stack(j).value,
383: 600
384: );
385: if EC_DEBUG.G_debug_level >= 3 then
386: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
387: end if;
388: else
389: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
390: ec_debug.pl(0,'EC','ECE_UNSUPPORTED_DATATYPE','Unsupported Data Type');
388: else
389: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
390: ec_debug.pl(0,'EC','ECE_UNSUPPORTED_DATATYPE','Unsupported Data Type');
391: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
392: ec_utils.i_ret_code :=2;
393: raise EC_UTILS.PROGRAM_EXIT;
394: end if;
395:
396: end if; --- procedure name in the parameter Stack
389: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
390: ec_debug.pl(0,'EC','ECE_UNSUPPORTED_DATATYPE','Unsupported Data Type');
391: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
392: ec_utils.i_ret_code :=2;
393: raise EC_UTILS.PROGRAM_EXIT;
394: end if;
395:
396: end if; --- procedure name in the parameter Stack
397: end loop; -- End of paremeter Loop i.e. j
399: -- Execute the Procedure.
400: if EC_DEBUG.G_debug_level >= 3 then
401: ec_debug.pl(3,'Before Execution','Yes');
402:
403: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(i).procedure_name);
404: ec_debug.pl(3,'Cursor Handle ',ec_utils.g_procedure_stack(i).cursor_handle);
405: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(i).execution_clause);
406: end if;
407: v_numrows := DBMS_SQL.execute(ec_utils.g_procedure_stack(i).cursor_handle);
400: if EC_DEBUG.G_debug_level >= 3 then
401: ec_debug.pl(3,'Before Execution','Yes');
402:
403: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(i).procedure_name);
404: ec_debug.pl(3,'Cursor Handle ',ec_utils.g_procedure_stack(i).cursor_handle);
405: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(i).execution_clause);
406: end if;
407: v_numrows := DBMS_SQL.execute(ec_utils.g_procedure_stack(i).cursor_handle);
408: if EC_DEBUG.G_debug_level >= 3 then
401: ec_debug.pl(3,'Before Execution','Yes');
402:
403: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(i).procedure_name);
404: ec_debug.pl(3,'Cursor Handle ',ec_utils.g_procedure_stack(i).cursor_handle);
405: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(i).execution_clause);
406: end if;
407: v_numrows := DBMS_SQL.execute(ec_utils.g_procedure_stack(i).cursor_handle);
408: if EC_DEBUG.G_debug_level >= 3 then
409: ec_debug.pl(3,'Execution Successful','Yes');
403: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(i).procedure_name);
404: ec_debug.pl(3,'Cursor Handle ',ec_utils.g_procedure_stack(i).cursor_handle);
405: ec_debug.pl(3,'Procedure name',ec_utils.g_procedure_stack(i).execution_clause);
406: end if;
407: v_numrows := DBMS_SQL.execute(ec_utils.g_procedure_stack(i).cursor_handle);
408: if EC_DEBUG.G_debug_level >= 3 then
409: ec_debug.pl(3,'Execution Successful','Yes');
410: end if;
411: -- Call Variable value for any OUT or IN/OUT parameters
408: if EC_DEBUG.G_debug_level >= 3 then
409: ec_debug.pl(3,'Execution Successful','Yes');
410: end if;
411: -- Call Variable value for any OUT or IN/OUT parameters
412: for j in 1..ec_utils.g_parameter_stack.COUNT
413: loop
414: if ec_utils.g_parameter_stack(j).procedure_name = i_procedure_name
415: then
416: if ec_utils.g_parameter_stack(j).in_out = 1 or ec_utils.g_parameter_stack(j).in_out = 2
410: end if;
411: -- Call Variable value for any OUT or IN/OUT parameters
412: for j in 1..ec_utils.g_parameter_stack.COUNT
413: loop
414: if ec_utils.g_parameter_stack(j).procedure_name = i_procedure_name
415: then
416: if ec_utils.g_parameter_stack(j).in_out = 1 or ec_utils.g_parameter_stack(j).in_out = 2
417: then
418: if ec_utils.g_parameter_stack(j).data_type= 2
412: for j in 1..ec_utils.g_parameter_stack.COUNT
413: loop
414: if ec_utils.g_parameter_stack(j).procedure_name = i_procedure_name
415: then
416: if ec_utils.g_parameter_stack(j).in_out = 1 or ec_utils.g_parameter_stack(j).in_out = 2
417: then
418: if ec_utils.g_parameter_stack(j).data_type= 2
419: then
420: dbms_sql.variable_value
414: if ec_utils.g_parameter_stack(j).procedure_name = i_procedure_name
415: then
416: if ec_utils.g_parameter_stack(j).in_out = 1 or ec_utils.g_parameter_stack(j).in_out = 2
417: then
418: if ec_utils.g_parameter_stack(j).data_type= 2
419: then
420: dbms_sql.variable_value
421: (
422: ec_utils.g_procedure_stack(i).cursor_handle,
418: if ec_utils.g_parameter_stack(j).data_type= 2
419: then
420: dbms_sql.variable_value
421: (
422: ec_utils.g_procedure_stack(i).cursor_handle,
423: ':'||ec_utils.g_parameter_stack(j).parameter_name,
424: j_number
425: );
426: ec_utils.g_parameter_stack(j).value := to_number(j_number);
419: then
420: dbms_sql.variable_value
421: (
422: ec_utils.g_procedure_stack(i).cursor_handle,
423: ':'||ec_utils.g_parameter_stack(j).parameter_name,
424: j_number
425: );
426: ec_utils.g_parameter_stack(j).value := to_number(j_number);
427: if EC_DEBUG.G_debug_level >= 3 then
422: ec_utils.g_procedure_stack(i).cursor_handle,
423: ':'||ec_utils.g_parameter_stack(j).parameter_name,
424: j_number
425: );
426: ec_utils.g_parameter_stack(j).value := to_number(j_number);
427: if EC_DEBUG.G_debug_level >= 3 then
428: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
429: end if;
430: elsif ec_utils.g_parameter_stack(j).data_type= 1
424: j_number
425: );
426: ec_utils.g_parameter_stack(j).value := to_number(j_number);
427: if EC_DEBUG.G_debug_level >= 3 then
428: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
429: end if;
430: elsif ec_utils.g_parameter_stack(j).data_type= 1
431: then
432: dbms_sql.variable_value
426: ec_utils.g_parameter_stack(j).value := to_number(j_number);
427: if EC_DEBUG.G_debug_level >= 3 then
428: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
429: end if;
430: elsif ec_utils.g_parameter_stack(j).data_type= 1
431: then
432: dbms_sql.variable_value
433: (
434: ec_utils.g_procedure_stack(i).cursor_handle,
430: elsif ec_utils.g_parameter_stack(j).data_type= 1
431: then
432: dbms_sql.variable_value
433: (
434: ec_utils.g_procedure_stack(i).cursor_handle,
435: ':'||ec_utils.g_parameter_stack(j).parameter_name,
436: ec_utils.g_parameter_stack(j).value
437: );
438: if EC_DEBUG.G_debug_level >= 3 then
431: then
432: dbms_sql.variable_value
433: (
434: ec_utils.g_procedure_stack(i).cursor_handle,
435: ':'||ec_utils.g_parameter_stack(j).parameter_name,
436: ec_utils.g_parameter_stack(j).value
437: );
438: if EC_DEBUG.G_debug_level >= 3 then
439: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
432: dbms_sql.variable_value
433: (
434: ec_utils.g_procedure_stack(i).cursor_handle,
435: ':'||ec_utils.g_parameter_stack(j).parameter_name,
436: ec_utils.g_parameter_stack(j).value
437: );
438: if EC_DEBUG.G_debug_level >= 3 then
439: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
440: end if;
435: ':'||ec_utils.g_parameter_stack(j).parameter_name,
436: ec_utils.g_parameter_stack(j).value
437: );
438: if EC_DEBUG.G_debug_level >= 3 then
439: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
440: end if;
441: elsif ec_utils.g_parameter_stack(j).data_type= 12
442: then
443: dbms_sql.variable_value
437: );
438: if EC_DEBUG.G_debug_level >= 3 then
439: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
440: end if;
441: elsif ec_utils.g_parameter_stack(j).data_type= 12
442: then
443: dbms_sql.variable_value
444: (
445: ec_utils.g_procedure_stack(i).cursor_handle,
441: elsif ec_utils.g_parameter_stack(j).data_type= 12
442: then
443: dbms_sql.variable_value
444: (
445: ec_utils.g_procedure_stack(i).cursor_handle,
446: ':'||ec_utils.g_parameter_stack(j).parameter_name,
447: j_date
448: );
449:
442: then
443: dbms_sql.variable_value
444: (
445: ec_utils.g_procedure_stack(i).cursor_handle,
446: ':'||ec_utils.g_parameter_stack(j).parameter_name,
447: j_date
448: );
449:
450: ec_utils.g_parameter_stack(j).value := to_char(j_date,'YYYYMMDD HH24MISS');
446: ':'||ec_utils.g_parameter_stack(j).parameter_name,
447: j_date
448: );
449:
450: ec_utils.g_parameter_stack(j).value := to_char(j_date,'YYYYMMDD HH24MISS');
451: if EC_DEBUG.G_debug_level >= 3 then
452: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
453: end if;
454: elsif ec_utils.g_parameter_stack(j).data_type= 96
448: );
449:
450: ec_utils.g_parameter_stack(j).value := to_char(j_date,'YYYYMMDD HH24MISS');
451: if EC_DEBUG.G_debug_level >= 3 then
452: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
453: end if;
454: elsif ec_utils.g_parameter_stack(j).data_type= 96
455: then
456: dbms_sql.variable_value
450: ec_utils.g_parameter_stack(j).value := to_char(j_date,'YYYYMMDD HH24MISS');
451: if EC_DEBUG.G_debug_level >= 3 then
452: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
453: end if;
454: elsif ec_utils.g_parameter_stack(j).data_type= 96
455: then
456: dbms_sql.variable_value
457: (
458: ec_utils.g_procedure_stack(i).cursor_handle,
454: elsif ec_utils.g_parameter_stack(j).data_type= 96
455: then
456: dbms_sql.variable_value
457: (
458: ec_utils.g_procedure_stack(i).cursor_handle,
459: ':'||ec_utils.g_parameter_stack(j).parameter_name,
460: ec_utils.g_parameter_stack(j).value
461: );
462: if EC_DEBUG.G_debug_level >= 3 then
455: then
456: dbms_sql.variable_value
457: (
458: ec_utils.g_procedure_stack(i).cursor_handle,
459: ':'||ec_utils.g_parameter_stack(j).parameter_name,
460: ec_utils.g_parameter_stack(j).value
461: );
462: if EC_DEBUG.G_debug_level >= 3 then
463: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
456: dbms_sql.variable_value
457: (
458: ec_utils.g_procedure_stack(i).cursor_handle,
459: ':'||ec_utils.g_parameter_stack(j).parameter_name,
460: ec_utils.g_parameter_stack(j).value
461: );
462: if EC_DEBUG.G_debug_level >= 3 then
463: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
464: end if;
459: ':'||ec_utils.g_parameter_stack(j).parameter_name,
460: ec_utils.g_parameter_stack(j).value
461: );
462: if EC_DEBUG.G_debug_level >= 3 then
463: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,ec_utils.g_parameter_stack(j).value);
464: end if;
465: else
466: ec_debug.pl(0,'EC','ECE_UNSUPPORTED_DATATYPE','Unsupported Data Type');
467: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
464: end if;
465: else
466: ec_debug.pl(0,'EC','ECE_UNSUPPORTED_DATATYPE','Unsupported Data Type');
467: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
468: ec_utils.i_ret_code :=2;
469: raise EC_UTILS.PROGRAM_EXIT;
470: end if;
471:
472: end if; -- For In/OUT
465: else
466: ec_debug.pl(0,'EC','ECE_UNSUPPORTED_DATATYPE','Unsupported Data Type');
467: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
468: ec_utils.i_ret_code :=2;
469: raise EC_UTILS.PROGRAM_EXIT;
470: end if;
471:
472: end if; -- For In/OUT
473:
489: if EC_DEBUG.G_debug_level >= 2 then
490: ec_debug.pop('EC_EXECUTION_UTILS.RUNPROC');
491: end if;
492: exception
493: WHEN EC_UTILS.PROGRAM_EXIT then
494: raise;
495: WHEN OTHERS THEN
496: ec_debug.pl(0,'EC','ECE_PROCEDURE_ERROR','PROCEDURE_NAME',i_procedure_name);
497: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
495: WHEN OTHERS THEN
496: ec_debug.pl(0,'EC','ECE_PROCEDURE_ERROR','PROCEDURE_NAME',i_procedure_name);
497: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
498: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
499: ec_utils.i_ret_code :=2;
500: raise EC_UTILS.PROGRAM_EXIT;
501: end runproc;
502:
503: procedure load_procedure_definitions
496: ec_debug.pl(0,'EC','ECE_PROCEDURE_ERROR','PROCEDURE_NAME',i_procedure_name);
497: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.RUNPROC');
498: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
499: ec_utils.i_ret_code :=2;
500: raise EC_UTILS.PROGRAM_EXIT;
501: end runproc;
502:
503: procedure load_procedure_definitions
504: is
505: BEGIN
506: if EC_DEBUG.G_debug_level >= 2 then
507: ec_debug.push('EC_EXECUTION_UTILS.LOAD_PROCEDURE_DEFINITIONS');
508: end if;
509: for i in 1..ec_utils.g_stage_data.COUNT
510: loop
511: if (
512: ec_utils.g_stage_data(i).action_type = 1050 OR
513: ec_utils.g_stage_data(i).action_type = 80 OR
508: end if;
509: for i in 1..ec_utils.g_stage_data.COUNT
510: loop
511: if (
512: ec_utils.g_stage_data(i).action_type = 1050 OR
513: ec_utils.g_stage_data(i).action_type = 80 OR
514: ec_utils.g_stage_data(i).action_type = 1080 OR
515: ec_utils.g_stage_data(i).action_type = 1090 OR
516: ec_utils.g_stage_data(i).action_type = 1100 OR
509: for i in 1..ec_utils.g_stage_data.COUNT
510: loop
511: if (
512: ec_utils.g_stage_data(i).action_type = 1050 OR
513: ec_utils.g_stage_data(i).action_type = 80 OR
514: ec_utils.g_stage_data(i).action_type = 1080 OR
515: ec_utils.g_stage_data(i).action_type = 1090 OR
516: ec_utils.g_stage_data(i).action_type = 1100 OR
517: ec_utils.g_stage_data(i).action_type = 1110
510: loop
511: if (
512: ec_utils.g_stage_data(i).action_type = 1050 OR
513: ec_utils.g_stage_data(i).action_type = 80 OR
514: ec_utils.g_stage_data(i).action_type = 1080 OR
515: ec_utils.g_stage_data(i).action_type = 1090 OR
516: ec_utils.g_stage_data(i).action_type = 1100 OR
517: ec_utils.g_stage_data(i).action_type = 1110
518: )
511: if (
512: ec_utils.g_stage_data(i).action_type = 1050 OR
513: ec_utils.g_stage_data(i).action_type = 80 OR
514: ec_utils.g_stage_data(i).action_type = 1080 OR
515: ec_utils.g_stage_data(i).action_type = 1090 OR
516: ec_utils.g_stage_data(i).action_type = 1100 OR
517: ec_utils.g_stage_data(i).action_type = 1110
518: )
519: then
512: ec_utils.g_stage_data(i).action_type = 1050 OR
513: ec_utils.g_stage_data(i).action_type = 80 OR
514: ec_utils.g_stage_data(i).action_type = 1080 OR
515: ec_utils.g_stage_data(i).action_type = 1090 OR
516: ec_utils.g_stage_data(i).action_type = 1100 OR
517: ec_utils.g_stage_data(i).action_type = 1110
518: )
519: then
520: describeproc
513: ec_utils.g_stage_data(i).action_type = 80 OR
514: ec_utils.g_stage_data(i).action_type = 1080 OR
515: ec_utils.g_stage_data(i).action_type = 1090 OR
516: ec_utils.g_stage_data(i).action_type = 1100 OR
517: ec_utils.g_stage_data(i).action_type = 1110
518: )
519: then
520: describeproc
521: (
518: )
519: then
520: describeproc
521: (
522: ec_utils.g_stage_data(i).custom_procedure_name
523: );
524: end if;
525: end loop;
526:
527: if EC_DEBUG.G_debug_level >= 2 then
528: ec_debug.pop('EC_EXECUTION_UTILS.LOAD_PROCEDURE_DEFINITIONS');
529: end if;
530: exception
531: WHEN EC_UTILS.PROGRAM_EXIT then
532: raise;
533: WHEN OTHERS THEN
534: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_PROCEDURE_DEFINITIONS');
535: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
532: raise;
533: WHEN OTHERS THEN
534: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_PROCEDURE_DEFINITIONS');
535: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
536: ec_utils.i_ret_code :=2;
537: raise EC_UTILS.PROGRAM_EXIT;
538: end load_procedure_definitions;
539:
540: procedure load_mandatory_columns
533: WHEN OTHERS THEN
534: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_PROCEDURE_DEFINITIONS');
535: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
536: ec_utils.i_ret_code :=2;
537: raise EC_UTILS.PROGRAM_EXIT;
538: end load_procedure_definitions;
539:
540: procedure load_mandatory_columns
541: (
547: ec_debug.push('EC_EXECUTION_UTILS.LOAD_MANDATORY_COLUMNS');
548: ec_debug.pl(3,'i_level',i_level);
549: end if;
550:
551: for i in 1..ec_utils.g_stage_data.COUNT
552: loop
553: if (
554: ec_utils.g_stage_data(i).variable_level = i_level AND
555: ec_utils.g_stage_data(i).action_type = 110
550:
551: for i in 1..ec_utils.g_stage_data.COUNT
552: loop
553: if (
554: ec_utils.g_stage_data(i).variable_level = i_level AND
555: ec_utils.g_stage_data(i).action_type = 110
556: )
557: then
558: ec_utils.create_mandatory_columns
551: for i in 1..ec_utils.g_stage_data.COUNT
552: loop
553: if (
554: ec_utils.g_stage_data(i).variable_level = i_level AND
555: ec_utils.g_stage_data(i).action_type = 110
556: )
557: then
558: ec_utils.create_mandatory_columns
559: (
554: ec_utils.g_stage_data(i).variable_level = i_level AND
555: ec_utils.g_stage_data(i).action_type = 110
556: )
557: then
558: ec_utils.create_mandatory_columns
559: (
560: ec_utils.g_stage_data(i).variable_level,
561: ec_utils.g_stage_data(i).previous_variable_level,
562: ec_utils.g_stage_data(i).variable_name,
556: )
557: then
558: ec_utils.create_mandatory_columns
559: (
560: ec_utils.g_stage_data(i).variable_level,
561: ec_utils.g_stage_data(i).previous_variable_level,
562: ec_utils.g_stage_data(i).variable_name,
563: ec_utils.g_stage_data(i).default_value,
564: ec_utils.g_stage_data(i).data_type,
557: then
558: ec_utils.create_mandatory_columns
559: (
560: ec_utils.g_stage_data(i).variable_level,
561: ec_utils.g_stage_data(i).previous_variable_level,
562: ec_utils.g_stage_data(i).variable_name,
563: ec_utils.g_stage_data(i).default_value,
564: ec_utils.g_stage_data(i).data_type,
565: ec_utils.g_stage_data(i).function_name
558: ec_utils.create_mandatory_columns
559: (
560: ec_utils.g_stage_data(i).variable_level,
561: ec_utils.g_stage_data(i).previous_variable_level,
562: ec_utils.g_stage_data(i).variable_name,
563: ec_utils.g_stage_data(i).default_value,
564: ec_utils.g_stage_data(i).data_type,
565: ec_utils.g_stage_data(i).function_name
566: );
559: (
560: ec_utils.g_stage_data(i).variable_level,
561: ec_utils.g_stage_data(i).previous_variable_level,
562: ec_utils.g_stage_data(i).variable_name,
563: ec_utils.g_stage_data(i).default_value,
564: ec_utils.g_stage_data(i).data_type,
565: ec_utils.g_stage_data(i).function_name
566: );
567: end if;
560: ec_utils.g_stage_data(i).variable_level,
561: ec_utils.g_stage_data(i).previous_variable_level,
562: ec_utils.g_stage_data(i).variable_name,
563: ec_utils.g_stage_data(i).default_value,
564: ec_utils.g_stage_data(i).data_type,
565: ec_utils.g_stage_data(i).function_name
566: );
567: end if;
568: end loop;
561: ec_utils.g_stage_data(i).previous_variable_level,
562: ec_utils.g_stage_data(i).variable_name,
563: ec_utils.g_stage_data(i).default_value,
564: ec_utils.g_stage_data(i).data_type,
565: ec_utils.g_stage_data(i).function_name
566: );
567: end if;
568: end loop;
569:
570: if EC_DEBUG.G_debug_level >= 2 then
571: ec_debug.pop('EC_EXECUTION_UTILS.LOAD_MANDATORY_COLUMNS');
572: end if;
573: exception
574: WHEN EC_UTILS.PROGRAM_EXIT then
575: raise;
576: WHEN OTHERS THEN
577: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_MANDATORY_COLUMNS');
578: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
575: raise;
576: WHEN OTHERS THEN
577: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_MANDATORY_COLUMNS');
578: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
579: ec_utils.i_ret_code :=2;
580: raise EC_UTILS.PROGRAM_EXIT;
581: end load_mandatory_columns;
582:
583: procedure load_procedure_mappings
576: WHEN OTHERS THEN
577: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_MANDATORY_COLUMNS');
578: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
579: ec_utils.i_ret_code :=2;
580: raise EC_UTILS.PROGRAM_EXIT;
581: end load_mandatory_columns;
582:
583: procedure load_procedure_mappings
584: (
599: from ece_procedure_mappings epm,
600: ece_tran_stage_data etsd
601: where etsd.transtage_id = epm.transtage_id
602: and etsd.transaction_type = p_transaction_type
603: and etsd.map_id = ec_utils.g_map_id;
604: i pls_integer := ec_utils.g_procedure_mappings.COUNT;
605: BEGIN
606: if EC_DEBUG.G_debug_level >= 2 then
607: ec_debug.push('EC_EXECUTION_UTILS.LOAD_PROCEDURE_MAPPINGS');
600: ece_tran_stage_data etsd
601: where etsd.transtage_id = epm.transtage_id
602: and etsd.transaction_type = p_transaction_type
603: and etsd.map_id = ec_utils.g_map_id;
604: i pls_integer := ec_utils.g_procedure_mappings.COUNT;
605: BEGIN
606: if EC_DEBUG.G_debug_level >= 2 then
607: ec_debug.push('EC_EXECUTION_UTILS.LOAD_PROCEDURE_MAPPINGS');
608: ec_debug.pl(3,'i_transaction_type',i_transaction_type);
613: p_transaction_type => i_transaction_type
614: )
615: loop
616: i := i + 1;
617: ec_utils.g_procedure_mappings(i).transtage_id := proc_map.transtage_id;
618: ec_utils.g_procedure_mappings(i).procedure_name := proc_map.procedure_name;
619: ec_utils.g_procedure_mappings(i).parameter_name := proc_map.parameter_name;
620: ec_utils.g_procedure_mappings(i).action_type := proc_map.action_type;
621: ec_utils.g_procedure_mappings(i).variable_level := proc_map.variable_level;
614: )
615: loop
616: i := i + 1;
617: ec_utils.g_procedure_mappings(i).transtage_id := proc_map.transtage_id;
618: ec_utils.g_procedure_mappings(i).procedure_name := proc_map.procedure_name;
619: ec_utils.g_procedure_mappings(i).parameter_name := proc_map.parameter_name;
620: ec_utils.g_procedure_mappings(i).action_type := proc_map.action_type;
621: ec_utils.g_procedure_mappings(i).variable_level := proc_map.variable_level;
622: ec_utils.g_procedure_mappings(i).variable_name := proc_map.variable_name;
615: loop
616: i := i + 1;
617: ec_utils.g_procedure_mappings(i).transtage_id := proc_map.transtage_id;
618: ec_utils.g_procedure_mappings(i).procedure_name := proc_map.procedure_name;
619: ec_utils.g_procedure_mappings(i).parameter_name := proc_map.parameter_name;
620: ec_utils.g_procedure_mappings(i).action_type := proc_map.action_type;
621: ec_utils.g_procedure_mappings(i).variable_level := proc_map.variable_level;
622: ec_utils.g_procedure_mappings(i).variable_name := proc_map.variable_name;
623:
616: i := i + 1;
617: ec_utils.g_procedure_mappings(i).transtage_id := proc_map.transtage_id;
618: ec_utils.g_procedure_mappings(i).procedure_name := proc_map.procedure_name;
619: ec_utils.g_procedure_mappings(i).parameter_name := proc_map.parameter_name;
620: ec_utils.g_procedure_mappings(i).action_type := proc_map.action_type;
621: ec_utils.g_procedure_mappings(i).variable_level := proc_map.variable_level;
622: ec_utils.g_procedure_mappings(i).variable_name := proc_map.variable_name;
623:
624: if EC_DEBUG.G_debug_level >= 3 then
617: ec_utils.g_procedure_mappings(i).transtage_id := proc_map.transtage_id;
618: ec_utils.g_procedure_mappings(i).procedure_name := proc_map.procedure_name;
619: ec_utils.g_procedure_mappings(i).parameter_name := proc_map.parameter_name;
620: ec_utils.g_procedure_mappings(i).action_type := proc_map.action_type;
621: ec_utils.g_procedure_mappings(i).variable_level := proc_map.variable_level;
622: ec_utils.g_procedure_mappings(i).variable_name := proc_map.variable_name;
623:
624: if EC_DEBUG.G_debug_level >= 3 then
625: ec_debug.pl(3, ec_utils.g_procedure_mappings(i).tranStage_id ||' '||
618: ec_utils.g_procedure_mappings(i).procedure_name := proc_map.procedure_name;
619: ec_utils.g_procedure_mappings(i).parameter_name := proc_map.parameter_name;
620: ec_utils.g_procedure_mappings(i).action_type := proc_map.action_type;
621: ec_utils.g_procedure_mappings(i).variable_level := proc_map.variable_level;
622: ec_utils.g_procedure_mappings(i).variable_name := proc_map.variable_name;
623:
624: if EC_DEBUG.G_debug_level >= 3 then
625: ec_debug.pl(3, ec_utils.g_procedure_mappings(i).tranStage_id ||' '||
626: ec_utils.g_procedure_mappings(i).procedure_name||' '||
621: ec_utils.g_procedure_mappings(i).variable_level := proc_map.variable_level;
622: ec_utils.g_procedure_mappings(i).variable_name := proc_map.variable_name;
623:
624: if EC_DEBUG.G_debug_level >= 3 then
625: ec_debug.pl(3, ec_utils.g_procedure_mappings(i).tranStage_id ||' '||
626: ec_utils.g_procedure_mappings(i).procedure_name||' '||
627: ec_utils.g_procedure_mappings(i).parameter_name||' '||
628: ec_utils.g_procedure_mappings(i).action_type||' '||
629: ec_utils.g_procedure_mappings(i).variable_level||' '||
622: ec_utils.g_procedure_mappings(i).variable_name := proc_map.variable_name;
623:
624: if EC_DEBUG.G_debug_level >= 3 then
625: ec_debug.pl(3, ec_utils.g_procedure_mappings(i).tranStage_id ||' '||
626: ec_utils.g_procedure_mappings(i).procedure_name||' '||
627: ec_utils.g_procedure_mappings(i).parameter_name||' '||
628: ec_utils.g_procedure_mappings(i).action_type||' '||
629: ec_utils.g_procedure_mappings(i).variable_level||' '||
630: ec_utils.g_procedure_mappings(i).variable_name
623:
624: if EC_DEBUG.G_debug_level >= 3 then
625: ec_debug.pl(3, ec_utils.g_procedure_mappings(i).tranStage_id ||' '||
626: ec_utils.g_procedure_mappings(i).procedure_name||' '||
627: ec_utils.g_procedure_mappings(i).parameter_name||' '||
628: ec_utils.g_procedure_mappings(i).action_type||' '||
629: ec_utils.g_procedure_mappings(i).variable_level||' '||
630: ec_utils.g_procedure_mappings(i).variable_name
631: );
624: if EC_DEBUG.G_debug_level >= 3 then
625: ec_debug.pl(3, ec_utils.g_procedure_mappings(i).tranStage_id ||' '||
626: ec_utils.g_procedure_mappings(i).procedure_name||' '||
627: ec_utils.g_procedure_mappings(i).parameter_name||' '||
628: ec_utils.g_procedure_mappings(i).action_type||' '||
629: ec_utils.g_procedure_mappings(i).variable_level||' '||
630: ec_utils.g_procedure_mappings(i).variable_name
631: );
632: end if;
625: ec_debug.pl(3, ec_utils.g_procedure_mappings(i).tranStage_id ||' '||
626: ec_utils.g_procedure_mappings(i).procedure_name||' '||
627: ec_utils.g_procedure_mappings(i).parameter_name||' '||
628: ec_utils.g_procedure_mappings(i).action_type||' '||
629: ec_utils.g_procedure_mappings(i).variable_level||' '||
630: ec_utils.g_procedure_mappings(i).variable_name
631: );
632: end if;
633: end loop;
626: ec_utils.g_procedure_mappings(i).procedure_name||' '||
627: ec_utils.g_procedure_mappings(i).parameter_name||' '||
628: ec_utils.g_procedure_mappings(i).action_type||' '||
629: ec_utils.g_procedure_mappings(i).variable_level||' '||
630: ec_utils.g_procedure_mappings(i).variable_name
631: );
632: end if;
633: end loop;
634:
635: if EC_DEBUG.G_debug_level >= 2 then
636: ec_debug.pop('EC_EXECUTION_UTILS.LOAD_PROCEDURE_MAPPINGS');
637: end if;
638: exception
639: WHEN EC_UTILS.PROGRAM_EXIT then
640: raise;
641: WHEN OTHERS THEN
642: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_PROCEDURE_MAPPINGS');
643: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
640: raise;
641: WHEN OTHERS THEN
642: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_PROCEDURE_MAPPINGS');
643: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
644: ec_utils.i_ret_code :=2;
645: raise EC_UTILS.PROGRAM_EXIT;
646: end load_procedure_mappings;
647:
648: procedure assign_values
641: WHEN OTHERS THEN
642: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_PROCEDURE_MAPPINGS');
643: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
644: ec_utils.i_ret_code :=2;
645: raise EC_UTILS.PROGRAM_EXIT;
646: end load_procedure_mappings;
647:
648: procedure assign_values
649: (
664: end if;
665: -- Print Procedure Mappings as well as Parameters
666: -- Bug 2340691
667: if EC_DEBUG.G_debug_level >= 3 then
668: for k in 1..ec_utils.g_procedure_mappings.COUNT
669: loop
670: if (
671: ec_utils.g_procedure_mappings(k).procedure_name = i_procedure_name AND
672: ec_utils.g_procedure_mappings(k).transtage_id = i_transtage_id
667: if EC_DEBUG.G_debug_level >= 3 then
668: for k in 1..ec_utils.g_procedure_mappings.COUNT
669: loop
670: if (
671: ec_utils.g_procedure_mappings(k).procedure_name = i_procedure_name AND
672: ec_utils.g_procedure_mappings(k).transtage_id = i_transtage_id
673: )
674: then
675: ec_debug.pl(3,
668: for k in 1..ec_utils.g_procedure_mappings.COUNT
669: loop
670: if (
671: ec_utils.g_procedure_mappings(k).procedure_name = i_procedure_name AND
672: ec_utils.g_procedure_mappings(k).transtage_id = i_transtage_id
673: )
674: then
675: ec_debug.pl(3,
676: ec_utils.g_procedure_mappings(k).parameter_name||' '||
672: ec_utils.g_procedure_mappings(k).transtage_id = i_transtage_id
673: )
674: then
675: ec_debug.pl(3,
676: ec_utils.g_procedure_mappings(k).parameter_name||' '||
677: ec_utils.g_procedure_mappings(k).variable_level||' '||
678: ec_utils.g_procedure_mappings(k).variable_name
679: );
680: end if;
673: )
674: then
675: ec_debug.pl(3,
676: ec_utils.g_procedure_mappings(k).parameter_name||' '||
677: ec_utils.g_procedure_mappings(k).variable_level||' '||
678: ec_utils.g_procedure_mappings(k).variable_name
679: );
680: end if;
681: end loop;
674: then
675: ec_debug.pl(3,
676: ec_utils.g_procedure_mappings(k).parameter_name||' '||
677: ec_utils.g_procedure_mappings(k).variable_level||' '||
678: ec_utils.g_procedure_mappings(k).variable_name
679: );
680: end if;
681: end loop;
682: end if;
683:
684: --- Initialize all the values of parameter before assignment.
685: if i_action_type = 1060
686: then
687: for k in 1..ec_utils.g_parameter_stack.COUNT
688: loop
689: if (
690: ec_utils.g_parameter_stack(k).procedure_name = i_procedure_name
691: )
686: then
687: for k in 1..ec_utils.g_parameter_stack.COUNT
688: loop
689: if (
690: ec_utils.g_parameter_stack(k).procedure_name = i_procedure_name
691: )
692: then
693: ec_utils.g_parameter_stack(k).value := NULL;
694: end if;
689: if (
690: ec_utils.g_parameter_stack(k).procedure_name = i_procedure_name
691: )
692: then
693: ec_utils.g_parameter_stack(k).value := NULL;
694: end if;
695: end loop;
696: end if;
697:
702: i_procedure_name
703: );
704: end if;
705:
706: for i in 1..ec_utils.g_procedure_mappings.COUNT
707: loop
708: IF ( ec_utils.g_procedure_mappings(i).transtage_id = i_transtage_id
709: AND ec_utils.g_procedure_mappings(i).procedure_name = i_procedure_name
710: AND ec_utils.g_procedure_mappings(i).action_type = i_action_type
704: end if;
705:
706: for i in 1..ec_utils.g_procedure_mappings.COUNT
707: loop
708: IF ( ec_utils.g_procedure_mappings(i).transtage_id = i_transtage_id
709: AND ec_utils.g_procedure_mappings(i).procedure_name = i_procedure_name
710: AND ec_utils.g_procedure_mappings(i).action_type = i_action_type
711: )
712: then
705:
706: for i in 1..ec_utils.g_procedure_mappings.COUNT
707: loop
708: IF ( ec_utils.g_procedure_mappings(i).transtage_id = i_transtage_id
709: AND ec_utils.g_procedure_mappings(i).procedure_name = i_procedure_name
710: AND ec_utils.g_procedure_mappings(i).action_type = i_action_type
711: )
712: then
713: if EC_DEBUG.G_debug_level >= 3 then
706: for i in 1..ec_utils.g_procedure_mappings.COUNT
707: loop
708: IF ( ec_utils.g_procedure_mappings(i).transtage_id = i_transtage_id
709: AND ec_utils.g_procedure_mappings(i).procedure_name = i_procedure_name
710: AND ec_utils.g_procedure_mappings(i).action_type = i_action_type
711: )
712: then
713: if EC_DEBUG.G_debug_level >= 3 then
714: ec_debug.pl(3,'Processing ',ec_utils.g_procedure_mappings(i).parameter_name);
710: AND ec_utils.g_procedure_mappings(i).action_type = i_action_type
711: )
712: then
713: if EC_DEBUG.G_debug_level >= 3 then
714: ec_debug.pl(3,'Processing ',ec_utils.g_procedure_mappings(i).parameter_name);
715: end if;
716: m_var_found := ec_utils.find_variable
717: (
718: ec_utils.g_procedure_mappings(i).variable_level,
712: then
713: if EC_DEBUG.G_debug_level >= 3 then
714: ec_debug.pl(3,'Processing ',ec_utils.g_procedure_mappings(i).parameter_name);
715: end if;
716: m_var_found := ec_utils.find_variable
717: (
718: ec_utils.g_procedure_mappings(i).variable_level,
719: ec_utils.g_procedure_mappings(i).variable_name,
720: i_stack_pos,
714: ec_debug.pl(3,'Processing ',ec_utils.g_procedure_mappings(i).parameter_name);
715: end if;
716: m_var_found := ec_utils.find_variable
717: (
718: ec_utils.g_procedure_mappings(i).variable_level,
719: ec_utils.g_procedure_mappings(i).variable_name,
720: i_stack_pos,
721: i_plsql_pos
722: );
715: end if;
716: m_var_found := ec_utils.find_variable
717: (
718: ec_utils.g_procedure_mappings(i).variable_level,
719: ec_utils.g_procedure_mappings(i).variable_name,
720: i_stack_pos,
721: i_plsql_pos
722: );
723: if NOT ( m_var_found)
722: );
723: if NOT ( m_var_found)
724: then
725: ec_debug.pl(0,'EC','ECE_VARIABLE_NOT_ON_STACK','VARIABLE_NAME',
726: ec_utils.g_procedure_mappings(i).variable_name);
727: ec_utils.i_ret_code := 2;
728: raise EC_UTILS.PROGRAM_EXIT;
729: end if;
730:
723: if NOT ( m_var_found)
724: then
725: ec_debug.pl(0,'EC','ECE_VARIABLE_NOT_ON_STACK','VARIABLE_NAME',
726: ec_utils.g_procedure_mappings(i).variable_name);
727: ec_utils.i_ret_code := 2;
728: raise EC_UTILS.PROGRAM_EXIT;
729: end if;
730:
731: for j in 1..ec_utils.g_parameter_stack.COUNT
724: then
725: ec_debug.pl(0,'EC','ECE_VARIABLE_NOT_ON_STACK','VARIABLE_NAME',
726: ec_utils.g_procedure_mappings(i).variable_name);
727: ec_utils.i_ret_code := 2;
728: raise EC_UTILS.PROGRAM_EXIT;
729: end if;
730:
731: for j in 1..ec_utils.g_parameter_stack.COUNT
732: loop
727: ec_utils.i_ret_code := 2;
728: raise EC_UTILS.PROGRAM_EXIT;
729: end if;
730:
731: for j in 1..ec_utils.g_parameter_stack.COUNT
732: loop
733: if (
734: ec_utils.g_procedure_mappings(i).parameter_name is not null AND
735: ec_utils.g_parameter_stack(j).procedure_name = ec_utils.g_procedure_mappings(i).procedure_name AND
730:
731: for j in 1..ec_utils.g_parameter_stack.COUNT
732: loop
733: if (
734: ec_utils.g_procedure_mappings(i).parameter_name is not null AND
735: ec_utils.g_parameter_stack(j).procedure_name = ec_utils.g_procedure_mappings(i).procedure_name AND
736: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
737: )
738: then
731: for j in 1..ec_utils.g_parameter_stack.COUNT
732: loop
733: if (
734: ec_utils.g_procedure_mappings(i).parameter_name is not null AND
735: ec_utils.g_parameter_stack(j).procedure_name = ec_utils.g_procedure_mappings(i).procedure_name AND
736: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
737: )
738: then
739: if EC_DEBUG.G_debug_level >= 3 then
732: loop
733: if (
734: ec_utils.g_procedure_mappings(i).parameter_name is not null AND
735: ec_utils.g_parameter_stack(j).procedure_name = ec_utils.g_procedure_mappings(i).procedure_name AND
736: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
737: )
738: then
739: if EC_DEBUG.G_debug_level >= 3 then
740: ec_debug.pl(3,'Match Found for ',ec_utils.g_procedure_mappings(i).parameter_name);
736: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
737: )
738: then
739: if EC_DEBUG.G_debug_level >= 3 then
740: ec_debug.pl(3,'Match Found for ',ec_utils.g_procedure_mappings(i).parameter_name);
741: end if;
742: if ec_utils.g_procedure_mappings(i).action_type = 1060
743: then
744: if ec_utils.g_procedure_mappings(i).variable_level = 0
738: then
739: if EC_DEBUG.G_debug_level >= 3 then
740: ec_debug.pl(3,'Match Found for ',ec_utils.g_procedure_mappings(i).parameter_name);
741: end if;
742: if ec_utils.g_procedure_mappings(i).action_type = 1060
743: then
744: if ec_utils.g_procedure_mappings(i).variable_level = 0
745: then
746: ec_utils.g_parameter_stack(j).value :=
740: ec_debug.pl(3,'Match Found for ',ec_utils.g_procedure_mappings(i).parameter_name);
741: end if;
742: if ec_utils.g_procedure_mappings(i).action_type = 1060
743: then
744: if ec_utils.g_procedure_mappings(i).variable_level = 0
745: then
746: ec_utils.g_parameter_stack(j).value :=
747: ec_utils.g_stack(i_stack_pos).variable_value;
748: if EC_DEBUG.G_debug_level >= 3 then
742: if ec_utils.g_procedure_mappings(i).action_type = 1060
743: then
744: if ec_utils.g_procedure_mappings(i).variable_level = 0
745: then
746: ec_utils.g_parameter_stack(j).value :=
747: ec_utils.g_stack(i_stack_pos).variable_value;
748: if EC_DEBUG.G_debug_level >= 3 then
749: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,
750: ec_utils.g_parameter_stack(j).value);
743: then
744: if ec_utils.g_procedure_mappings(i).variable_level = 0
745: then
746: ec_utils.g_parameter_stack(j).value :=
747: ec_utils.g_stack(i_stack_pos).variable_value;
748: if EC_DEBUG.G_debug_level >= 3 then
749: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,
750: ec_utils.g_parameter_stack(j).value);
751: end if;
745: then
746: ec_utils.g_parameter_stack(j).value :=
747: ec_utils.g_stack(i_stack_pos).variable_value;
748: if EC_DEBUG.G_debug_level >= 3 then
749: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,
750: ec_utils.g_parameter_stack(j).value);
751: end if;
752: else
753: ec_utils.g_parameter_stack(j).value := ec_utils.g_file_tbl(i_plsql_pos).value;
746: ec_utils.g_parameter_stack(j).value :=
747: ec_utils.g_stack(i_stack_pos).variable_value;
748: if EC_DEBUG.G_debug_level >= 3 then
749: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,
750: ec_utils.g_parameter_stack(j).value);
751: end if;
752: else
753: ec_utils.g_parameter_stack(j).value := ec_utils.g_file_tbl(i_plsql_pos).value;
754: if EC_DEBUG.G_debug_level >= 3 then
749: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,
750: ec_utils.g_parameter_stack(j).value);
751: end if;
752: else
753: ec_utils.g_parameter_stack(j).value := ec_utils.g_file_tbl(i_plsql_pos).value;
754: if EC_DEBUG.G_debug_level >= 3 then
755: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,
756: ec_utils.g_parameter_stack(j).value);
757: end if;
751: end if;
752: else
753: ec_utils.g_parameter_stack(j).value := ec_utils.g_file_tbl(i_plsql_pos).value;
754: if EC_DEBUG.G_debug_level >= 3 then
755: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,
756: ec_utils.g_parameter_stack(j).value);
757: end if;
758: end if;
759: exit;
752: else
753: ec_utils.g_parameter_stack(j).value := ec_utils.g_file_tbl(i_plsql_pos).value;
754: if EC_DEBUG.G_debug_level >= 3 then
755: ec_debug.pl(3,ec_utils.g_parameter_stack(j).parameter_name,
756: ec_utils.g_parameter_stack(j).value);
757: end if;
758: end if;
759: exit;
760:
757: end if;
758: end if;
759: exit;
760:
761: elsif ec_utils.g_procedure_mappings(i).action_type = 1070
762: then
763:
764: if ec_utils.g_parameter_stack(j).parameter_name is not null AND
765: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
760:
761: elsif ec_utils.g_procedure_mappings(i).action_type = 1070
762: then
763:
764: if ec_utils.g_parameter_stack(j).parameter_name is not null AND
765: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
766: then
767: if ec_utils.g_procedure_mappings(i).variable_level = 0
768: then
761: elsif ec_utils.g_procedure_mappings(i).action_type = 1070
762: then
763:
764: if ec_utils.g_parameter_stack(j).parameter_name is not null AND
765: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
766: then
767: if ec_utils.g_procedure_mappings(i).variable_level = 0
768: then
769: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
763:
764: if ec_utils.g_parameter_stack(j).parameter_name is not null AND
765: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
766: then
767: if ec_utils.g_procedure_mappings(i).variable_level = 0
768: then
769: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
770: if EC_DEBUG.G_debug_level >= 3 then
771: ec_debug.pl(3,ec_utils.g_stack(i_stack_pos).variable_name,
765: ec_utils.g_parameter_stack(j).parameter_name = ec_utils.g_procedure_mappings(i).parameter_name
766: then
767: if ec_utils.g_procedure_mappings(i).variable_level = 0
768: then
769: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
770: if EC_DEBUG.G_debug_level >= 3 then
771: ec_debug.pl(3,ec_utils.g_stack(i_stack_pos).variable_name,
772: ec_utils.g_stack(i_stack_pos).variable_value);
773: end if;
767: if ec_utils.g_procedure_mappings(i).variable_level = 0
768: then
769: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
770: if EC_DEBUG.G_debug_level >= 3 then
771: ec_debug.pl(3,ec_utils.g_stack(i_stack_pos).variable_name,
772: ec_utils.g_stack(i_stack_pos).variable_value);
773: end if;
774: else
775: ec_utils.g_file_tbl(i_plsql_pos).value := ec_utils.g_parameter_stack(j).value;
768: then
769: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
770: if EC_DEBUG.G_debug_level >= 3 then
771: ec_debug.pl(3,ec_utils.g_stack(i_stack_pos).variable_name,
772: ec_utils.g_stack(i_stack_pos).variable_value);
773: end if;
774: else
775: ec_utils.g_file_tbl(i_plsql_pos).value := ec_utils.g_parameter_stack(j).value;
776: if EC_DEBUG.G_debug_level >= 3 then
771: ec_debug.pl(3,ec_utils.g_stack(i_stack_pos).variable_name,
772: ec_utils.g_stack(i_stack_pos).variable_value);
773: end if;
774: else
775: ec_utils.g_file_tbl(i_plsql_pos).value := ec_utils.g_parameter_stack(j).value;
776: if EC_DEBUG.G_debug_level >= 3 then
777: ec_debug.pl(3,
778: ec_utils.g_file_tbl(i_plsql_pos).interface_column_name,
779: ec_utils.g_file_tbl(i_plsql_pos).value);
774: else
775: ec_utils.g_file_tbl(i_plsql_pos).value := ec_utils.g_parameter_stack(j).value;
776: if EC_DEBUG.G_debug_level >= 3 then
777: ec_debug.pl(3,
778: ec_utils.g_file_tbl(i_plsql_pos).interface_column_name,
779: ec_utils.g_file_tbl(i_plsql_pos).value);
780: end if;
781: end if;
782: exit;
775: ec_utils.g_file_tbl(i_plsql_pos).value := ec_utils.g_parameter_stack(j).value;
776: if EC_DEBUG.G_debug_level >= 3 then
777: ec_debug.pl(3,
778: ec_utils.g_file_tbl(i_plsql_pos).interface_column_name,
779: ec_utils.g_file_tbl(i_plsql_pos).value);
780: end if;
781: end if;
782: exit;
783: end if;
785: else
786: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
787: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.ASSIGN_VALUES');
788: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
789: ec_utils.i_ret_code :=2;
790: raise EC_UTILS.PROGRAM_EXIT;
791: end if; -- For Action Types
792:
793: else
786: ec_debug.pl(0,'EC','ECE_PROCEDURE_EXECUTION','PROCEDURE_NAME',i_procedure_name);
787: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.ASSIGN_VALUES');
788: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
789: ec_utils.i_ret_code :=2;
790: raise EC_UTILS.PROGRAM_EXIT;
791: end if; -- For Action Types
792:
793: else
794: -- Assign Back the Function value
792:
793: else
794: -- Assign Back the Function value
795: if (
796: ec_utils.g_procedure_mappings(i).parameter_name is null AND
797: ec_utils.g_parameter_stack(j).procedure_name = ec_utils.g_procedure_mappings(i).procedure_name AND
798: ec_utils.g_parameter_stack(j).parameter_name is null
799: )
800: then
793: else
794: -- Assign Back the Function value
795: if (
796: ec_utils.g_procedure_mappings(i).parameter_name is null AND
797: ec_utils.g_parameter_stack(j).procedure_name = ec_utils.g_procedure_mappings(i).procedure_name AND
798: ec_utils.g_parameter_stack(j).parameter_name is null
799: )
800: then
801: if EC_DEBUG.G_debug_level >= 3 then
794: -- Assign Back the Function value
795: if (
796: ec_utils.g_procedure_mappings(i).parameter_name is null AND
797: ec_utils.g_parameter_stack(j).procedure_name = ec_utils.g_procedure_mappings(i).procedure_name AND
798: ec_utils.g_parameter_stack(j).parameter_name is null
799: )
800: then
801: if EC_DEBUG.G_debug_level >= 3 then
802: ec_debug.pl(3,'Match Found for ',ec_utils.g_procedure_mappings(i).parameter_name);
798: ec_utils.g_parameter_stack(j).parameter_name is null
799: )
800: then
801: if EC_DEBUG.G_debug_level >= 3 then
802: ec_debug.pl(3,'Match Found for ',ec_utils.g_procedure_mappings(i).parameter_name);
803: end if;
804: if ec_utils.g_procedure_mappings(i).action_type = 1070
805: then
806: if ec_utils.g_procedure_mappings(i).variable_level = 0
800: then
801: if EC_DEBUG.G_debug_level >= 3 then
802: ec_debug.pl(3,'Match Found for ',ec_utils.g_procedure_mappings(i).parameter_name);
803: end if;
804: if ec_utils.g_procedure_mappings(i).action_type = 1070
805: then
806: if ec_utils.g_procedure_mappings(i).variable_level = 0
807: then
808: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
802: ec_debug.pl(3,'Match Found for ',ec_utils.g_procedure_mappings(i).parameter_name);
803: end if;
804: if ec_utils.g_procedure_mappings(i).action_type = 1070
805: then
806: if ec_utils.g_procedure_mappings(i).variable_level = 0
807: then
808: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
809: else
810: ec_utils.g_file_tbl(i_plsql_pos).value := ec_utils.g_parameter_stack(j).value;
804: if ec_utils.g_procedure_mappings(i).action_type = 1070
805: then
806: if ec_utils.g_procedure_mappings(i).variable_level = 0
807: then
808: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
809: else
810: ec_utils.g_file_tbl(i_plsql_pos).value := ec_utils.g_parameter_stack(j).value;
811: end if;
812: end if;
806: if ec_utils.g_procedure_mappings(i).variable_level = 0
807: then
808: ec_utils.g_stack(i_stack_pos).variable_value := ec_utils.g_parameter_stack(j).value;
809: else
810: ec_utils.g_file_tbl(i_plsql_pos).value := ec_utils.g_parameter_stack(j).value;
811: end if;
812: end if;
813: exit;
814: end if;
821: if EC_DEBUG.G_debug_level >= 2 then
822: ec_debug.pop('EC_EXECUTION_UTILS.ASSIGN_VALUES');
823: end if;
824: exception
825: WHEN EC_UTILS.PROGRAM_EXIT then
826: raise;
827: WHEN OTHERS THEN
828: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.ASSIGN_VALUES');
829: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
826: raise;
827: WHEN OTHERS THEN
828: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.ASSIGN_VALUES');
829: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
830: ec_utils.i_ret_code :=2;
831: raise EC_UTILS.PROGRAM_EXIT;
832: end assign_values;
833:
834: procedure load_mappings
827: WHEN OTHERS THEN
828: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.ASSIGN_VALUES');
829: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
830: ec_utils.i_ret_code :=2;
831: raise EC_UTILS.PROGRAM_EXIT;
832: end assign_values;
833:
834: procedure load_mappings
835: (
920: from ece_column_rules
921: where interface_column_id = p_interface_column_id
922: order by sequence;
923:
924: m_count pls_integer := ec_utils.g_file_tbl.COUNT;
925: i_count pls_integer :=0;
926: j_count pls_integer :=0;
927: i_file_count pls_integer :=0;
928: i pls_integer :=0;
942: ec_debug.pl(3,'i_map_id',i_map_id);
943:
944: ec_debug.pl(3,'EC','ECE_LOADING_LEVELS','LEVEL','Loading External levels');
945: end if;
946: i_count := ec_utils.g_ext_levels.COUNT;
947: i := i_count;
948:
949: /**
950: Set the Stack Pointer for Level 0 to 1..0
948:
949: /**
950: Set the Stack Pointer for Level 0 to 1..0
951: **/
952: ec_utils.g_stack_pointer(0).start_pos :=1;
953: ec_utils.g_stack_pointer(0).end_pos :=0;
954:
955: for c1 in external_rec
956: (
949: /**
950: Set the Stack Pointer for Level 0 to 1..0
951: **/
952: ec_utils.g_stack_pointer(0).start_pos :=1;
953: ec_utils.g_stack_pointer(0).end_pos :=0;
954:
955: for c1 in external_rec
956: (
957: p_transaction_type => i_transaction_type,
958: p_map_id => i_map_id
959: )
960: loop
961: i_count := i_count + 1;
962: ec_utils.g_ext_levels(i_count).external_level := c1.external_level;
963: ec_utils.g_ext_levels(i_count).record_number := c1.start_element;
964: ec_utils.g_ext_levels(i_count).sql_stmt := NULL;
965: ec_utils.g_ext_levels(i_count).cursor_handle := 0;
966: ec_utils.g_ext_levels(i_count).file_start_pos := 0;
959: )
960: loop
961: i_count := i_count + 1;
962: ec_utils.g_ext_levels(i_count).external_level := c1.external_level;
963: ec_utils.g_ext_levels(i_count).record_number := c1.start_element;
964: ec_utils.g_ext_levels(i_count).sql_stmt := NULL;
965: ec_utils.g_ext_levels(i_count).cursor_handle := 0;
966: ec_utils.g_ext_levels(i_count).file_start_pos := 0;
967: ec_utils.g_ext_levels(i_count).file_end_pos := 0;
960: loop
961: i_count := i_count + 1;
962: ec_utils.g_ext_levels(i_count).external_level := c1.external_level;
963: ec_utils.g_ext_levels(i_count).record_number := c1.start_element;
964: ec_utils.g_ext_levels(i_count).sql_stmt := NULL;
965: ec_utils.g_ext_levels(i_count).cursor_handle := 0;
966: ec_utils.g_ext_levels(i_count).file_start_pos := 0;
967: ec_utils.g_ext_levels(i_count).file_end_pos := 0;
968: if EC_DEBUG.G_debug_level >= 3 then
961: i_count := i_count + 1;
962: ec_utils.g_ext_levels(i_count).external_level := c1.external_level;
963: ec_utils.g_ext_levels(i_count).record_number := c1.start_element;
964: ec_utils.g_ext_levels(i_count).sql_stmt := NULL;
965: ec_utils.g_ext_levels(i_count).cursor_handle := 0;
966: ec_utils.g_ext_levels(i_count).file_start_pos := 0;
967: ec_utils.g_ext_levels(i_count).file_end_pos := 0;
968: if EC_DEBUG.G_debug_level >= 3 then
969: ec_debug.pl(3,'External Level ('||i_count||')',ec_utils.g_ext_levels(i_count).external_level);
962: ec_utils.g_ext_levels(i_count).external_level := c1.external_level;
963: ec_utils.g_ext_levels(i_count).record_number := c1.start_element;
964: ec_utils.g_ext_levels(i_count).sql_stmt := NULL;
965: ec_utils.g_ext_levels(i_count).cursor_handle := 0;
966: ec_utils.g_ext_levels(i_count).file_start_pos := 0;
967: ec_utils.g_ext_levels(i_count).file_end_pos := 0;
968: if EC_DEBUG.G_debug_level >= 3 then
969: ec_debug.pl(3,'External Level ('||i_count||')',ec_utils.g_ext_levels(i_count).external_level);
970:
963: ec_utils.g_ext_levels(i_count).record_number := c1.start_element;
964: ec_utils.g_ext_levels(i_count).sql_stmt := NULL;
965: ec_utils.g_ext_levels(i_count).cursor_handle := 0;
966: ec_utils.g_ext_levels(i_count).file_start_pos := 0;
967: ec_utils.g_ext_levels(i_count).file_end_pos := 0;
968: if EC_DEBUG.G_debug_level >= 3 then
969: ec_debug.pl(3,'External Level ('||i_count||')',ec_utils.g_ext_levels(i_count).external_level);
970:
971: ec_debug.pl(3,'EC','ECE_LOADING_LEVELS','LEVEL','Loading Levels Matrices');
965: ec_utils.g_ext_levels(i_count).cursor_handle := 0;
966: ec_utils.g_ext_levels(i_count).file_start_pos := 0;
967: ec_utils.g_ext_levels(i_count).file_end_pos := 0;
968: if EC_DEBUG.G_debug_level >= 3 then
969: ec_debug.pl(3,'External Level ('||i_count||')',ec_utils.g_ext_levels(i_count).external_level);
970:
971: ec_debug.pl(3,'EC','ECE_LOADING_LEVELS','LEVEL','Loading Levels Matrices');
972: end if;
973:
970:
971: ec_debug.pl(3,'EC','ECE_LOADING_LEVELS','LEVEL','Loading Levels Matrices');
972: end if;
973:
974: j_count := ec_utils.g_int_ext_levels.COUNT;
975: j := j_count;
976: for c3 in interface_external_rec
977: (
978: p_external_id => c1.external_level_id
978: p_external_id => c1.external_level_id
979: )
980: loop
981: j_count := j_count + 1;
982: ec_utils.g_int_ext_levels(j_count).interface_level := c3.output_level;
983: ec_utils.g_int_ext_levels(j_count).external_level := c1.external_level;
984: if EC_DEBUG.G_debug_level >= 3 then
985: ec_debug.pl(3,'Internal Level '||c3.Output_level||' External Level '||c1.External_level);
986: end if;
979: )
980: loop
981: j_count := j_count + 1;
982: ec_utils.g_int_ext_levels(j_count).interface_level := c3.output_level;
983: ec_utils.g_int_ext_levels(j_count).external_level := c1.external_level;
984: if EC_DEBUG.G_debug_level >= 3 then
985: ec_debug.pl(3,'Internal Level '||c3.Output_level||' External Level '||c1.External_level);
986: end if;
987: end loop;
994: ec_debug.pl(0,'EC','ECE_SEED_DATA_MISSING','TRANSACTION_TYPE',i_transaction_type,'MAPID',i_map_id);
995: /**
996: Set the Retcode for the Concurrent Manager
997: **/
998: ec_utils.i_ret_code := 2;
999: raise ec_utils.program_exit;
1000: end if;
1001:
1002: end loop;
995: /**
996: Set the Retcode for the Concurrent Manager
997: **/
998: ec_utils.i_ret_code := 2;
999: raise ec_utils.program_exit;
1000: end if;
1001:
1002: end loop;
1003:
1009: ec_debug.pl(0,'EC','ECE_SEED_DATA_MISSING','TRANSACTION_TYPE',i_transaction_type,'MAPID',i_map_id);
1010: /**
1011: Set the Retcode for the Concurrent Manager
1012: **/
1013: ec_utils.i_ret_code := 2;
1014: raise ec_utils.program_exit;
1015: end if;
1016:
1017: if EC_DEBUG.G_debug_level >= 3 then
1010: /**
1011: Set the Retcode for the Concurrent Manager
1012: **/
1013: ec_utils.i_ret_code := 2;
1014: raise ec_utils.program_exit;
1015: end if;
1016:
1017: if EC_DEBUG.G_debug_level >= 3 then
1018: ec_debug.pl(3,'EC','ECE_LOADING_LEVELS','LEVEL','Loading Internal Levels');
1016:
1017: if EC_DEBUG.G_debug_level >= 3 then
1018: ec_debug.pl(3,'EC','ECE_LOADING_LEVELS','LEVEL','Loading Internal Levels');
1019: end if;
1020: i_count :=ec_utils.g_int_levels.COUNT;
1021: k := i_count;
1022: for c2 in interface_rec
1023: (
1024: p_transaction_type => i_transaction_type,
1024: p_transaction_type => i_transaction_type,
1025: p_map_id => i_map_id
1026: )
1027: loop
1028: i_count := ec_utils.g_int_levels.COUNT + 1;
1029: ec_utils.g_int_levels(i_count).interface_level := c2.output_level;
1030: ec_utils.g_int_levels(i_count).base_table_name := c2.interface_table_name;
1031: ec_utils.g_int_levels(i_count).parent_level := c2.parent_level;
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1025: p_map_id => i_map_id
1026: )
1027: loop
1028: i_count := ec_utils.g_int_levels.COUNT + 1;
1029: ec_utils.g_int_levels(i_count).interface_level := c2.output_level;
1030: ec_utils.g_int_levels(i_count).base_table_name := c2.interface_table_name;
1031: ec_utils.g_int_levels(i_count).parent_level := c2.parent_level;
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1033: ec_utils.g_int_levels(i_count).cursor_handle := 0;
1026: )
1027: loop
1028: i_count := ec_utils.g_int_levels.COUNT + 1;
1029: ec_utils.g_int_levels(i_count).interface_level := c2.output_level;
1030: ec_utils.g_int_levels(i_count).base_table_name := c2.interface_table_name;
1031: ec_utils.g_int_levels(i_count).parent_level := c2.parent_level;
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1033: ec_utils.g_int_levels(i_count).cursor_handle := 0;
1034: ec_utils.g_int_levels(i_count).rows_processed := 0;
1027: loop
1028: i_count := ec_utils.g_int_levels.COUNT + 1;
1029: ec_utils.g_int_levels(i_count).interface_level := c2.output_level;
1030: ec_utils.g_int_levels(i_count).base_table_name := c2.interface_table_name;
1031: ec_utils.g_int_levels(i_count).parent_level := c2.parent_level;
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1033: ec_utils.g_int_levels(i_count).cursor_handle := 0;
1034: ec_utils.g_int_levels(i_count).rows_processed := 0;
1035: ec_utils.g_int_levels(i_count).file_start_pos := 1;
1028: i_count := ec_utils.g_int_levels.COUNT + 1;
1029: ec_utils.g_int_levels(i_count).interface_level := c2.output_level;
1030: ec_utils.g_int_levels(i_count).base_table_name := c2.interface_table_name;
1031: ec_utils.g_int_levels(i_count).parent_level := c2.parent_level;
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1033: ec_utils.g_int_levels(i_count).cursor_handle := 0;
1034: ec_utils.g_int_levels(i_count).rows_processed := 0;
1035: ec_utils.g_int_levels(i_count).file_start_pos := 1;
1036: ec_utils.g_int_levels(i_count).file_end_pos := 0;
1029: ec_utils.g_int_levels(i_count).interface_level := c2.output_level;
1030: ec_utils.g_int_levels(i_count).base_table_name := c2.interface_table_name;
1031: ec_utils.g_int_levels(i_count).parent_level := c2.parent_level;
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1033: ec_utils.g_int_levels(i_count).cursor_handle := 0;
1034: ec_utils.g_int_levels(i_count).rows_processed := 0;
1035: ec_utils.g_int_levels(i_count).file_start_pos := 1;
1036: ec_utils.g_int_levels(i_count).file_end_pos := 0;
1037: if EC_DEBUG.G_debug_level >= 3 then
1030: ec_utils.g_int_levels(i_count).base_table_name := c2.interface_table_name;
1031: ec_utils.g_int_levels(i_count).parent_level := c2.parent_level;
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1033: ec_utils.g_int_levels(i_count).cursor_handle := 0;
1034: ec_utils.g_int_levels(i_count).rows_processed := 0;
1035: ec_utils.g_int_levels(i_count).file_start_pos := 1;
1036: ec_utils.g_int_levels(i_count).file_end_pos := 0;
1037: if EC_DEBUG.G_debug_level >= 3 then
1038: ec_debug.pl(3,'Internal Level ('||i_count||') Object Name: '
1031: ec_utils.g_int_levels(i_count).parent_level := c2.parent_level;
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1033: ec_utils.g_int_levels(i_count).cursor_handle := 0;
1034: ec_utils.g_int_levels(i_count).rows_processed := 0;
1035: ec_utils.g_int_levels(i_count).file_start_pos := 1;
1036: ec_utils.g_int_levels(i_count).file_end_pos := 0;
1037: if EC_DEBUG.G_debug_level >= 3 then
1038: ec_debug.pl(3,'Internal Level ('||i_count||') Object Name: '
1039: ||ec_utils.g_int_levels(i_count).base_table_name||
1032: ec_utils.g_int_levels(i_count).key_column_name := c2.key_column_name;
1033: ec_utils.g_int_levels(i_count).cursor_handle := 0;
1034: ec_utils.g_int_levels(i_count).rows_processed := 0;
1035: ec_utils.g_int_levels(i_count).file_start_pos := 1;
1036: ec_utils.g_int_levels(i_count).file_end_pos := 0;
1037: if EC_DEBUG.G_debug_level >= 3 then
1038: ec_debug.pl(3,'Internal Level ('||i_count||') Object Name: '
1039: ||ec_utils.g_int_levels(i_count).base_table_name||
1040: ' Parent Level '||ec_utils.g_int_levels(i_count).parent_level);
1035: ec_utils.g_int_levels(i_count).file_start_pos := 1;
1036: ec_utils.g_int_levels(i_count).file_end_pos := 0;
1037: if EC_DEBUG.G_debug_level >= 3 then
1038: ec_debug.pl(3,'Internal Level ('||i_count||') Object Name: '
1039: ||ec_utils.g_int_levels(i_count).base_table_name||
1040: ' Parent Level '||ec_utils.g_int_levels(i_count).parent_level);
1041: end if;
1042: i_file_count := m_count;
1043: i_first_found := FALSE;
1036: ec_utils.g_int_levels(i_count).file_end_pos := 0;
1037: if EC_DEBUG.G_debug_level >= 3 then
1038: ec_debug.pl(3,'Internal Level ('||i_count||') Object Name: '
1039: ||ec_utils.g_int_levels(i_count).base_table_name||
1040: ' Parent Level '||ec_utils.g_int_levels(i_count).parent_level);
1041: end if;
1042: i_file_count := m_count;
1043: i_first_found := FALSE;
1044:
1047: c2.interface_table_id,
1048: i_map_id
1049: )
1050: loop
1051: m_count := ec_utils.g_file_tbl.COUNT + 1;
1052: /**
1053: Set the File Pointer now
1054: **/
1055: if NOT (i_first_found)
1054: **/
1055: if NOT (i_first_found)
1056: then
1057: i_first_found := TRUE;
1058: ec_utils.g_int_levels(i_count).file_start_pos := m_count;
1059: end if;
1060:
1061: ec_utils.g_file_tbl(m_count).interface_level := c2.output_level;
1062: ec_utils.g_file_tbl(m_count).interface_column_id := c4.interface_column_id;
1057: i_first_found := TRUE;
1058: ec_utils.g_int_levels(i_count).file_start_pos := m_count;
1059: end if;
1060:
1061: ec_utils.g_file_tbl(m_count).interface_level := c2.output_level;
1062: ec_utils.g_file_tbl(m_count).interface_column_id := c4.interface_column_id;
1063: ec_utils.g_file_tbl(m_count).interface_column_name := c4.interface_column_name;
1064: ec_utils.g_file_tbl(m_count).base_column_name := c4.base_column_name;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1058: ec_utils.g_int_levels(i_count).file_start_pos := m_count;
1059: end if;
1060:
1061: ec_utils.g_file_tbl(m_count).interface_level := c2.output_level;
1062: ec_utils.g_file_tbl(m_count).interface_column_id := c4.interface_column_id;
1063: ec_utils.g_file_tbl(m_count).interface_column_name := c4.interface_column_name;
1064: ec_utils.g_file_tbl(m_count).base_column_name := c4.base_column_name;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1059: end if;
1060:
1061: ec_utils.g_file_tbl(m_count).interface_level := c2.output_level;
1062: ec_utils.g_file_tbl(m_count).interface_column_id := c4.interface_column_id;
1063: ec_utils.g_file_tbl(m_count).interface_column_name := c4.interface_column_name;
1064: ec_utils.g_file_tbl(m_count).base_column_name := c4.base_column_name;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1060:
1061: ec_utils.g_file_tbl(m_count).interface_level := c2.output_level;
1062: ec_utils.g_file_tbl(m_count).interface_column_id := c4.interface_column_id;
1063: ec_utils.g_file_tbl(m_count).interface_column_name := c4.interface_column_name;
1064: ec_utils.g_file_tbl(m_count).base_column_name := c4.base_column_name;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1061: ec_utils.g_file_tbl(m_count).interface_level := c2.output_level;
1062: ec_utils.g_file_tbl(m_count).interface_column_id := c4.interface_column_id;
1063: ec_utils.g_file_tbl(m_count).interface_column_name := c4.interface_column_name;
1064: ec_utils.g_file_tbl(m_count).base_column_name := c4.base_column_name;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1062: ec_utils.g_file_tbl(m_count).interface_column_id := c4.interface_column_id;
1063: ec_utils.g_file_tbl(m_count).interface_column_name := c4.interface_column_name;
1064: ec_utils.g_file_tbl(m_count).base_column_name := c4.base_column_name;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1063: ec_utils.g_file_tbl(m_count).interface_column_name := c4.interface_column_name;
1064: ec_utils.g_file_tbl(m_count).base_column_name := c4.base_column_name;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1064: ec_utils.g_file_tbl(m_count).base_column_name := c4.base_column_name;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1065: ec_utils.g_file_tbl(m_count).conversion_sequence := c4.conversion_sequence;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1066: ec_utils.g_file_tbl(m_count).conversion_group_id := c4.conversion_group_id;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1067: ec_utils.g_file_tbl(m_count).xref_category_id := c4.xref_category_id;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1068: ec_utils.g_file_tbl(m_count).xref_category_allowed := c4.xref_category_allowed;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1069: ec_utils.g_file_tbl(m_count).xref_key1_source_column := c4.xref_key1_source_column;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1070: ec_utils.g_file_tbl(m_count).xref_key2_source_column := c4.xref_key2_source_column;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1071: ec_utils.g_file_tbl(m_count).xref_key3_source_column := c4.xref_key3_source_column;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1079: ec_utils.g_file_tbl(m_count).record_number := c4.record_number;
1072: ec_utils.g_file_tbl(m_count).xref_key4_source_column := c4.xref_key4_source_column;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1079: ec_utils.g_file_tbl(m_count).record_number := c4.record_number;
1080: ec_utils.g_file_tbl(m_count).position := c4.position;
1073: ec_utils.g_file_tbl(m_count).xref_key5_source_column := c4.xref_key5_source_column;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1079: ec_utils.g_file_tbl(m_count).record_number := c4.record_number;
1080: ec_utils.g_file_tbl(m_count).position := c4.position;
1081: ec_utils.g_file_tbl(m_count).element_tag_name := c4.element_tag_name;
1074: ec_utils.g_file_tbl(m_count).staging_column := c4.staging_column;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1079: ec_utils.g_file_tbl(m_count).record_number := c4.record_number;
1080: ec_utils.g_file_tbl(m_count).position := c4.position;
1081: ec_utils.g_file_tbl(m_count).element_tag_name := c4.element_tag_name;
1082: ec_utils.g_file_tbl(m_count).external_level := c4.external_level;
1075: ec_utils.g_file_tbl(m_count).data_type := c4.data_type;
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1079: ec_utils.g_file_tbl(m_count).record_number := c4.record_number;
1080: ec_utils.g_file_tbl(m_count).position := c4.position;
1081: ec_utils.g_file_tbl(m_count).element_tag_name := c4.element_tag_name;
1082: ec_utils.g_file_tbl(m_count).external_level := c4.external_level;
1083:
1076: ec_utils.g_file_tbl(m_count).width := c4.width;
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1079: ec_utils.g_file_tbl(m_count).record_number := c4.record_number;
1080: ec_utils.g_file_tbl(m_count).position := c4.position;
1081: ec_utils.g_file_tbl(m_count).element_tag_name := c4.element_tag_name;
1082: ec_utils.g_file_tbl(m_count).external_level := c4.external_level;
1083:
1084: if EC_DEBUG.G_debug_level = 3 then
1077: ec_utils.g_file_tbl(m_count).record_layout_code := c4.record_layout_code;
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1079: ec_utils.g_file_tbl(m_count).record_number := c4.record_number;
1080: ec_utils.g_file_tbl(m_count).position := c4.position;
1081: ec_utils.g_file_tbl(m_count).element_tag_name := c4.element_tag_name;
1082: ec_utils.g_file_tbl(m_count).external_level := c4.external_level;
1083:
1084: if EC_DEBUG.G_debug_level = 3 then
1085: ec_debug.pl(3,
1078: ec_utils.g_file_tbl(m_count).record_layout_qualifier := c4.record_layout_qualifier;
1079: ec_utils.g_file_tbl(m_count).record_number := c4.record_number;
1080: ec_utils.g_file_tbl(m_count).position := c4.position;
1081: ec_utils.g_file_tbl(m_count).element_tag_name := c4.element_tag_name;
1082: ec_utils.g_file_tbl(m_count).external_level := c4.external_level;
1083:
1084: if EC_DEBUG.G_debug_level = 3 then
1085: ec_debug.pl(3,
1086: m_count||' '||
1083:
1084: if EC_DEBUG.G_debug_level = 3 then
1085: ec_debug.pl(3,
1086: m_count||' '||
1087: ec_utils.g_file_tbl(m_count).interface_level||' '||
1088: ec_utils.g_file_tbl(m_count).external_level||' '||
1089: ec_utils.g_file_tbl(m_count).interface_column_id||' '||
1090: ec_utils.g_file_tbl(m_count).interface_column_name||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1084: if EC_DEBUG.G_debug_level = 3 then
1085: ec_debug.pl(3,
1086: m_count||' '||
1087: ec_utils.g_file_tbl(m_count).interface_level||' '||
1088: ec_utils.g_file_tbl(m_count).external_level||' '||
1089: ec_utils.g_file_tbl(m_count).interface_column_id||' '||
1090: ec_utils.g_file_tbl(m_count).interface_column_name||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1085: ec_debug.pl(3,
1086: m_count||' '||
1087: ec_utils.g_file_tbl(m_count).interface_level||' '||
1088: ec_utils.g_file_tbl(m_count).external_level||' '||
1089: ec_utils.g_file_tbl(m_count).interface_column_id||' '||
1090: ec_utils.g_file_tbl(m_count).interface_column_name||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1086: m_count||' '||
1087: ec_utils.g_file_tbl(m_count).interface_level||' '||
1088: ec_utils.g_file_tbl(m_count).external_level||' '||
1089: ec_utils.g_file_tbl(m_count).interface_column_id||' '||
1090: ec_utils.g_file_tbl(m_count).interface_column_name||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1087: ec_utils.g_file_tbl(m_count).interface_level||' '||
1088: ec_utils.g_file_tbl(m_count).external_level||' '||
1089: ec_utils.g_file_tbl(m_count).interface_column_id||' '||
1090: ec_utils.g_file_tbl(m_count).interface_column_name||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1088: ec_utils.g_file_tbl(m_count).external_level||' '||
1089: ec_utils.g_file_tbl(m_count).interface_column_id||' '||
1090: ec_utils.g_file_tbl(m_count).interface_column_name||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1089: ec_utils.g_file_tbl(m_count).interface_column_id||' '||
1090: ec_utils.g_file_tbl(m_count).interface_column_name||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1090: ec_utils.g_file_tbl(m_count).interface_column_name||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1091: ec_utils.g_file_tbl(m_count).base_column_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1092: ec_utils.g_file_tbl(m_count).staging_column||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1093: ec_utils.g_file_tbl(m_count).data_type||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1094: ec_utils.g_file_tbl(m_count).width||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1095: ec_utils.g_file_tbl(m_count).record_layout_code||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1096: ec_utils.g_file_tbl(m_count).record_layout_qualifier||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1097: ec_utils.g_file_tbl(m_count).record_number||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1105: ec_utils.g_file_tbl(m_count).xref_key2_source_column||' '||
1098: ec_utils.g_file_tbl(m_count).position||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1105: ec_utils.g_file_tbl(m_count).xref_key2_source_column||' '||
1106: ec_utils.g_file_tbl(m_count).xref_key3_source_column||' '||
1099: ec_utils.g_file_tbl(m_count).element_tag_name||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1105: ec_utils.g_file_tbl(m_count).xref_key2_source_column||' '||
1106: ec_utils.g_file_tbl(m_count).xref_key3_source_column||' '||
1107: ec_utils.g_file_tbl(m_count).xref_key4_source_column||' '||
1100: ec_utils.g_file_tbl(m_count).conversion_sequence||' '||
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1105: ec_utils.g_file_tbl(m_count).xref_key2_source_column||' '||
1106: ec_utils.g_file_tbl(m_count).xref_key3_source_column||' '||
1107: ec_utils.g_file_tbl(m_count).xref_key4_source_column||' '||
1108: ec_utils.g_file_tbl(m_count).xref_key5_source_column
1101: ec_utils.g_file_tbl(m_count).conversion_group_id||' '||
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1105: ec_utils.g_file_tbl(m_count).xref_key2_source_column||' '||
1106: ec_utils.g_file_tbl(m_count).xref_key3_source_column||' '||
1107: ec_utils.g_file_tbl(m_count).xref_key4_source_column||' '||
1108: ec_utils.g_file_tbl(m_count).xref_key5_source_column
1109: );
1102: ec_utils.g_file_tbl(m_count).xref_category_id||' '||
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1105: ec_utils.g_file_tbl(m_count).xref_key2_source_column||' '||
1106: ec_utils.g_file_tbl(m_count).xref_key3_source_column||' '||
1107: ec_utils.g_file_tbl(m_count).xref_key4_source_column||' '||
1108: ec_utils.g_file_tbl(m_count).xref_key5_source_column
1109: );
1110: end if;
1103: ec_utils.g_file_tbl(m_count).xref_category_allowed||' '||
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1105: ec_utils.g_file_tbl(m_count).xref_key2_source_column||' '||
1106: ec_utils.g_file_tbl(m_count).xref_key3_source_column||' '||
1107: ec_utils.g_file_tbl(m_count).xref_key4_source_column||' '||
1108: ec_utils.g_file_tbl(m_count).xref_key5_source_column
1109: );
1110: end if;
1111:
1104: ec_utils.g_file_tbl(m_count).xref_key1_source_column||' '||
1105: ec_utils.g_file_tbl(m_count).xref_key2_source_column||' '||
1106: ec_utils.g_file_tbl(m_count).xref_key3_source_column||' '||
1107: ec_utils.g_file_tbl(m_count).xref_key4_source_column||' '||
1108: ec_utils.g_file_tbl(m_count).xref_key5_source_column
1109: );
1110: end if;
1111:
1112: /* Bug 1853627
1117:
1118: /* Bug 2708573
1119: begin
1120: select 'Y'
1121: into ec_utils.g_file_tbl(m_count).column_rule_flag
1122: from ece_column_rules
1123: where interface_column_id = c4.interface_column_id
1124: and rownum = 1;
1125: exception
1123: where interface_column_id = c4.interface_column_id
1124: and rownum = 1;
1125: exception
1126: when no_data_found then
1127: ec_utils.g_file_tbl(m_count).column_rule_flag := 'N';
1128: end;
1129: */
1130:
1131: -- Bug 2708573
1133: (
1134: c4.interface_column_id
1135: )
1136: loop
1137: ec_utils.g_column_rule_tbl(m_count).column_rule_id := c5.column_rule_id;
1138: ec_utils.g_column_rule_tbl(m_count).rule_type := c5.rule_type;
1139: ec_utils.g_column_rule_tbl(m_count).action_code := c5.action_code;
1140: ec_utils.g_column_rule_tbl(m_count).level := c4.external_level;
1141: end loop;
1134: c4.interface_column_id
1135: )
1136: loop
1137: ec_utils.g_column_rule_tbl(m_count).column_rule_id := c5.column_rule_id;
1138: ec_utils.g_column_rule_tbl(m_count).rule_type := c5.rule_type;
1139: ec_utils.g_column_rule_tbl(m_count).action_code := c5.action_code;
1140: ec_utils.g_column_rule_tbl(m_count).level := c4.external_level;
1141: end loop;
1142:
1135: )
1136: loop
1137: ec_utils.g_column_rule_tbl(m_count).column_rule_id := c5.column_rule_id;
1138: ec_utils.g_column_rule_tbl(m_count).rule_type := c5.rule_type;
1139: ec_utils.g_column_rule_tbl(m_count).action_code := c5.action_code;
1140: ec_utils.g_column_rule_tbl(m_count).level := c4.external_level;
1141: end loop;
1142:
1143: -- Bug 2617428.
1136: loop
1137: ec_utils.g_column_rule_tbl(m_count).column_rule_id := c5.column_rule_id;
1138: ec_utils.g_column_rule_tbl(m_count).rule_type := c5.rule_type;
1139: ec_utils.g_column_rule_tbl(m_count).action_code := c5.action_code;
1140: ec_utils.g_column_rule_tbl(m_count).level := c4.external_level;
1141: end loop;
1142:
1143: -- Bug 2617428.
1144: -- Build hash table to store positions of columns requiring code conversion.
1147: hash_string:=to_char(c4.conversion_group_id)||'-'||
1148: to_char(c4.external_level)||'-'||
1149: to_char(c4.conversion_sequence);
1150: hash_value := dbms_utility.get_hash_value(hash_string,1,8192);
1151: if ec_utils.g_code_conv_pos_tbl_1.exists(hash_value) then
1152: if ec_utils.g_code_conv_pos_tbl_1(hash_value).occr=1 then
1153: p_count:=ec_utils.g_code_conv_pos_tbl_1(hash_value).value;
1154: ec_utils.g_code_conv_pos_tbl_2(p_count):=hash_value;
1155: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=0;
1148: to_char(c4.external_level)||'-'||
1149: to_char(c4.conversion_sequence);
1150: hash_value := dbms_utility.get_hash_value(hash_string,1,8192);
1151: if ec_utils.g_code_conv_pos_tbl_1.exists(hash_value) then
1152: if ec_utils.g_code_conv_pos_tbl_1(hash_value).occr=1 then
1153: p_count:=ec_utils.g_code_conv_pos_tbl_1(hash_value).value;
1154: ec_utils.g_code_conv_pos_tbl_2(p_count):=hash_value;
1155: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=0;
1156: ec_utils.g_code_conv_pos_tbl_1(hash_value).start_pos:=p_count;
1149: to_char(c4.conversion_sequence);
1150: hash_value := dbms_utility.get_hash_value(hash_string,1,8192);
1151: if ec_utils.g_code_conv_pos_tbl_1.exists(hash_value) then
1152: if ec_utils.g_code_conv_pos_tbl_1(hash_value).occr=1 then
1153: p_count:=ec_utils.g_code_conv_pos_tbl_1(hash_value).value;
1154: ec_utils.g_code_conv_pos_tbl_2(p_count):=hash_value;
1155: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=0;
1156: ec_utils.g_code_conv_pos_tbl_1(hash_value).start_pos:=p_count;
1157: end if;
1150: hash_value := dbms_utility.get_hash_value(hash_string,1,8192);
1151: if ec_utils.g_code_conv_pos_tbl_1.exists(hash_value) then
1152: if ec_utils.g_code_conv_pos_tbl_1(hash_value).occr=1 then
1153: p_count:=ec_utils.g_code_conv_pos_tbl_1(hash_value).value;
1154: ec_utils.g_code_conv_pos_tbl_2(p_count):=hash_value;
1155: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=0;
1156: ec_utils.g_code_conv_pos_tbl_1(hash_value).start_pos:=p_count;
1157: end if;
1158: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=
1151: if ec_utils.g_code_conv_pos_tbl_1.exists(hash_value) then
1152: if ec_utils.g_code_conv_pos_tbl_1(hash_value).occr=1 then
1153: p_count:=ec_utils.g_code_conv_pos_tbl_1(hash_value).value;
1154: ec_utils.g_code_conv_pos_tbl_2(p_count):=hash_value;
1155: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=0;
1156: ec_utils.g_code_conv_pos_tbl_1(hash_value).start_pos:=p_count;
1157: end if;
1158: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=
1159: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr +1;
1152: if ec_utils.g_code_conv_pos_tbl_1(hash_value).occr=1 then
1153: p_count:=ec_utils.g_code_conv_pos_tbl_1(hash_value).value;
1154: ec_utils.g_code_conv_pos_tbl_2(p_count):=hash_value;
1155: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=0;
1156: ec_utils.g_code_conv_pos_tbl_1(hash_value).start_pos:=p_count;
1157: end if;
1158: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=
1159: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr +1;
1160: ec_utils.g_code_conv_pos_tbl_2(m_count):=hash_value;
1154: ec_utils.g_code_conv_pos_tbl_2(p_count):=hash_value;
1155: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=0;
1156: ec_utils.g_code_conv_pos_tbl_1(hash_value).start_pos:=p_count;
1157: end if;
1158: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=
1159: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr +1;
1160: ec_utils.g_code_conv_pos_tbl_2(m_count):=hash_value;
1161: else
1162: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1155: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=0;
1156: ec_utils.g_code_conv_pos_tbl_1(hash_value).start_pos:=p_count;
1157: end if;
1158: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=
1159: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr +1;
1160: ec_utils.g_code_conv_pos_tbl_2(m_count):=hash_value;
1161: else
1162: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1163: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=1;
1156: ec_utils.g_code_conv_pos_tbl_1(hash_value).start_pos:=p_count;
1157: end if;
1158: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=
1159: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr +1;
1160: ec_utils.g_code_conv_pos_tbl_2(m_count):=hash_value;
1161: else
1162: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1163: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=1;
1164: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1158: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=
1159: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr +1;
1160: ec_utils.g_code_conv_pos_tbl_2(m_count):=hash_value;
1161: else
1162: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1163: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=1;
1164: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1165: end if;
1166: end if;
1159: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr +1;
1160: ec_utils.g_code_conv_pos_tbl_2(m_count):=hash_value;
1161: else
1162: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1163: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=1;
1164: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1165: end if;
1166: end if;
1167:
1160: ec_utils.g_code_conv_pos_tbl_2(m_count):=hash_value;
1161: else
1162: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1163: ec_utils.g_code_conv_pos_tbl_1(hash_value).occr:=1;
1164: ec_utils.g_code_conv_pos_tbl_1(hash_value).value:=m_count;
1165: end if;
1166: end if;
1167:
1168: -- Build hash table to store positions of columns in g_file_tbl.
1170: hash_string:=to_char(c4.external_level)||'-'||upper(c4.interface_column_name);
1171: hash_val := dbms_utility.get_hash_value(hash_string,1,8192);
1172:
1173: -- Bug 2834366
1174: if ec_utils.g_col_pos_tbl_1.exists(hash_val) then
1175: if ec_utils.g_col_pos_tbl_1(hash_val).occr=1 then
1176: p_count:=ec_utils.g_col_pos_tbl_1(hash_val).value;
1177: ec_utils.g_col_pos_tbl_2(p_count):=hash_val;
1178: ec_utils.g_col_pos_tbl_1(hash_val).value:=0;
1171: hash_val := dbms_utility.get_hash_value(hash_string,1,8192);
1172:
1173: -- Bug 2834366
1174: if ec_utils.g_col_pos_tbl_1.exists(hash_val) then
1175: if ec_utils.g_col_pos_tbl_1(hash_val).occr=1 then
1176: p_count:=ec_utils.g_col_pos_tbl_1(hash_val).value;
1177: ec_utils.g_col_pos_tbl_2(p_count):=hash_val;
1178: ec_utils.g_col_pos_tbl_1(hash_val).value:=0;
1179: ec_utils.g_col_pos_tbl_1(hash_val).start_pos:=p_count;
1172:
1173: -- Bug 2834366
1174: if ec_utils.g_col_pos_tbl_1.exists(hash_val) then
1175: if ec_utils.g_col_pos_tbl_1(hash_val).occr=1 then
1176: p_count:=ec_utils.g_col_pos_tbl_1(hash_val).value;
1177: ec_utils.g_col_pos_tbl_2(p_count):=hash_val;
1178: ec_utils.g_col_pos_tbl_1(hash_val).value:=0;
1179: ec_utils.g_col_pos_tbl_1(hash_val).start_pos:=p_count;
1180: end if;
1173: -- Bug 2834366
1174: if ec_utils.g_col_pos_tbl_1.exists(hash_val) then
1175: if ec_utils.g_col_pos_tbl_1(hash_val).occr=1 then
1176: p_count:=ec_utils.g_col_pos_tbl_1(hash_val).value;
1177: ec_utils.g_col_pos_tbl_2(p_count):=hash_val;
1178: ec_utils.g_col_pos_tbl_1(hash_val).value:=0;
1179: ec_utils.g_col_pos_tbl_1(hash_val).start_pos:=p_count;
1180: end if;
1181: ec_utils.g_col_pos_tbl_1(hash_val).occr:=
1174: if ec_utils.g_col_pos_tbl_1.exists(hash_val) then
1175: if ec_utils.g_col_pos_tbl_1(hash_val).occr=1 then
1176: p_count:=ec_utils.g_col_pos_tbl_1(hash_val).value;
1177: ec_utils.g_col_pos_tbl_2(p_count):=hash_val;
1178: ec_utils.g_col_pos_tbl_1(hash_val).value:=0;
1179: ec_utils.g_col_pos_tbl_1(hash_val).start_pos:=p_count;
1180: end if;
1181: ec_utils.g_col_pos_tbl_1(hash_val).occr:=
1182: ec_utils.g_col_pos_tbl_1(hash_val).occr +1;
1175: if ec_utils.g_col_pos_tbl_1(hash_val).occr=1 then
1176: p_count:=ec_utils.g_col_pos_tbl_1(hash_val).value;
1177: ec_utils.g_col_pos_tbl_2(p_count):=hash_val;
1178: ec_utils.g_col_pos_tbl_1(hash_val).value:=0;
1179: ec_utils.g_col_pos_tbl_1(hash_val).start_pos:=p_count;
1180: end if;
1181: ec_utils.g_col_pos_tbl_1(hash_val).occr:=
1182: ec_utils.g_col_pos_tbl_1(hash_val).occr +1;
1183: ec_utils.g_col_pos_tbl_2(m_count):=hash_val;
1177: ec_utils.g_col_pos_tbl_2(p_count):=hash_val;
1178: ec_utils.g_col_pos_tbl_1(hash_val).value:=0;
1179: ec_utils.g_col_pos_tbl_1(hash_val).start_pos:=p_count;
1180: end if;
1181: ec_utils.g_col_pos_tbl_1(hash_val).occr:=
1182: ec_utils.g_col_pos_tbl_1(hash_val).occr +1;
1183: ec_utils.g_col_pos_tbl_2(m_count):=hash_val;
1184: else
1185: ec_utils.g_col_pos_tbl_1(hash_val).occr:=1;
1178: ec_utils.g_col_pos_tbl_1(hash_val).value:=0;
1179: ec_utils.g_col_pos_tbl_1(hash_val).start_pos:=p_count;
1180: end if;
1181: ec_utils.g_col_pos_tbl_1(hash_val).occr:=
1182: ec_utils.g_col_pos_tbl_1(hash_val).occr +1;
1183: ec_utils.g_col_pos_tbl_2(m_count):=hash_val;
1184: else
1185: ec_utils.g_col_pos_tbl_1(hash_val).occr:=1;
1186: ec_utils.g_col_pos_tbl_1(hash_val).value:=m_count;
1179: ec_utils.g_col_pos_tbl_1(hash_val).start_pos:=p_count;
1180: end if;
1181: ec_utils.g_col_pos_tbl_1(hash_val).occr:=
1182: ec_utils.g_col_pos_tbl_1(hash_val).occr +1;
1183: ec_utils.g_col_pos_tbl_2(m_count):=hash_val;
1184: else
1185: ec_utils.g_col_pos_tbl_1(hash_val).occr:=1;
1186: ec_utils.g_col_pos_tbl_1(hash_val).value:=m_count;
1187: end if;
1181: ec_utils.g_col_pos_tbl_1(hash_val).occr:=
1182: ec_utils.g_col_pos_tbl_1(hash_val).occr +1;
1183: ec_utils.g_col_pos_tbl_2(m_count):=hash_val;
1184: else
1185: ec_utils.g_col_pos_tbl_1(hash_val).occr:=1;
1186: ec_utils.g_col_pos_tbl_1(hash_val).value:=m_count;
1187: end if;
1188:
1189: end loop;
1182: ec_utils.g_col_pos_tbl_1(hash_val).occr +1;
1183: ec_utils.g_col_pos_tbl_2(m_count):=hash_val;
1184: else
1185: ec_utils.g_col_pos_tbl_1(hash_val).occr:=1;
1186: ec_utils.g_col_pos_tbl_1(hash_val).value:=m_count;
1187: end if;
1188:
1189: end loop;
1190:
1192: Stub for calling ACTION TYPE = 110
1193: Applicable only for Inbound
1194: **/
1195:
1196: if ec_utils.g_direction = 'I'
1197: then
1198: load_mandatory_columns(i_count);
1199: end if;
1200:
1204: ec_debug.pl(0,'EC','ECE_SEED_NOT_LEVEL','TRANSACTION_TYPE',i_transaction_type,'LEVEL',c2.output_level);
1205: /**
1206: Set the Retcode for the Concurrent Manager to Error.
1207: **/
1208: ec_utils.i_ret_code := 2;
1209: raise EC_UTILS.PROGRAM_EXIT;
1210: end if;
1211:
1212: /**
1205: /**
1206: Set the Retcode for the Concurrent Manager to Error.
1207: **/
1208: ec_utils.i_ret_code := 2;
1209: raise EC_UTILS.PROGRAM_EXIT;
1210: end if;
1211:
1212: /**
1213: Update the File/Stack pointer for Internal Levels over here.
1211:
1212: /**
1213: Update the File/Stack pointer for Internal Levels over here.
1214: **/
1215: ec_utils.g_int_levels(i_count).file_end_pos := ec_utils.g_file_tbl.COUNT;
1216: if ec_utils.g_direction = 'O'
1217: then
1218: ec_utils.g_stack_pointer(i_count).start_pos :=1;
1219: ec_utils.g_stack_pointer(i_count).end_pos :=0;
1212: /**
1213: Update the File/Stack pointer for Internal Levels over here.
1214: **/
1215: ec_utils.g_int_levels(i_count).file_end_pos := ec_utils.g_file_tbl.COUNT;
1216: if ec_utils.g_direction = 'O'
1217: then
1218: ec_utils.g_stack_pointer(i_count).start_pos :=1;
1219: ec_utils.g_stack_pointer(i_count).end_pos :=0;
1220: end if;
1214: **/
1215: ec_utils.g_int_levels(i_count).file_end_pos := ec_utils.g_file_tbl.COUNT;
1216: if ec_utils.g_direction = 'O'
1217: then
1218: ec_utils.g_stack_pointer(i_count).start_pos :=1;
1219: ec_utils.g_stack_pointer(i_count).end_pos :=0;
1220: end if;
1221: if EC_DEBUG.G_debug_level >= 3 then
1222: ec_debug.pl(3,'EC','ECE_INT_FILE_START','LEVEL',i_count,'POSITION',
1215: ec_utils.g_int_levels(i_count).file_end_pos := ec_utils.g_file_tbl.COUNT;
1216: if ec_utils.g_direction = 'O'
1217: then
1218: ec_utils.g_stack_pointer(i_count).start_pos :=1;
1219: ec_utils.g_stack_pointer(i_count).end_pos :=0;
1220: end if;
1221: if EC_DEBUG.G_debug_level >= 3 then
1222: ec_debug.pl(3,'EC','ECE_INT_FILE_START','LEVEL',i_count,'POSITION',
1223: ec_utils.g_int_levels(i_count).file_start_pos);
1219: ec_utils.g_stack_pointer(i_count).end_pos :=0;
1220: end if;
1221: if EC_DEBUG.G_debug_level >= 3 then
1222: ec_debug.pl(3,'EC','ECE_INT_FILE_START','LEVEL',i_count,'POSITION',
1223: ec_utils.g_int_levels(i_count).file_start_pos);
1224: ec_debug.pl(3,'EC','ECE_INT_FILE_END','LEVEL',i_count,'POSITION',
1225: ec_utils.g_int_levels(i_count).file_end_pos);
1226: end if;
1227:
1221: if EC_DEBUG.G_debug_level >= 3 then
1222: ec_debug.pl(3,'EC','ECE_INT_FILE_START','LEVEL',i_count,'POSITION',
1223: ec_utils.g_int_levels(i_count).file_start_pos);
1224: ec_debug.pl(3,'EC','ECE_INT_FILE_END','LEVEL',i_count,'POSITION',
1225: ec_utils.g_int_levels(i_count).file_end_pos);
1226: end if;
1227:
1228: end loop;
1229:
1235: ec_debug.pl(0,'EC','ECE_SEED_DATA_MISSING','TRANSACTION_TYPE',i_transaction_type,'MAPID',i_map_id);
1236: /**
1237: Set the Retcode for the Concurrent Manager
1238: **/
1239: ec_utils.i_ret_code := 2;
1240: raise ec_utils.program_exit;
1241: end if;
1242:
1243: /**
1236: /**
1237: Set the Retcode for the Concurrent Manager
1238: **/
1239: ec_utils.i_ret_code := 2;
1240: raise ec_utils.program_exit;
1241: end if;
1242:
1243: /**
1244: Update the File_pointer for External Levels over here.
1242:
1243: /**
1244: Update the File_pointer for External Levels over here.
1245: **/
1246: if ec_utils.g_direction = 'I'
1247: then
1248: for i in 1..ec_utils.g_ext_levels.COUNT
1249: loop
1250: i_first_found := FALSE;
1244: Update the File_pointer for External Levels over here.
1245: **/
1246: if ec_utils.g_direction = 'I'
1247: then
1248: for i in 1..ec_utils.g_ext_levels.COUNT
1249: loop
1250: i_first_found := FALSE;
1251: i_last_found := FALSE;
1252: for j in 1..ec_utils.g_file_tbl.COUNT
1248: for i in 1..ec_utils.g_ext_levels.COUNT
1249: loop
1250: i_first_found := FALSE;
1251: i_last_found := FALSE;
1252: for j in 1..ec_utils.g_file_tbl.COUNT
1253: loop
1254: if ec_utils.g_file_tbl(j).external_level is null
1255: then
1256: ec_utils.i_ret_code := 2;
1250: i_first_found := FALSE;
1251: i_last_found := FALSE;
1252: for j in 1..ec_utils.g_file_tbl.COUNT
1253: loop
1254: if ec_utils.g_file_tbl(j).external_level is null
1255: then
1256: ec_utils.i_ret_code := 2;
1257: ec_debug.pl(0,'EC','ECE_EXTERNAL_LEVELS_NULL','External Level is NULL');
1258: raise EC_UTILS.PROGRAM_EXIT;
1252: for j in 1..ec_utils.g_file_tbl.COUNT
1253: loop
1254: if ec_utils.g_file_tbl(j).external_level is null
1255: then
1256: ec_utils.i_ret_code := 2;
1257: ec_debug.pl(0,'EC','ECE_EXTERNAL_LEVELS_NULL','External Level is NULL');
1258: raise EC_UTILS.PROGRAM_EXIT;
1259: end if;
1260: if ec_utils.g_file_tbl(j).external_level = i
1254: if ec_utils.g_file_tbl(j).external_level is null
1255: then
1256: ec_utils.i_ret_code := 2;
1257: ec_debug.pl(0,'EC','ECE_EXTERNAL_LEVELS_NULL','External Level is NULL');
1258: raise EC_UTILS.PROGRAM_EXIT;
1259: end if;
1260: if ec_utils.g_file_tbl(j).external_level = i
1261: then
1262: if NOT (i_first_found)
1256: ec_utils.i_ret_code := 2;
1257: ec_debug.pl(0,'EC','ECE_EXTERNAL_LEVELS_NULL','External Level is NULL');
1258: raise EC_UTILS.PROGRAM_EXIT;
1259: end if;
1260: if ec_utils.g_file_tbl(j).external_level = i
1261: then
1262: if NOT (i_first_found)
1263: then
1264: i_first_found := TRUE;
1261: then
1262: if NOT (i_first_found)
1263: then
1264: i_first_found := TRUE;
1265: ec_utils.g_ext_levels(i).file_start_pos := j;
1266: else
1267: if j < ec_utils.g_file_tbl.COUNT
1268: then
1269: if ec_utils.g_file_tbl(j+1).external_level <> i
1263: then
1264: i_first_found := TRUE;
1265: ec_utils.g_ext_levels(i).file_start_pos := j;
1266: else
1267: if j < ec_utils.g_file_tbl.COUNT
1268: then
1269: if ec_utils.g_file_tbl(j+1).external_level <> i
1270: then
1271: i_last_found := TRUE;
1265: ec_utils.g_ext_levels(i).file_start_pos := j;
1266: else
1267: if j < ec_utils.g_file_tbl.COUNT
1268: then
1269: if ec_utils.g_file_tbl(j+1).external_level <> i
1270: then
1271: i_last_found := TRUE;
1272: ec_utils.g_ext_levels(i).file_end_pos := j;
1273: exit;
1268: then
1269: if ec_utils.g_file_tbl(j+1).external_level <> i
1270: then
1271: i_last_found := TRUE;
1272: ec_utils.g_ext_levels(i).file_end_pos := j;
1273: exit;
1274: end if;
1275: else
1276: i_last_found := TRUE;
1273: exit;
1274: end if;
1275: else
1276: i_last_found := TRUE;
1277: ec_utils.g_ext_levels(i).file_end_pos := j;
1278: exit;
1279: end if;
1280: end if;
1281: end if;
1282: end loop;
1283:
1284: if (i_first_found) and NOT (i_last_found)
1285: then
1286: ec_utils.g_ext_levels(i).file_end_pos := ec_utils.g_ext_levels(i).file_start_pos;
1287: end if;
1288: if EC_DEBUG.G_debug_level >= 3 then
1289: ec_debug.pl(3,'EC','ECE_EXT_FILE_START','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_start_pos);
1290: ec_debug.pl(3,'EC','ECE_EXT_FILE_END','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_end_pos);
1285: then
1286: ec_utils.g_ext_levels(i).file_end_pos := ec_utils.g_ext_levels(i).file_start_pos;
1287: end if;
1288: if EC_DEBUG.G_debug_level >= 3 then
1289: ec_debug.pl(3,'EC','ECE_EXT_FILE_START','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_start_pos);
1290: ec_debug.pl(3,'EC','ECE_EXT_FILE_END','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_end_pos);
1291: end if;
1292: ec_utils.g_stack_pointer(i).start_pos :=1;
1293: ec_utils.g_stack_pointer(i).end_pos :=0;
1286: ec_utils.g_ext_levels(i).file_end_pos := ec_utils.g_ext_levels(i).file_start_pos;
1287: end if;
1288: if EC_DEBUG.G_debug_level >= 3 then
1289: ec_debug.pl(3,'EC','ECE_EXT_FILE_START','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_start_pos);
1290: ec_debug.pl(3,'EC','ECE_EXT_FILE_END','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_end_pos);
1291: end if;
1292: ec_utils.g_stack_pointer(i).start_pos :=1;
1293: ec_utils.g_stack_pointer(i).end_pos :=0;
1294: end loop;
1288: if EC_DEBUG.G_debug_level >= 3 then
1289: ec_debug.pl(3,'EC','ECE_EXT_FILE_START','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_start_pos);
1290: ec_debug.pl(3,'EC','ECE_EXT_FILE_END','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_end_pos);
1291: end if;
1292: ec_utils.g_stack_pointer(i).start_pos :=1;
1293: ec_utils.g_stack_pointer(i).end_pos :=0;
1294: end loop;
1295: end if;
1296:
1289: ec_debug.pl(3,'EC','ECE_EXT_FILE_START','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_start_pos);
1290: ec_debug.pl(3,'EC','ECE_EXT_FILE_END','LEVEL',i,'POSITION',ec_utils.g_ext_levels(i).file_end_pos);
1291: end if;
1292: ec_utils.g_stack_pointer(i).start_pos :=1;
1293: ec_utils.g_stack_pointer(i).end_pos :=0;
1294: end loop;
1295: end if;
1296:
1297:
1301: load_procedure_definitions;
1302:
1303: load_procedure_mappings
1304: (
1305: ec_utils.g_transaction_type
1306: );
1307:
1308: if EC_DEBUG.G_debug_level >= 2 then
1309: ec_debug.pop('EC_EXECUTION_UTILS.LOAD_MAPPINGS');
1308: if EC_DEBUG.G_debug_level >= 2 then
1309: ec_debug.pop('EC_EXECUTION_UTILS.LOAD_MAPPINGS');
1310: end if;
1311: EXCEPTION
1312: WHEN EC_UTILS.PROGRAM_EXIT then
1313: raise;
1314: WHEN OTHERS THEN
1315: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_MAPPINGS');
1316: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
1313: raise;
1314: WHEN OTHERS THEN
1315: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_MAPPINGS');
1316: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
1317: ec_utils.i_ret_code :=2;
1318: raise EC_UTILS.PROGRAM_EXIT;
1319: end load_mappings;
1320:
1321: end ec_execution_utils;
1314: WHEN OTHERS THEN
1315: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_EXECUTION_UTILS.LOAD_MAPPINGS');
1316: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
1317: ec_utils.i_ret_code :=2;
1318: raise EC_UTILS.PROGRAM_EXIT;
1319: end load_mappings;
1320:
1321: end ec_execution_utils;