1: PACKAGE BODY OE_MSG AS
2: /* $Header: OEXUTMGB.pls 115.1 99/07/16 08:16:42 porting shi $ */
3:
4: ------------------------------------------------------------------------
5: --1. Added message name to message table in the order
13: IS
14: RetCode BOOLEAN := TRUE;
15: begin
16:
17: if ( (MSG_NAME is NULL ) or (OE_Msg_Last_Msg_Count >=100) )
18: then
19: retCode := FALSE;
20: GOTO ExitPoint;
21: end if;
20: GOTO ExitPoint;
21: end if;
22:
23: -- next available slot
24: OE_Msg_Last_Msg_Count := OE_Msg_Last_Msg_Count +1;
25: OE_Msg_Message_Name_Buffer(OE_Msg_Last_Msg_Count) := MSG_NAME;
26:
27: <
28: OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) := 0;
21: end if;
22:
23: -- next available slot
24: OE_Msg_Last_Msg_Count := OE_Msg_Last_Msg_Count +1;
25: OE_Msg_Message_Name_Buffer(OE_Msg_Last_Msg_Count) := MSG_NAME;
26:
27: <
28: OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) := 0;
29: return(RetCode);
24: OE_Msg_Last_Msg_Count := OE_Msg_Last_Msg_Count +1;
25: OE_Msg_Message_Name_Buffer(OE_Msg_Last_Msg_Count) := MSG_NAME;
26:
27: <
28: OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) := 0;
29: return(RetCode);
30: end ;
31:
32:
51: retCode := FALSE;
52: GOTO ExitPoint;
53: end if;
54:
55: if ((OE_Msg_Last_Msg_Count = 0) or
56: (MSG_NAME <> OE_Msg_Message_Name_Buffer(OE_Msg_Last_Msg_Count)) )
57: then
58: retCode := SET_MESSAGE_NAME(MSG_NAME);
59: if ( retCode = FALSE )
52: GOTO ExitPoint;
53: end if;
54:
55: if ((OE_Msg_Last_Msg_Count = 0) or
56: (MSG_NAME <> OE_Msg_Message_Name_Buffer(OE_Msg_Last_Msg_Count)) )
57: then
58: retCode := SET_MESSAGE_NAME(MSG_NAME);
59: if ( retCode = FALSE )
60: then
63: end if;
64:
65: if ( TOKEN_NAME is not NULL )
66: then
67: OE_Msg_Last_Token_Count := OE_Msg_Last_Token_Count + 1;
68:
69: if ( OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) = 0 )
70: then -- first token of this message
71: OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) := OE_Msg_Last_Token_Count;
65: if ( TOKEN_NAME is not NULL )
66: then
67: OE_Msg_Last_Token_Count := OE_Msg_Last_Token_Count + 1;
68:
69: if ( OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) = 0 )
70: then -- first token of this message
71: OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) := OE_Msg_Last_Token_Count;
72: elsif ( (OE_Msg_Last_Token_Count - OE_Msg_Token_Count(OE_Msg_Last_Msg_Count)) >10 )
73: then -- Can't over 10 tokens in one message
67: OE_Msg_Last_Token_Count := OE_Msg_Last_Token_Count + 1;
68:
69: if ( OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) = 0 )
70: then -- first token of this message
71: OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) := OE_Msg_Last_Token_Count;
72: elsif ( (OE_Msg_Last_Token_Count - OE_Msg_Token_Count(OE_Msg_Last_Msg_Count)) >10 )
73: then -- Can't over 10 tokens in one message
74: OE_Msg_Last_Token_Count := OE_Msg_Last_Token_Count -1;
75: retCode := FALSE;
68:
69: if ( OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) = 0 )
70: then -- first token of this message
71: OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) := OE_Msg_Last_Token_Count;
72: elsif ( (OE_Msg_Last_Token_Count - OE_Msg_Token_Count(OE_Msg_Last_Msg_Count)) >10 )
73: then -- Can't over 10 tokens in one message
74: OE_Msg_Last_Token_Count := OE_Msg_Last_Token_Count -1;
75: retCode := FALSE;
76: GOTO ExitPoint;
70: then -- first token of this message
71: OE_Msg_Token_Count(OE_Msg_Last_Msg_Count) := OE_Msg_Last_Token_Count;
72: elsif ( (OE_Msg_Last_Token_Count - OE_Msg_Token_Count(OE_Msg_Last_Msg_Count)) >10 )
73: then -- Can't over 10 tokens in one message
74: OE_Msg_Last_Token_Count := OE_Msg_Last_Token_Count -1;
75: retCode := FALSE;
76: GOTO ExitPoint;
77: end if;
78:
75: retCode := FALSE;
76: GOTO ExitPoint;
77: end if;
78:
79: OE_Msg_Token_Name_Buffer(OE_Msg_Last_Token_Count) := TOKEN_NAME;
80: OE_Msg_Token_Value_Buffer(OE_Msg_Last_Token_Count) := TOKEN_VALUE;
81:
82: end if;
83:
76: GOTO ExitPoint;
77: end if;
78:
79: OE_Msg_Token_Name_Buffer(OE_Msg_Last_Token_Count) := TOKEN_NAME;
80: OE_Msg_Token_Value_Buffer(OE_Msg_Last_Token_Count) := TOKEN_VALUE;
81:
82: end if;
83:
84: <
131: )
132: IS
133: begin
134: -- Get next message name
135: OE_Msg_Show_Msg_Count := OE_Msg_Show_Msg_Count + 1;
136: if ( OE_Msg_Last_Msg_Count >= OE_Msg_Show_Msg_Count )
137: then
138: MSG_NAME := OE_Msg_Message_Name_Buffer(OE_Msg_Show_Msg_Count);
139: end if ;
132: IS
133: begin
134: -- Get next message name
135: OE_Msg_Show_Msg_Count := OE_Msg_Show_Msg_Count + 1;
136: if ( OE_Msg_Last_Msg_Count >= OE_Msg_Show_Msg_Count )
137: then
138: MSG_NAME := OE_Msg_Message_Name_Buffer(OE_Msg_Show_Msg_Count);
139: end if ;
140:
134: -- Get next message name
135: OE_Msg_Show_Msg_Count := OE_Msg_Show_Msg_Count + 1;
136: if ( OE_Msg_Last_Msg_Count >= OE_Msg_Show_Msg_Count )
137: then
138: MSG_NAME := OE_Msg_Message_Name_Buffer(OE_Msg_Show_Msg_Count);
139: end if ;
140:
141: if ( ( OE_Msg_Last_Msg_Count = 0 )or
142: ( OE_Msg_Last_Msg_Count = OE_Msg_Show_Msg_Count) )
137: then
138: MSG_NAME := OE_Msg_Message_Name_Buffer(OE_Msg_Show_Msg_Count);
139: end if ;
140:
141: if ( ( OE_Msg_Last_Msg_Count = 0 )or
142: ( OE_Msg_Last_Msg_Count = OE_Msg_Show_Msg_Count) )
143: then
144: LAST_MESSAGE := 1; -- TRUE : no more message
145: else
138: MSG_NAME := OE_Msg_Message_Name_Buffer(OE_Msg_Show_Msg_Count);
139: end if ;
140:
141: if ( ( OE_Msg_Last_Msg_Count = 0 )or
142: ( OE_Msg_Last_Msg_Count = OE_Msg_Show_Msg_Count) )
143: then
144: LAST_MESSAGE := 1; -- TRUE : no more message
145: else
146: LAST_MESSAGE := 0; -- FALSE
162: IS
163: No_Token_Flag boolean := FALSE;
164: begin
165:
166: if ( OE_Msg_Last_Msg_Count <= 0 )
167: then --no message available
168: LAST_TOKEN := 1; --TRUE
169: TOKEN_NAME := '';
170: No_Token_Flag:= TRUE;
168: LAST_TOKEN := 1; --TRUE
169: TOKEN_NAME := '';
170: No_Token_Flag:= TRUE;
171: else
172: if ( OE_Msg_Token_Count(OE_Msg_Show_Msg_Count) = 0 )
173: then
174: TOKEN_NAME := ''; -- no token belongs to this message
175: No_Token_Flag := TRUE;
176: LAST_TOKEN := 1; --TRUE
174: TOKEN_NAME := ''; -- no token belongs to this message
175: No_Token_Flag := TRUE;
176: LAST_TOKEN := 1; --TRUE
177: else
178: TOKEN_NAME := OE_Msg_Token_Name_Buffer(OE_Msg_Show_Token_Count);
179: TOKEN_VALUE:= OE_Msg_Token_Value_Buffer(OE_Msg_Show_Token_Count);
180: end if;
181:
182: if ( No_Token_Flag = FALSE )
175: No_Token_Flag := TRUE;
176: LAST_TOKEN := 1; --TRUE
177: else
178: TOKEN_NAME := OE_Msg_Token_Name_Buffer(OE_Msg_Show_Token_Count);
179: TOKEN_VALUE:= OE_Msg_Token_Value_Buffer(OE_Msg_Show_Token_Count);
180: end if;
181:
182: if ( No_Token_Flag = FALSE )
183: then
180: end if;
181:
182: if ( No_Token_Flag = FALSE )
183: then
184: if ( OE_Msg_Show_Token_Count = Get_Last_Token_Of_This_Msg )
185: then --no token or last token
186: LAST_TOKEN := 1; --TRUE
187: else
188: LAST_TOKEN := 0; --FALSE
186: LAST_TOKEN := 1; --TRUE
187: else
188: LAST_TOKEN := 0; --FALSE
189: end if;
190: OE_Msg_Show_Token_Count := OE_Msg_Show_Token_Count + 1;
191: end if;
192: end if;
193:
194: if ( (LAST_TOKEN = 1 ) AND
191: end if;
192: end if;
193:
194: if ( (LAST_TOKEN = 1 ) AND
195: (OE_Msg_Last_Msg_Count <= OE_Msg_Show_Msg_Count ) )
196: then
197: CLEAN_BUFFER_MESSAGE;
198: end if;
199: end ;
209: Last_Token_Count NUMBER := 0;
210: TempIndex NUMBER;
211: begin
212:
213: if ( OE_Msg_Show_Msg_Count < OE_Msg_Last_Msg_Count )
214: then
215:
216: FOR TempIndex in OE_Msg_Show_Msg_Count .. OE_Msg_Last_Msg_Count-1 LOOP
217: if ( OE_Msg_Token_Count(TempIndex+1) <> 0 )
212:
213: if ( OE_Msg_Show_Msg_Count < OE_Msg_Last_Msg_Count )
214: then
215:
216: FOR TempIndex in OE_Msg_Show_Msg_Count .. OE_Msg_Last_Msg_Count-1 LOOP
217: if ( OE_Msg_Token_Count(TempIndex+1) <> 0 )
218: then
219: Last_Token_Count := OE_Msg_Token_Count(TempIndex+1) -1;
220: end if;
213: if ( OE_Msg_Show_Msg_Count < OE_Msg_Last_Msg_Count )
214: then
215:
216: FOR TempIndex in OE_Msg_Show_Msg_Count .. OE_Msg_Last_Msg_Count-1 LOOP
217: if ( OE_Msg_Token_Count(TempIndex+1) <> 0 )
218: then
219: Last_Token_Count := OE_Msg_Token_Count(TempIndex+1) -1;
220: end if;
221: END LOOP;
215:
216: FOR TempIndex in OE_Msg_Show_Msg_Count .. OE_Msg_Last_Msg_Count-1 LOOP
217: if ( OE_Msg_Token_Count(TempIndex+1) <> 0 )
218: then
219: Last_Token_Count := OE_Msg_Token_Count(TempIndex+1) -1;
220: end if;
221: END LOOP;
222: end if;
223:
222: end if;
223:
224: if ( Last_Token_Count = 0 )
225: then
226: Last_Token_Count := OE_Msg_Last_Token_Count;
227: end if;
228:
229: return (Last_Token_Count);
230: end; -- Get_Last_Token_Of_This_Msg
238: procedure CLEAN_BUFFER_MESSAGE is
239: Empty_Buffer MESSAGE_TABLE_TYPE; -- Empty Message stack
240: Empty_Token_Count_Buffer TOKEN_COUNT_TABLE_TYPE ;
241: begin
242: OE_Msg_Message_Name_Buffer := Empty_Buffer;
243: OE_Msg_Token_Name_Buffer := Empty_Buffer;
244: OE_Msg_Token_Value_Buffer := Empty_Buffer;
245: OE_Msg_Token_Count := Empty_Token_Count_Buffer;
246: OE_Msg_Last_Msg_Count := 0;
239: Empty_Buffer MESSAGE_TABLE_TYPE; -- Empty Message stack
240: Empty_Token_Count_Buffer TOKEN_COUNT_TABLE_TYPE ;
241: begin
242: OE_Msg_Message_Name_Buffer := Empty_Buffer;
243: OE_Msg_Token_Name_Buffer := Empty_Buffer;
244: OE_Msg_Token_Value_Buffer := Empty_Buffer;
245: OE_Msg_Token_Count := Empty_Token_Count_Buffer;
246: OE_Msg_Last_Msg_Count := 0;
247: OE_Msg_Last_Token_Count := 0;
240: Empty_Token_Count_Buffer TOKEN_COUNT_TABLE_TYPE ;
241: begin
242: OE_Msg_Message_Name_Buffer := Empty_Buffer;
243: OE_Msg_Token_Name_Buffer := Empty_Buffer;
244: OE_Msg_Token_Value_Buffer := Empty_Buffer;
245: OE_Msg_Token_Count := Empty_Token_Count_Buffer;
246: OE_Msg_Last_Msg_Count := 0;
247: OE_Msg_Last_Token_Count := 0;
248: OE_Msg_Show_Msg_Count := 0;
241: begin
242: OE_Msg_Message_Name_Buffer := Empty_Buffer;
243: OE_Msg_Token_Name_Buffer := Empty_Buffer;
244: OE_Msg_Token_Value_Buffer := Empty_Buffer;
245: OE_Msg_Token_Count := Empty_Token_Count_Buffer;
246: OE_Msg_Last_Msg_Count := 0;
247: OE_Msg_Last_Token_Count := 0;
248: OE_Msg_Show_Msg_Count := 0;
249: OE_Msg_Show_Token_Count := 1;
242: OE_Msg_Message_Name_Buffer := Empty_Buffer;
243: OE_Msg_Token_Name_Buffer := Empty_Buffer;
244: OE_Msg_Token_Value_Buffer := Empty_Buffer;
245: OE_Msg_Token_Count := Empty_Token_Count_Buffer;
246: OE_Msg_Last_Msg_Count := 0;
247: OE_Msg_Last_Token_Count := 0;
248: OE_Msg_Show_Msg_Count := 0;
249: OE_Msg_Show_Token_Count := 1;
250:
243: OE_Msg_Token_Name_Buffer := Empty_Buffer;
244: OE_Msg_Token_Value_Buffer := Empty_Buffer;
245: OE_Msg_Token_Count := Empty_Token_Count_Buffer;
246: OE_Msg_Last_Msg_Count := 0;
247: OE_Msg_Last_Token_Count := 0;
248: OE_Msg_Show_Msg_Count := 0;
249: OE_Msg_Show_Token_Count := 1;
250:
251: end;
244: OE_Msg_Token_Value_Buffer := Empty_Buffer;
245: OE_Msg_Token_Count := Empty_Token_Count_Buffer;
246: OE_Msg_Last_Msg_Count := 0;
247: OE_Msg_Last_Token_Count := 0;
248: OE_Msg_Show_Msg_Count := 0;
249: OE_Msg_Show_Token_Count := 1;
250:
251: end;
252:
245: OE_Msg_Token_Count := Empty_Token_Count_Buffer;
246: OE_Msg_Last_Msg_Count := 0;
247: OE_Msg_Last_Token_Count := 0;
248: OE_Msg_Show_Msg_Count := 0;
249: OE_Msg_Show_Token_Count := 1;
250:
251: end;
252:
253:
286: OE_Debug_Info_Buffer := NULL;
287: end ;
288:
289:
290: END OE_MSG;