Search Results print_query
Overview
MSC_UTIL is a foundational utility package body in the Oracle E-Business Suite Advanced Supply Chain Planning (ASCP) module, owned by the APPS schema and classified as a UTIL-type API. It provides a shared library of diagnostic, logging, and DDL helper routines that other ASCP packages invoke rather than duplicating internally. The documented metadata indicates that MSC_UTIL is referenced by 94 other packages, confirming its role as a low-level infrastructure component. The package exposes 42 documented procedures and functions across its specification and body, with responsibilities spanning debug-level control, log file output, SQL query inspection, snapshot and materialized view creation, and index comparison. The header revision (120.24.12010000.6, dated 2008/08/28) is consistent with the 12.1.1 and 12.2.2 code lines, where this package remains part of the MSC schema family.
Key Procedures and Functions
The most frequently referenced routine, CHECK_MSG_LEVEL, is the anchor of the package's diagnostic framework. It accepts a numeric debug type and returns a BOOLEAN, evaluating a bitwise AND against the global G_CL_DEBUG variable to determine whether a given debug category is currently enabled. This design permits multiple debug flags to be combined in a single mask. LOG_MSG builds directly on CHECK_MSG_LEVEL: it accepts a debug type and message string, and only when the corresponding level is active does it timestamp the message and pass it to PRINT_MSG. PRINT_MSG itself writes a line to the concurrent manager log file via FND_FILE.PUT_LINE and suppresses any exceptions silently, ensuring logging failures never disrupt the calling program.
Debug control is complemented by MSC_SET_DEBUG_LEVEL, MSC_DEBUG, MSC_LOG, and MSC_OUT, which together allow runtime adjustment and emission of diagnostic output. Reporting and inspection routines include PRINT_TOP_WAIT, PRINT_CUM_STAT, PRINT_BAD_SQLS, PRINT_PULL_PARAMS, PRINT_ODS_PARAMS, PRINT_TRACE_FILE_NAME, and PRINT_QUERY, the latter using DBMS_SQL to parse, describe, and iterate result sets for one-row-per-line display. A second family of routines supports physical database operations: COMPARE_INDEX, GET_STORAGE_PARAMETERS, CREATE_SNAP_LOG, CREATE_SNAP, CREATE_SNAP2, CREATE_SNAP2_AS, and CREATE_INDEX, which collectively assist in snapshot creation and index validation during planning data refresh cycles.
Tables Accessed
The package reads and writes a broad set of dictionary and application tables through APPS synonyms. Administrative metadata is drawn from FND_APPLICATION, FND_ORACLE_USERID, FND_PRODUCT_INSTALLATIONS, and FND_TABLESPACES to resolve application IDs, schema credentials, installation state, and tablespace attributes. ASCP-specific configuration is read from MSC_APPS_INSTANCES, MSC_CATEGORY_SETS, MSC_ITEM_SUPPLIERS, and MSC_ITEM_TYPE_DEFINITIONS, supporting planning instance and item classification logic. For its snapshot and index routines, MSC_UTIL consults AD_DDL as well as the data dictionary views ALL_INDEXES, ALL_IND_COLUMNS, ALL_MVIEWS, ALL_TABLES, ALL_TRIGGERS, and DBA_TABLESPACES. These accesses underpin DDL generation, index comparison, and storage parameter resolution.
Usage Notes
MSC_UTIL is not intended for direct end-user invocation. It is called programmatically by ASCP concurrent programs, planning manager processes, and the 94 dependent packages that rely on its logging and DDL helpers. Developers extending or debugging ASCP code typically enable tracing through MSC_SET_DEBUG_LEVEL, then observe output routed by LOG_MSG and PRINT_MSG into the concurrent request log. The "check_msg_level" search term most likely originates from a developer investigating why diagnostic messages appear, or fail to appear, in a planning log; the answer lies in the G_CL_DEBUG bitmask evaluated by CHECK_MSG_LEVEL. Because logging exceptions are suppressed, absence of output should be attributed to debug-level configuration rather than runtime error.
-
APPS.MSC_UTIL SQL Statements
12.1.1
-
APPS.MSC_UTIL SQL Statements
12.2.2
-
PACKAGE BODY: APPS.MSC_UTIL
12.1.1
-
PACKAGE BODY: APPS.MSC_UTIL
12.2.2
-
APPS.MSC_UTIL dependencies on V$SESSION
12.1.1
-
APPS.MSC_UTIL dependencies on V$SESSION
12.2.2
-
PACKAGE BODY: APPS.MSC_X_HZ_PLAN
12.1.1
-
PACKAGE BODY: APPS.MSC_X_HZ_PLAN
12.2.2
-
APPS.MSC_X_HZ_PLAN dependencies on FND_LOG
12.1.1
-
APPS.MSC_X_HZ_PLAN dependencies on FND_LOG
12.2.2
-
APPS.MSC_UTIL dependencies on DBMS_SQL
12.1.1
-
APPS.MSC_UTIL dependencies on DBMS_SQL
12.2.2