Search Results out_fname




Overview

FND_FILE_PRIVATE is an internal Oracle E-Business Suite package body owned by APPS that provides the low-level file I/O primitives used by the FND_FILE utility layer. Its primary business role is to support concurrent program output management: enabling a running concurrent request to write log and output text, and to allow that text to be read back for display, reprinting, or transfer to the Concurrent Manager file system. In Oracle EBS 12.1.1 and 12.2.2 the package is classified as OTHER in the ETRM repository and is documented with five procedures. It is not a public API for application developers; rather, it is a supporting implementation package invoked by the higher-level FND_FILE wrapper and by other internal components (ETRM records that it is referenced by two other packages).

Key Procedures and Functions

  • PUT_NAMES — Stores the log file name, output file name, and temporary directory name into the package-level globals LOG_FNAME, OUT_FNAME, and TEMP_DIR. These values are later used when the physical files are opened. This is the initialization entry point that associates a concurrent request's file identities with the package state.
  • OPEN — Opens the log and output files for reading. It sets the OUTFILE and LOGFILE status flags to 'F' (false) initially, clears the NEXT_OUT_LINE and NEXT_LOG_LINE buffers, then attempts to open each file; on success the corresponding flag is set to 'T' (true). Note that files are opened with mode 'r' (read) in this package body, consistent with its role in reading back already-written concurrent output.
  • LOGFILE_GET — Reads log content from the open log file handle in a loop, accumulating lines into a buffer until the BUFFER_SIZE threshold is reached. It returns a STATUS value ('OK' or 'EOF') and a TEXT value. Carriage return characters are appended to preserve line breaks. This procedure underpins retrieval of concurrent request log text.
  • OUTFILE_GET — The parallel procedure for the output file. It reads the output file handle and returns output text and a status indicator in the same buffered manner as LOGFILE_GET.
  • CLOSE — Closes the open log and output file handles, releasing UTL_FILE resources associated with the concurrent request. This is the counterpart to OPEN and is the procedure most relevant to a "close_file" search, since it performs the actual file handle cleanup.

An internal function, OPEN_FILE, is also present in the source; it determines which file type ('LOG' or 'OUT') to open and returns a boolean, silently returning FALSE on any exception.

Tables Accessed

The package does not reference any application database tables. ETRM documents two referenced objects, both via APPS synonyms:

  • UTL_FILE — The Oracle supplied PL/SQL file I/O package, used to open, read, close, and manage the operating-system log and output files stored in the concurrent manager temporary directory.
  • DBMS_LOCK — The Oracle supplied locking package, referenced for serialization/synchronization of file access operations.

Because FND_FILE_PRIVATE manipulates operating-system files rather than database rows, no FND_% or application tables are accessed.

Usage Notes

FND_FILE_PRIVATE is invoked indirectly. Application code and concurrent programs normally call the public FND_FILE package; FND_FILE in turn delegates file handling to this private package. Typical scenarios include retrieving the log or output of a concurrent request for on-line viewing (for example from the Concurrent Requests form or the "View Log"/"View Output" actions), and reprinting output for diagnostic purposes. A developer searching for "close_file" is most likely looking at the CLOSE procedure, which closes the UTL_FILE handles opened by OPEN. Because this is a private implementation package, direct calls from custom code are discouraged; the supported approach is to use FND_FILE and the Concurrent Manager APIs. Any change to this package affects the two dependent packages documented by ETRM, so it should be treated as an internal, upgrade-sensitive object.