DBA Data[Home] [Help]

APPS.JTF_DEBUG_PUB dependencies on UTL_FILE

Line 65: /* this procedure handles all exceptions raised by utl_file

61: END;
62:
63:
64: ---------------------------------------------------------------------------
65: /* this procedure handles all exceptions raised by utl_file
66: */
67:
68: procedure handle_utl_file_exceptions (exception_name in varchar2,
69: x_return_Status out nocopy varchar2,

Line 68: procedure handle_utl_file_exceptions (exception_name in varchar2,

64: ---------------------------------------------------------------------------
65: /* this procedure handles all exceptions raised by utl_file
66: */
67:
68: procedure handle_utl_file_exceptions (exception_name in varchar2,
69: x_return_Status out nocopy varchar2,
70: x_msg_count out nocopy number,
71: x_msg_data out nocopy varchar2) is
72: CURSOR C_profile IS

Line 75: where profile_option_name = 'UTL_FILE_LOG';

71: x_msg_data out nocopy varchar2) is
72: CURSOR C_profile IS
73: select user_profile_option_name
74: from fnd_profile_options_vl
75: where profile_option_name = 'UTL_FILE_LOG';
76:
77: l_profile_name varchar2(250);
78: begin
79: begin

Line 83: l_profile_name := nvl(l_profile_name, 'UTL_FILE_LOG');

79: begin
80: OPEN C_profile;
81: FETCH C_profile into l_profile_name;
82: CLOSE C_profile;
83: l_profile_name := nvl(l_profile_name, 'UTL_FILE_LOG');
84:
85: exception
86: when others then
87: l_profile_name := 'UTL_FILE_LOG';

Line 87: l_profile_name := 'UTL_FILE_LOG';

83: l_profile_name := nvl(l_profile_name, 'UTL_FILE_LOG');
84:
85: exception
86: when others then
87: l_profile_name := 'UTL_FILE_LOG';
88: end;
89: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
90: FND_MESSAGE.Set_Name('JTF', 'JTF_DEBUG_ERROR1');
91: FND_MESSAGE.Set_Token('EXCEPTION_NAME',exception_name, FALSE);

Line 101: end handle_utl_file_exceptions;

97: ,P_MSG_COUNT => 1
98: ,X_MSG_COUNT => X_MSG_COUNT
99: ,X_MSG_DATA => X_MSG_DATA
100: ,X_RETURN_STATUS => X_RETURN_STATUS);
101: end handle_utl_file_exceptions;
102:
103: ----------------------------------------------------------------------------
104: /** set the global session ID */
105: PROCEDURE SET_ICX_SESSION_ID(

Line 297: l_filetype UTL_FILE.file_type;

293: l_session_id NUMBER;
294: l_user_id NUMBER ;
295: l_dir VARCHAR2(2000);
296: l_filename VARCHAR2(240);
297: l_filetype UTL_FILE.file_type;
298: l_module VARCHAR2(200);
299: l_buffer VARCHAR2(4000);
300: l_profile_name VARCHAR2(240);
301: l_timestamp VARCHAR2(240);

Line 321: fnd_profile.get('UTL_FILE_LOG', l_dir);

317: p_debug_tbl(i).debug_message);
318: END LOOP;
319: end if;
320:
321: fnd_profile.get('UTL_FILE_LOG', l_dir);
322: if l_dir is null then
323: SELECT substr(value,1,instr(value,',',1,1)-1)
324: INTO l_dir
325: FROM v$parameter

Line 326: WHERE name = 'utl_file_dir';

322: if l_dir is null then
323: SELECT substr(value,1,instr(value,',',1,1)-1)
324: INTO l_dir
325: FROM v$parameter
326: WHERE name = 'utl_file_dir';
327: if l_dir is null then -- if there is only 1 directory
328: SELECT value
329: INTO l_dir
330: FROM v$parameter

Line 331: WHERE name = 'utl_file_dir';

327: if l_dir is null then -- if there is only 1 directory
328: SELECT value
329: INTO l_dir
330: FROM v$parameter
331: WHERE name = 'utl_file_dir';
332: end if;
333:
334: --fnd_profile.put('UTL_FILE_LOG',l_dir);
335: if l_dir is null then

Line 334: --fnd_profile.put('UTL_FILE_LOG',l_dir);

330: FROM v$parameter
331: WHERE name = 'utl_file_dir';
332: end if;
333:
334: --fnd_profile.put('UTL_FILE_LOG',l_dir);
335: if l_dir is null then
336: RAISE UTL_FILE.INVALID_PATH;
337: end if;
338: end if;

Line 336: RAISE UTL_FILE.INVALID_PATH;

332: end if;
333:
334: --fnd_profile.put('UTL_FILE_LOG',l_dir);
335: if l_dir is null then
336: RAISE UTL_FILE.INVALID_PATH;
337: end if;
338: end if;
339:
340: SELECT substr('l'|| substr(to_char(sysdate,'MI'),1,1)

Line 345: l_filetype := UTL_FILE.fopen(location => l_dir,

341: || lpad(jtf_Debug_s.nextval,6,'0'),1,8) || '.dbg'
342: into l_filename
343: from dual;
344:
345: l_filetype := UTL_FILE.fopen(location => l_dir,
346: filename => l_filename,
347: open_mode=> 'a');
348:
349: l_user_id := to_number(FND_PROFILE.VALUE( 'USER_ID'));

Line 357: UTL_FILE.put_line(l_filetype, i.message_text);

353: end if;
354:
355: FOR i in C_log_message(l_session_id, l_user_id, p_module, l_timestamp) LOOP
356: l_return := TRUE; -- need to move this out of the loop
357: UTL_FILE.put_line(l_filetype, i.message_text);
358: END LOOP;
359:
360: UTL_FILE.fflush(l_filetype);
361: UTL_FILE.fclose(l_filetype);

Line 360: UTL_FILE.fflush(l_filetype);

356: l_return := TRUE; -- need to move this out of the loop
357: UTL_FILE.put_line(l_filetype, i.message_text);
358: END LOOP;
359:
360: UTL_FILE.fflush(l_filetype);
361: UTL_FILE.fclose(l_filetype);
362:
363: x_path := l_dir;
364: if l_return then

Line 361: UTL_FILE.fclose(l_filetype);

357: UTL_FILE.put_line(l_filetype, i.message_text);
358: END LOOP;
359:
360: UTL_FILE.fflush(l_filetype);
361: UTL_FILE.fclose(l_filetype);
362:
363: x_path := l_dir;
364: if l_return then
365: x_filename := l_filename;

Line 372: WHEN UTL_FILE.INVALID_PATH THEN

368: end if;
369:
370:
371: EXCEPTION
372: WHEN UTL_FILE.INVALID_PATH THEN
373: handle_utl_file_exceptions('INVALID PATH', x_return_Status, x_msg_count, x_msg_data);
374: WHEN UTL_FILE.INVALID_MODE THEN
375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);
376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN

Line 373: handle_utl_file_exceptions('INVALID PATH', x_return_Status, x_msg_count, x_msg_data);

369:
370:
371: EXCEPTION
372: WHEN UTL_FILE.INVALID_PATH THEN
373: handle_utl_file_exceptions('INVALID PATH', x_return_Status, x_msg_count, x_msg_data);
374: WHEN UTL_FILE.INVALID_MODE THEN
375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);
376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);

Line 374: WHEN UTL_FILE.INVALID_MODE THEN

370:
371: EXCEPTION
372: WHEN UTL_FILE.INVALID_PATH THEN
373: handle_utl_file_exceptions('INVALID PATH', x_return_Status, x_msg_count, x_msg_data);
374: WHEN UTL_FILE.INVALID_MODE THEN
375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);
376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);
378: WHEN UTL_FILE.INVALID_OPERATION THEN

Line 375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);

371: EXCEPTION
372: WHEN UTL_FILE.INVALID_PATH THEN
373: handle_utl_file_exceptions('INVALID PATH', x_return_Status, x_msg_count, x_msg_data);
374: WHEN UTL_FILE.INVALID_MODE THEN
375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);
376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);
378: WHEN UTL_FILE.INVALID_OPERATION THEN
379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);

Line 376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN

372: WHEN UTL_FILE.INVALID_PATH THEN
373: handle_utl_file_exceptions('INVALID PATH', x_return_Status, x_msg_count, x_msg_data);
374: WHEN UTL_FILE.INVALID_MODE THEN
375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);
376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);
378: WHEN UTL_FILE.INVALID_OPERATION THEN
379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);
380: WHEN UTL_FILE.WRITE_ERROR THEN

Line 377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);

373: handle_utl_file_exceptions('INVALID PATH', x_return_Status, x_msg_count, x_msg_data);
374: WHEN UTL_FILE.INVALID_MODE THEN
375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);
376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);
378: WHEN UTL_FILE.INVALID_OPERATION THEN
379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);
380: WHEN UTL_FILE.WRITE_ERROR THEN
381: handle_utl_file_exceptions('WRITE ERROR', x_return_Status, x_msg_count, x_msg_data);

Line 378: WHEN UTL_FILE.INVALID_OPERATION THEN

374: WHEN UTL_FILE.INVALID_MODE THEN
375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);
376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);
378: WHEN UTL_FILE.INVALID_OPERATION THEN
379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);
380: WHEN UTL_FILE.WRITE_ERROR THEN
381: handle_utl_file_exceptions('WRITE ERROR', x_return_Status, x_msg_count, x_msg_data);
382: WHEN UTL_FILE.INTERNAL_ERROR THEN

Line 379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);

375: handle_utl_file_exceptions('INVALID MODE', x_return_Status, x_msg_count, x_msg_data);
376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);
378: WHEN UTL_FILE.INVALID_OPERATION THEN
379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);
380: WHEN UTL_FILE.WRITE_ERROR THEN
381: handle_utl_file_exceptions('WRITE ERROR', x_return_Status, x_msg_count, x_msg_data);
382: WHEN UTL_FILE.INTERNAL_ERROR THEN
383: handle_utl_file_exceptions('INTERNAL ERROR', x_return_Status, x_msg_count, x_msg_data);

Line 380: WHEN UTL_FILE.WRITE_ERROR THEN

376: WHEN UTL_FILE.INVALID_FILEHANDLE THEN
377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);
378: WHEN UTL_FILE.INVALID_OPERATION THEN
379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);
380: WHEN UTL_FILE.WRITE_ERROR THEN
381: handle_utl_file_exceptions('WRITE ERROR', x_return_Status, x_msg_count, x_msg_data);
382: WHEN UTL_FILE.INTERNAL_ERROR THEN
383: handle_utl_file_exceptions('INTERNAL ERROR', x_return_Status, x_msg_count, x_msg_data);
384: WHEN OTHERS THEN

Line 381: handle_utl_file_exceptions('WRITE ERROR', x_return_Status, x_msg_count, x_msg_data);

377: handle_utl_file_exceptions('INVALID FILEHANDLE', x_return_Status, x_msg_count, x_msg_data);
378: WHEN UTL_FILE.INVALID_OPERATION THEN
379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);
380: WHEN UTL_FILE.WRITE_ERROR THEN
381: handle_utl_file_exceptions('WRITE ERROR', x_return_Status, x_msg_count, x_msg_data);
382: WHEN UTL_FILE.INTERNAL_ERROR THEN
383: handle_utl_file_exceptions('INTERNAL ERROR', x_return_Status, x_msg_count, x_msg_data);
384: WHEN OTHERS THEN
385: JTF_DEBUG_PUB.HANDLE_EXCEPTIONS(

Line 382: WHEN UTL_FILE.INTERNAL_ERROR THEN

378: WHEN UTL_FILE.INVALID_OPERATION THEN
379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);
380: WHEN UTL_FILE.WRITE_ERROR THEN
381: handle_utl_file_exceptions('WRITE ERROR', x_return_Status, x_msg_count, x_msg_data);
382: WHEN UTL_FILE.INTERNAL_ERROR THEN
383: handle_utl_file_exceptions('INTERNAL ERROR', x_return_Status, x_msg_count, x_msg_data);
384: WHEN OTHERS THEN
385: JTF_DEBUG_PUB.HANDLE_EXCEPTIONS(
386: P_API_NAME => NULL

Line 383: handle_utl_file_exceptions('INTERNAL ERROR', x_return_Status, x_msg_count, x_msg_data);

379: handle_utl_file_exceptions('INVALID OPERATION', x_return_Status, x_msg_count, x_msg_data);
380: WHEN UTL_FILE.WRITE_ERROR THEN
381: handle_utl_file_exceptions('WRITE ERROR', x_return_Status, x_msg_count, x_msg_data);
382: WHEN UTL_FILE.INTERNAL_ERROR THEN
383: handle_utl_file_exceptions('INTERNAL ERROR', x_return_Status, x_msg_count, x_msg_data);
384: WHEN OTHERS THEN
385: JTF_DEBUG_PUB.HANDLE_EXCEPTIONS(
386: P_API_NAME => NULL
387: ,P_PKG_NAME => G_PKG_NAME