Search Results close_temp_file
Overview
APPS.PAY_CORE_FILES is the core file-handling utility package within the Oracle Payroll module of Oracle E-Business Suite. It provides the low-level primitives used throughout Oracle Payroll to create, write to, read from, and close physical and temporary files processed by concurrent programs and Oracle Forms interfaces. The package is declared AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking schema rather than the definer, an important characteristic for a utility that must operate on payroll output files and intermediate staging objects under varying runtime credentials. The package version header indicates it was last modified under patch 120.6.12010000.2 (2008), and it is documented as referenced by 57 other packages, confirming its role as shared infrastructure rather than a standalone business process. In ETRM, the package is classified as API classification OTHER.
Key Procedures and Functions
- OPEN_FILE — Opens a file for processing, registering the source identifier, source type, file location, file type, internal file name, and sequence, and returns an output file identifier used by subsequent calls.
- WRITE_TO_FILE — Writes a text (VARCHAR2) payload to an open file identified by the file identifier.
- WRITE_TO_FILE_RAW — Writes a RAW payload to an open file, supporting binary content.
- CLOSE_FILE — Closes a previously opened file identified by the file identifier, releasing associated resources.
- READ_FROM_CLOB — Two overloaded procedures. The first reads a chunk from a CLOB associated with a file identifier; the second reads from a CLOB passed directly. Both use size and position parameters and return a VARCHAR2 text fragment.
- READ_FROM_CLOB_RAW — The procedure matched by the user's search. It reads raw data from the CLOB associated with a file identifier, using size and position parameters, returning the extracted fragment as a RAW value. This supports binary-safe retrieval, for example when extracting packed or encoded file segments.
- OPEN_TEMP_FILE — Opens a temporary CLOB-based file for in-memory processing.
- CLOSE_TEMP_FILE — Closes the temporary CLOB-based file, releasing the temporary LOB.
- FORM_READ_CLOB — Added under Bug# 3688801; reads a CLOB chunk for Oracle Forms consumption.
- RETURN_CLOB_LENGTH — Returns the length of a file's CLOB content given its file identifier.
- RETURN_LENGTH — Returns the generic length associated with a file identifier.
- WRITE_TO_MAGTAPE_LOB — Two overloaded procedures for writing VARCHAR2 text or BLOB data to a magtape LOB destination.
Tables Accessed
- PAY_FILE_DETAILS and PAY_FILE_DETAILS_S — Persistent definition and sequence data describing payroll output files; used to resolve file identifiers, locations, names, and metadata during open and write operations.
- PAY_ASSIGNMENT_ACTIONS — Action context for payroll runs that generate file output.
- PAY_TEMP_OBJECT_ACTIONS — Tracks temporary objects created during file processing.
The package also depends on the DBMS_LOB and UTL_RAW supplied packages, the PLITBLM package, and DUAL, all accessed through APPS synonyms.
Usage Notes
PAY_CORE_FILES is a programmatic utility, not an end-user feature. It is typically invoked from payroll concurrent programs (such as those producing BACS, EFT, or magtape output), from Oracle Forms-based payroll file review interfaces, and from custom PL/SQL that must stage, segment, or parse payroll output. The READ_FROM_CLOB_RAW procedure is generally called in a loop, advancing the position parameter in fixed-size increments, when a caller needs to copy or decode binary content stored in a payroll CLOB. Because the package relies on APPS synonyms and AUTHID CURRENT_USER semantics, callers must ensure appropriate access to the underlying PAY tables and LOB APIs. Developers extending payroll file handling should call these documented interfaces rather than manipulating the underlying tables directly.