DBA Data[Home] [Help]

APPS.PER_SE_POSTALCODE_UPLOAD dependencies on UTL_FILE

Line 14: l_file_type UTL_FILE.file_type;

10: g_security_group_id PER_BUSINESS_GROUPS.business_group_id%type;
11: --l_original_desc fnd_lookup_values.description%type;
12:
13: -- File Handling variables
14: l_file_type UTL_FILE.file_type;
15: l_location VARCHAR2 (4000);
16: l_line_read VARCHAR2 (4000) ;
17: l_batch_seq NUMBER :=0;
18:

Line 76: then RAISE UTL_FILE.invalid_filehandle;

72: g_bg_id := p_business_group_id;
73: /* Get the filename from parameter to local variable */
74: l_filename := p_filename;
75: if substr(l_filename,length(l_filename)-3) <>'.txt'
76: then RAISE UTL_FILE.invalid_filehandle;
77: END IF;
78:
79: /* Get the DIR set in the profile to local variable */
80: fnd_profile.get (c_data_exchange_dir, l_location);

Line 89: l_file_type := UTL_FILE.fopen (l_location, l_filename, c_read_file, c_max_linesize);

85: RAISE e_fatal_error;
86: END IF;
87: hr_utility.set_location(l_location,4);
88: -- Open flat file
89: l_file_type := UTL_FILE.fopen (l_location, l_filename, c_read_file, c_max_linesize);
90:
91: LOOP
92: BEGIN
93:

Line 94: UTL_FILE.get_line (l_file_type, l_line_read);

90:
91: LOOP
92: BEGIN
93:
94: UTL_FILE.get_line (l_file_type, l_line_read);
95: hr_utility.set_location ( ' line ' || l_line_read, 10);
96: l_batch_seq := l_batch_seq + 1;
97: READ_RECORD(l_line_read);
98:

Line 151: IF UTL_FILE.is_open (l_file_type)

147: WHEN e_fatal_error
148: -- No directory specified
149: THEN
150: -- Close the file in case of error
151: IF UTL_FILE.is_open (l_file_type)
152: THEN
153: UTL_FILE.fclose (l_file_type);
154: END IF;
155:

Line 153: UTL_FILE.fclose (l_file_type);

149: THEN
150: -- Close the file in case of error
151: IF UTL_FILE.is_open (l_file_type)
152: THEN
153: UTL_FILE.fclose (l_file_type);
154: END IF;
155:
156: hr_utility.set_location (g_proc, 270);
157:

Line 167: WHEN UTL_FILE.invalid_operation

163:
164: -- Return the message to the ConcMgr (This msg will appear in the log file)
165: errbuf := hr_utility.get_message;
166:
167: WHEN UTL_FILE.invalid_operation
168: -- File could not be opened as requested, because of operating system permissions
169: -- Also raised when attempting a write operation on a file opened for read.
170:
171: THEN

Line 172: IF UTL_FILE.is_open (l_file_type)

168: -- File could not be opened as requested, because of operating system permissions
169: -- Also raised when attempting a write operation on a file opened for read.
170:
171: THEN
172: IF UTL_FILE.is_open (l_file_type)
173: THEN
174: UTL_FILE.fclose (l_file_type);
175: END IF;
176:

Line 174: UTL_FILE.fclose (l_file_type);

170:
171: THEN
172: IF UTL_FILE.is_open (l_file_type)
173: THEN
174: UTL_FILE.fclose (l_file_type);
175: END IF;
176:
177: hr_utility.set_location (g_proc, 280);
178: retcode := c_error;

Line 180: WHEN UTL_FILE.internal_error

176:
177: hr_utility.set_location (g_proc, 280);
178: retcode := c_error;
179: errbuf := 'Reading File ('||l_location ||' -> ' || l_filename || ') - Invalid Operation.';
180: WHEN UTL_FILE.internal_error
181: -- Unspecified internal error
182: THEN
183: IF UTL_FILE.is_open (l_file_type)
184: THEN

Line 183: IF UTL_FILE.is_open (l_file_type)

179: errbuf := 'Reading File ('||l_location ||' -> ' || l_filename || ') - Invalid Operation.';
180: WHEN UTL_FILE.internal_error
181: -- Unspecified internal error
182: THEN
183: IF UTL_FILE.is_open (l_file_type)
184: THEN
185: UTL_FILE.fclose (l_file_type);
186: END IF;
187:

Line 185: UTL_FILE.fclose (l_file_type);

181: -- Unspecified internal error
182: THEN
183: IF UTL_FILE.is_open (l_file_type)
184: THEN
185: UTL_FILE.fclose (l_file_type);
186: END IF;
187:
188: hr_utility.set_location (g_proc, 290);
189: retcode := c_error;

Line 192: WHEN UTL_FILE.invalid_mode

188: hr_utility.set_location (g_proc, 290);
189: retcode := c_error;
190: errbuf := 'Reading File (' || l_location || ' -> ' || l_filename || ') - Internal Error.';
191:
192: WHEN UTL_FILE.invalid_mode
193: -- Invalid string specified for file mode
194: THEN
195: IF UTL_FILE.is_open (l_file_type)
196: THEN

Line 195: IF UTL_FILE.is_open (l_file_type)

191:
192: WHEN UTL_FILE.invalid_mode
193: -- Invalid string specified for file mode
194: THEN
195: IF UTL_FILE.is_open (l_file_type)
196: THEN
197: UTL_FILE.fclose (l_file_type);
198: END IF;
199:

Line 197: UTL_FILE.fclose (l_file_type);

193: -- Invalid string specified for file mode
194: THEN
195: IF UTL_FILE.is_open (l_file_type)
196: THEN
197: UTL_FILE.fclose (l_file_type);
198: END IF;
199:
200: hr_utility.set_location (g_proc, 300);
201: retcode := c_error;

Line 204: WHEN UTL_FILE.invalid_path

200: hr_utility.set_location (g_proc, 300);
201: retcode := c_error;
202: errbuf := 'Reading File (' || l_location || ' -> ' || l_filename || ') - Invalid Mode.';
203:
204: WHEN UTL_FILE.invalid_path
205: -- Directory or filename is invalid or not accessible
206: THEN
207: IF UTL_FILE.is_open (l_file_type)
208: THEN

Line 207: IF UTL_FILE.is_open (l_file_type)

203:
204: WHEN UTL_FILE.invalid_path
205: -- Directory or filename is invalid or not accessible
206: THEN
207: IF UTL_FILE.is_open (l_file_type)
208: THEN
209: UTL_FILE.fclose (l_file_type);
210: END IF;
211:

Line 209: UTL_FILE.fclose (l_file_type);

205: -- Directory or filename is invalid or not accessible
206: THEN
207: IF UTL_FILE.is_open (l_file_type)
208: THEN
209: UTL_FILE.fclose (l_file_type);
210: END IF;
211:
212: retcode := c_error;
213: errbuf := 'Reading File (' || l_location || ' -> ' || l_filename || ') - Invalid Path or Filename.';

Line 216: WHEN UTL_FILE.invalid_filehandle

212: retcode := c_error;
213: errbuf := 'Reading File (' || l_location || ' -> ' || l_filename || ') - Invalid Path or Filename.';
214: hr_utility.set_location (g_proc, 310);
215:
216: WHEN UTL_FILE.invalid_filehandle
217: -- File type does not specify an open file
218: THEN
219: IF UTL_FILE.is_open (l_file_type)
220: THEN

Line 219: IF UTL_FILE.is_open (l_file_type)

215:
216: WHEN UTL_FILE.invalid_filehandle
217: -- File type does not specify an open file
218: THEN
219: IF UTL_FILE.is_open (l_file_type)
220: THEN
221: UTL_FILE.fclose (l_file_type);
222: END IF;
223:

Line 221: UTL_FILE.fclose (l_file_type);

217: -- File type does not specify an open file
218: THEN
219: IF UTL_FILE.is_open (l_file_type)
220: THEN
221: UTL_FILE.fclose (l_file_type);
222: END IF;
223:
224: hr_utility.set_location (g_proc, 320);
225: retcode := c_error;

Line 227: WHEN UTL_FILE.read_error

223:
224: hr_utility.set_location (g_proc, 320);
225: retcode := c_error;
226: errbuf := 'Reading File (' || l_location || ' -> ' || l_filename || ') - Invalid File Type.';
227: WHEN UTL_FILE.read_error
228:
229: -- Operating system error occurred during a read operation
230: THEN
231: IF UTL_FILE.is_open (l_file_type)

Line 231: IF UTL_FILE.is_open (l_file_type)

227: WHEN UTL_FILE.read_error
228:
229: -- Operating system error occurred during a read operation
230: THEN
231: IF UTL_FILE.is_open (l_file_type)
232: THEN
233: UTL_FILE.fclose (l_file_type);
234: END IF;
235:

Line 233: UTL_FILE.fclose (l_file_type);

229: -- Operating system error occurred during a read operation
230: THEN
231: IF UTL_FILE.is_open (l_file_type)
232: THEN
233: UTL_FILE.fclose (l_file_type);
234: END IF;
235:
236: hr_utility.set_location (g_proc, 330);
237: retcode := c_error;