Use the below atonomous transaction to print messages in the LSH job log file. You need to get important job information like company id and job id by using getJobInfo(); before calling this procedure.
PROCEDURE print (
pi_cMessage IN VARCHAR2 -- message that needs to printed in the log file
)
IS PRAGMA AUTONOMOUS_TRANSACTION;
vc_message VARCHAR2(4000);
vc_returnStatus VARCHAR2(1);
vn_msg_count NUMBER;
vc_msg_data VARCHAR2(4000);
BEGIN
SELECT TO_CHAR(sysdate, 'DD-MON-RRRR hh24:mi:ssss')
INTO vc_message
FROM dual;
vc_message := vc_message || ' - ' || pi_cMessage;
CDR_PUB_EXE_SUBMISSION.addjoblogentry(P_API_VERSION => 1
,P_INIT_MSG_LIST => CDR_PUB_DEF_CONSTANTS.G_FALSE
,P_COMMIT => CDR_PUB_DEF_CONSTANTS.G_TRUE
,P_VALIDATION_LEVEL => CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL
,X_RETURN_STATUS => vc_returnStatus
,X_MSG_COUNT => vn_msg_count
,X_MSG_DATA => vc_msg_data
,PI_NCOMPANYID => 'Give company id here'
,PI_NJOBID => 'Give job id here'
,PI_VLOGENTRY => vc_message
);
EXCEPTION
WHEN OTHERS THEN
NULL;
END print;
Showing posts with label LSH Programming. Show all posts
Showing posts with label LSH Programming. Show all posts
Thursday, December 15, 2011
Wednesday, December 14, 2011
How to get the currently executing Job Id?
Use the below PL/SQL block to get the currently executing job id.
DECLARE
v_job_id NUMBER;
BEGIN
v_job_id := CDR_PUB_EXE_RUNTIME.getCurrentlyExecutingJobId(1);
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
DECLARE
v_job_id NUMBER;
BEGIN
v_job_id := CDR_PUB_EXE_RUNTIME.getCurrentlyExecutingJobId(1);
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
Labels:
life sciences,
LSH program,
LSH Programming,
Oracle LSH Programming,
Oracle PLSQL,
oraclelsh,
PLSQL
Tuesday, December 13, 2011
LSH Programming Tutorial
In this tutorial we learn LSH Programming techniques. We start with the fundamentals of the LSH programming and move on to advanced programming techniques. This tutorial deals with programmatical way of creating objects in LSH, deriving metadata from LSH and modifying objects.
Intended Audience:
LSH Developers, Programmers and Support Engineers
Pre-Requisite:
Must have hands on experience in PL/SQL programming. Must have used PL/SQL collections, arrays and nested tables.
Contents:
1. How to get the currently executing job id
2. How to initialize job log
3. How to get currently executing user id
3. How to get currently executing user name
Labels:
Arrays,
Collections,
life sciences,
life sciences data hub,
LSH program,
LSH Programming,
oracle,
Oracle LSH Programming,
Oracle PLSQL,
oraclelsh,
PLSQL,
utility
Subscribe to:
Posts (Atom)