53: IS
54: l_status VARCHAR2(30) := 'SUCCESS';
55: l_err_code NUMBER := 0;
56: l_message_data SYSTEM.tbl_mig_type;
57: l_enqopt DBMS_AQ.enqueue_options_t;
58: l_msgprop DBMS_AQ.message_properties_t;
59: l_deqopt DBMS_AQ.dequeue_options_t;
60: l_enq_msgid RAW(16);
61: l_deq_msgid RAW(16);
54: l_status VARCHAR2(30) := 'SUCCESS';
55: l_err_code NUMBER := 0;
56: l_message_data SYSTEM.tbl_mig_type;
57: l_enqopt DBMS_AQ.enqueue_options_t;
58: l_msgprop DBMS_AQ.message_properties_t;
59: l_deqopt DBMS_AQ.dequeue_options_t;
60: l_enq_msgid RAW(16);
61: l_deq_msgid RAW(16);
62: l_queue_name VARCHAR2(100);
55: l_err_code NUMBER := 0;
56: l_message_data SYSTEM.tbl_mig_type;
57: l_enqopt DBMS_AQ.enqueue_options_t;
58: l_msgprop DBMS_AQ.message_properties_t;
59: l_deqopt DBMS_AQ.dequeue_options_t;
60: l_enq_msgid RAW(16);
61: l_deq_msgid RAW(16);
62: l_queue_name VARCHAR2(100);
63:
72: execution_mode
73: FROM fnd_ts_mig_cmds
74: WHERE parent_lineno = l_lineno;
75: BEGIN
76: l_enqopt.visibility := DBMS_AQ.IMMEDIATE;
77:
78: FOR child_lineno_rec IN child_lineno_cur(p_lineno)
79: LOOP
80: if child_lineno_rec.execution_mode = 'P' then
90: child_lineno_rec.object_name,
91: child_lineno_rec.partitioned,
92: child_lineno_rec.parent_owner,
93: child_lineno_rec.parent_object_name);
94: DBMS_AQ.enqueue (l_queue_name, l_enqopt, l_msgprop,
95: l_message_data, l_enq_msgid);
96: END LOOP;
97: END process_line_child_cmds;
98:
112: l_mig_cmd VARCHAR2(4000);
113: l_err VARCHAR2(4000);
114: l_message_data SYSTEM.tbl_mig_type;
115: l_outmessage_data SYSTEM.tbl_mig_type;
116: l_enqopt DBMS_AQ.enqueue_options_t;
117: l_msgprop DBMS_AQ.message_properties_t;
118: l_deqopt DBMS_AQ.dequeue_options_t;
119: l_enq_msgid RAW(16);
120: l_deq_msgid RAW(16);
113: l_err VARCHAR2(4000);
114: l_message_data SYSTEM.tbl_mig_type;
115: l_outmessage_data SYSTEM.tbl_mig_type;
116: l_enqopt DBMS_AQ.enqueue_options_t;
117: l_msgprop DBMS_AQ.message_properties_t;
118: l_deqopt DBMS_AQ.dequeue_options_t;
119: l_enq_msgid RAW(16);
120: l_deq_msgid RAW(16);
121:
114: l_message_data SYSTEM.tbl_mig_type;
115: l_outmessage_data SYSTEM.tbl_mig_type;
116: l_enqopt DBMS_AQ.enqueue_options_t;
117: l_msgprop DBMS_AQ.message_properties_t;
118: l_deqopt DBMS_AQ.dequeue_options_t;
119: l_enq_msgid RAW(16);
120: l_deq_msgid RAW(16);
121:
122: l_parent_owner FND_TS_MIG_CMDS.PARENT_OWNER%TYPE;
247: l_queue_name := 'tblmig_seq_messageque';
248: end if;
249:
250: if l_enqueue = 'Y' then
251: l_enqopt.visibility := DBMS_AQ.IMMEDIATE;
252: if p_owner = '%' then
253: OPEN all_cmd_cur(p_exec_mode);
254: LOOP
255: cmdtab.lineno.DELETE;
267: cmdtab.object_name(i),
268: cmdtab.partitioned(i),
269: cmdtab.parent_owner(i),
270: cmdtab.parent_object_name(i));
271: DBMS_AQ.enqueue (l_queue_name, l_enqopt, l_msgprop,
272: l_message_data, l_enq_msgid);
273: --DBMS_OUTPUT.PUT_LINE('Parent Message Enqueued, lineno = '||to_char(cmdtab.lineno(i)));
274: END LOOP;
275: END LOOP;
292: cmdtab.object_name(i),
293: cmdtab.partitioned(i),
294: cmdtab.parent_owner(i),
295: cmdtab.parent_object_name(i));
296: DBMS_AQ.enqueue (l_queue_name, l_enqopt, l_msgprop,
297: l_message_data, l_enq_msgid);
298: --DBMS_OUTPUT.PUT_LINE('Parent Message Enqueued, lineno = '||to_char(cmdtab.lineno(i)));
299: END LOOP;
300: END LOOP;
302: end if;
303: end if; -- for p_aqStat = 'Y'
304:
305: BEGIN
306: l_deqopt.navigation := DBMS_AQ.FIRST_MESSAGE;
307: l_deqopt.visibility := DBMS_AQ.IMMEDIATE;
308: l_deqopt.wait := 1;
309: END;
310:
303: end if; -- for p_aqStat = 'Y'
304:
305: BEGIN
306: l_deqopt.navigation := DBMS_AQ.FIRST_MESSAGE;
307: l_deqopt.visibility := DBMS_AQ.IMMEDIATE;
308: l_deqopt.wait := 1;
309: END;
310:
311: l_retVal := 0;
311: l_retVal := 0;
312: while ( l_retVal = 0 )
313: LOOP
314: BEGIN
315: DBMS_AQ.dequeue (
316: queue_name => l_queue_name,
317: dequeue_options => l_deqopt,
318: message_properties => l_msgprop,
319: payload => l_outmessage_data,