DBA Data[Home] [Help]

PACKAGE: APPS.FNDCP_TMSRV

Source


1 package FNDCP_TMSRV AUTHID CURRENT_USER as
2 /* $Header: AFCPTMSS.pls 120.5 2005/09/17 02:07:24 pferguso ship $ */
3 
4 --
5 -- Data types
6 --
7 
8 type return_val_type is table of
9   varchar2 (480)
10 index by binary_integer;
11 
12 --
13 -- Constants
14 --
15 
16 DBG_OFF   constant varchar2(1)  := '0';    -- No debug on the transation
17 DBG_1     constant varchar2(1)  := '1';
18 DBG_2     constant varchar2(1)  := '2';
19 
20 PK_TKN    constant varchar2(1)  := 'X';    -- Token
21 PK_TRN    constant varchar2(1)  := '0';    -- Transaction Request
22 PK_TRN_D1 constant varchar2(1)  := '1';    -- Transaction Request (debug 1)
23 PK_TRN_D2 constant varchar2(1)  := '2';    -- Transaction Request (debug 2)
24 PK_REP    constant varchar2(1)  := 'R';    -- Reply
25 PK_REPUTP constant varchar2(1)  := 'U';    -- Reply unlinked TP
26 PK_REPBAD constant varchar2(1)  := 'B';    -- Reply bad for unknown reason
27 PK_EXIT   constant varchar2(1)  := 'E';    -- Exit TM
28 
29 E_SUCCESS constant number(4)    := 0;    -- success
30 E_TIMEOUT constant number(4)    := 1;    -- timeout
31 E_OTHER   constant number(4)    := 3;    -- other
32 E_OLDREQ  constant number(4)    := 4;    -- end date of req < sysdate
33 E_MAXVALS constant number(4)    := 5;    -- Max # of put vals exceeded
34 
35 E_EXIT    constant number(4)    := 10;   -- Exit TM
36 
37 SECOND    constant number(15)   := 1 / (24 * 60 * 60);    -- A second in days
38 MAXVALS   constant number(4)    := 20;                    -- Max # of retvals
39 
40 
41 --
42 -- Variables
43 --
44 
45 P_RETURN_VALS    return_val_type;
46 P_RETVALCOUNT    binary_integer    := 0;
47 P_DEBUG         varchar2(1) := DBG_OFF;
48 
49 
50 
51 --
52 --   debug_info
53 -- Purpose
54 --   If the debug flag is set, then write to
55 --   the debug table.
56 -- Arguments
57 --   IN:
58 --   the debug table.
59 -- Arguments
60 --   IN:
61 --    function_name - Name of the calling function
62 --    action_name   - Name of the current action being logged
63 --    message_text  - Any relevant info.
64 --    s_type        - Source Type ('C'- Client Send, 'M' - Manager Receive
65 --                                  'S' - Server Send, 'U' - Client Receive)
66 -- Notes
67 --   none.
68 --
69 procedure debug_info(function_name in varchar2,
70                      action_name   in varchar2,
71                      message_text  in varchar2,
72                      s_type        in varchar2 default 'M');
73 
74 --
75 -- Returns the oracle id, oracle username and the encripted password
76 -- for the TM (qapid, qid) to connect.
77 --
78 procedure get_oracle_account (e_code in out nocopy number,
79                               qapid  in     number,
80                               qid    in     number,
81                               oid    in out nocopy number,
82                               ouname in out nocopy varchar2,
83                               opass  in out nocopy varchar2);
84 
85 --
86 -- Initialization
87 --
88 procedure initialize (e_code in out nocopy number,
89                       qid    in     number,
90                       pid    in     number);
91 
92 --
93 -- Read the request.
94 --
95 procedure read_message(e_code  in out nocopy number,
96                    timeout in     number,
97                    pktyp   in out nocopy varchar2,
98                    enddate in out nocopy varchar2,
99                    reqid   in out nocopy number,
100                    return_id in out nocopy varchar2,
101                    nlslang in out nocopy varchar2,
102                    nls_num_chars in out nocopy varchar2,
103                    nls_date_lang in out nocopy varchar2,
104                    secgrpid in out nocopy number,
105                    usrid   in out nocopy number,
106                    rspapid in out nocopy number,
107                    rspid   in out nocopy number,
108                    logid   in out nocopy number,
109                    apsname in out nocopy varchar2,
110                    program in out nocopy varchar2,
111                    numargs in out nocopy number,
112                    org_type in out nocopy varchar2,
113                    org_id  in out nocopy number,
114                    arg_1   in out nocopy varchar2,
115                    arg_2   in out nocopy varchar2,
116                    arg_3   in out nocopy varchar2,
117                    arg_4   in out nocopy varchar2,
118                    arg_5   in out nocopy varchar2,
119                    arg_6   in out nocopy varchar2,
120                    arg_7   in out nocopy varchar2,
121                    arg_8   in out nocopy varchar2,
122                    arg_9   in out nocopy varchar2,
123                    arg_10  in out nocopy varchar2,
124                    arg_11  in out nocopy varchar2,
125                    arg_12  in out nocopy varchar2,
126                    arg_13  in out nocopy varchar2,
127                    arg_14  in out nocopy varchar2,
128                    arg_15  in out nocopy varchar2,
129                    arg_16  in out nocopy varchar2,
130                    arg_17  in out nocopy varchar2,
131                    arg_18  in out nocopy varchar2,
132                    arg_19  in out nocopy varchar2,
133                    arg_20  in out nocopy varchar2);
134 
135 --
136 -- This routine is called from a transaction program to put a return
137 -- to be sent back to the client.  This can be called at most, MAXVALS
138 -- times ane the values are stored in a table and written to the C pipe
139 -- when the TP completes.
140 --
141 procedure put_value (e_code in out nocopy number,
142                      retval in     varchar2);
143 
144 --
145 -- TPs call this routine to complete the transaction.
146 -- This writes the reply packet and the return values back to the client.
147 -- Also, resets the return values table.
148 --
149 procedure write_message (e_code    in out nocopy number,
150                          return_id in   varchar2,
151                          pktyp     in   varchar2,
152                          reqid     in   number,
153                          outcome   in   varchar2,
154                          message   in   varchar2);
155 
156 --
157 -- Monitor self (TM) to see if need to exit.
158 -- Exit if max procs is 0 or less than running, or current node is
159 -- different from the target when target i snot null (PCP).
160 -- Read in sleep seconds and manager debug flag a new.
161 --
162 procedure monitor_self (e_code in out nocopy number,
163                         qapid  in     number,
164                         qid    in     number,
165                         cnode  in     varchar2,
166                         slpsec in out nocopy number,
167                         mgrdbg in out nocopy varchar2);
168 
169 --
170 -- Use this routine to stop a TM when it's running online.
171 -- The routine writes an exit packet to the R pipe.
172 --
173 procedure stop_tm (qid in number);
174 
175 --
176 -- Not used.
177 --
178 procedure debug    (dbg_level in number   default 0);
179 
180 --
181 -- Not used.
182 --
183 function  debug return number;
184 
185 
186 --
187 -- Monitor self (TM) to see if need to exit.
188 -- Exit if max procs is 0 or less than running, or current node is
189 -- different from the target when target i snot null (PCP).
190 -- Read in sleep seconds and manager debug flag a new.
191 --
192 procedure monitor_self2 (e_code in out nocopy number,
193                          qapid  in     number,
194                          qid    in     number,
195                          cnode  in     varchar2,
196                          slpsec in out nocopy number,
197                          mgrdbg in out nocopy varchar2,
198                          procid in     number);
199 
200 
201 
202 
203 end FNDCP_TMSRV;