1 PACKAGE OZF_TP_UTIL_PVT AUTHID CURRENT_USER AS
2 /* $Header: ozfvtpus.pls 120.1 2005/06/02 14:40:29 appldev $ */
3 VERSION CONSTANT CHAR(80) := '$Header: ozfvtpus.pls 120.1 2005/06/02 14:40:29 appldev $';
4
5 -- ------------------------
6 -- Public Procedures
7 -- ------------------------
8
9 -- ------------------------------------------------------------------
10 -- Name: Initializes variables for logging other utility functions
11 -- Desc: 1. Setup which directory to put the log and what the log file
12 -- name is. The directory setup is used only if the program
13 -- is not run thru concurrent manager.
14 -- 2. Set up the debug flag if the debug profile is set
15 -- -----------------------------------------------------------------
16 PROCEDURE initialize(
17 p_log_file VARCHAR2 default 'ozf_time_load.log',
18 p_out_file VARCHAR2 default 'ozf_time_load.out',
19 p_directory VARCHAR2 default NULL);
20
21 -- ------------------------------------------------------------------
22 -- Name: debug_line
23 -- Desc: If debug flag is turned on, the message will be printed
24 -- All debug messages are concatenated with "DEBUG: " prefix
25 -- -----------------------------------------------------------------
26 PROCEDURE debug_line(
27 p_text VARCHAR2);
28
29 -- ------------------------------------------------------------------
30 -- Name: put_line
31 -- Desc: For now, just a wrapper on top of fnd_file
32 -- -----------------------------------------------------------------
33 PROCEDURE put_line(
34 p_text VARCHAR2);
35
36 -- ------------------------------------------------------------------
37 -- Name: put_timestamp
38 -- Desc: Prints the message along with the current timestamp
39 -- -----------------------------------------------------------------
40 PROCEDURE put_timestamp(
41 p_text VARCHAR2 default 'Time Stamp');
42
43
44 -- ------------------------------------------------------------------
45 -- Name: start_timer
46 -- Desc: Starts the internal timer. If timer already started, it
47 -- re-sets the start time
48 -- -----------------------------------------------------------------
49 PROCEDURE start_timer;
50
51 -- ------------------------------------------------------------------
52 -- Name: stop_timer
53 -- Desc: Stop the internal timer and stores the duration in
54 -- number of days.
55 -- -----------------------------------------------------------------
56 PROCEDURE stop_timer;
57
58 -- ------------------------------------------------------------------
59 -- Name: print_timer
60 -- Desc: Prints the message along with the current timer display.
61 -- If the timer is still running, it prints the duration since
62 -- the timer was started. If the timer has been stopped, it
63 -- prints the duration between last timer start and stop.
64 -- The duration are printed in the following format: x days HH:MM:SS
65 -- -----------------------------------------------------------------
66 PROCEDURE print_timer(
67 p_text VARCHAR2 default 'Duration');
68
69
70 -- -----------------------------------------------------------------
71 -- Name: get_schema_name
72 -- Desc: Return the schema name of p_app_short_name, which is
73 -- default to 'OZF'.
74 -- Return null for error.
75 -- -----------------------------------------------------------------
76 FUNCTION get_schema_name(
77 p_app_short_name VARCHAR2 default 'OZF'
78 ) return varchar2;
79
80
81 /*---------------------------------------------------------------------
82 Call to get the log directory when running program from SQLPLUS
83
84 Doing so by parsing the 'utl_file_dir' init.ora parameter and scanning
85 for the word log and getting that string out.
86 ---------------------------------------------------------------------*/
87 FUNCTION get_utl_file_dir return VARCHAR2;
88
89
90
91 END OZF_TP_UTIL_PVT;