How to pass a variable to a procedure at run time
Hi All,
Can anyone give me a brief on how to pass a value to a ODI procedure at run time using option utility in ODI 11g.
Thanks in advance.
Regards,
Sreedhar S.
First method of doing :
Simply add anew option to your procedure and then just assign the ODI variable you have created as the value for the option the in your jython code reference the option using the following ODI API method: <%=odiRef.getOption("OPTION_NAME")%>
Second way of doing :
Put the procedure in a package. Go to option tab. Assign a variable to the option. You can declare the variable in the package and pass the value in variable while execution.
Similar Messages
-
How to pass type variable in a procedure as IN parameter
CREATE OR REPLACE PROCEDURE APPS."QFJS_LMO_TIMESLOT_PROC"
a_std IN VARCHAR2,
TYPE str_table IS TABLE OF CLOB INDEX BY BINARY_INTEGER;
timeStr OUT str_table;
This is giving error!!
Please help!!This is what you're looking for? (you can also create the type in your database)
CREATE OR REPLACE PACKAGE APPS.MY_PACKAGE AS
PRAGMA SERIALLY_REUSABLE;
TYPE str_table IS TABLE OF CLOB INDEX BY BINARY_INTEGER;
PROCEDURE "QFJS_LMO_TIMESLOT_PROC"(a_std IN VARCHAR2,
post_std IN VARCHAR2,
a_time IN VARCHAR2,
post_hc IN NUMBER,
pre_hc IN NUMBER,
ods_schedule_date IN DATE,
timeStr IN OUT str_table);
END MY_PACKAGE;
CREATE OR REPLACE PACKAGE BODY APPS.MY_PACKAGE IS
PRAGMA SERIALLY_REUSABLE;
PROCEDURE "QFJS_LMO_TIMESLOT_PROC"(a_std IN VARCHAR2,
post_std IN VARCHAR2,
a_time IN VARCHAR2,
post_hc IN NUMBER,
pre_hc IN NUMBER,
ods_schedule_date IN DATE,
timeStr IN OUT str_table) IS
v_clob clob;
BEGIN
FOR i IN 1 .. timeStr.COUNT LOOP
v_clob := timeStr(i);
END LOOP;
END "QFJS_LMO_TIMESLOT_PROC";
BEGIN
NULL;
END MY_PACKAGE;
BEGIN
APPS.MY_PACKAGE.QFJS_LMO_TIMESLOT_PROC('1','2','3',4,5,sysdate,APPS.MY_PACKAGE.str_table('clob1', 'clob2', 'clob3'));
END;
/ -- Hugs, Philips -
How to pass session variable value with GO URL to override session value
Hi Gurus,
We have below requirement.Please help us at the earliest.
How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
Please provide step by step solution.No vague answers.
I followed below steps mentioned.
RPD:
****-> Created a session variable called STATUS
-> Create Session Init block called Init_Status with SQL
select 'ACTIVE' from dual;
-> Assigned the session variable STATUS to Init block Init_Status
authenticationschemas.xml:
Added
<RequestVariable source="url" type="informational"
nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
Report
Edit column "Contract Status" and added session variable as
VALUEOF(NQ_SESSION.STATUS)
URL:
http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
Issue:
When I run the URL above with parameter EXPIRED, the report still shows for ACTIVE only. The URL is not making any difference with report.
Report is picking the default value from RPD session variable init query.
could you please let me know if I am missing something.Hi,
Check those links might help you.
Integrating Oracle OBIEE Content using GO URL
How to set session variables using url variables | OBIEE Blog
OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
Thanks,
Satya -
How to use bind variables in this procedure
Hi Experts,
How to use bind variables in this procedure for static queries.
PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
IS
BEGIN
V_date DATE;
SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
DELETE FROM MER_CLEAR
WHERE MER_DT < v_date
AND ID = M_ID;
COMMIT;
END;
How to use v_date and m_id as bind variables in this procedure to avoid hard parsing.
Please help me.
Thanks.976208 wrote:
How to use v_date and m_id as bind variables in this procedure to avoid hard parsing.
You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool. -
How to pass a variable more than one values?
How to pass a variable more than one values?
You can't.
During 1 session, 1 ODI variable can have only 1 value at a time.
If you need more than 1 value, you will have to do somethink like a loop inside your package, and refresh the variable value each time. -
How to pass a variable value into a custom planning function via a web
Can some one tell me
How to pass a variable value into a custom planning function via a web template?
What are the different types of Planning function parameters available and what is the difference between them?
Thanks
babuHi Sutrtha,
Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
Am I missing something?
Regards
B -
How to increase RAM & Hard Disk a form at run time can use?
Question: How to increase RAM & Hard Disk a form at run time can use?
Explanation:
I have a problem with a form at run-time. I guess this is due to shortage of RAM/Hard Disk. I want to increase these things so that the form can use more RAM/Hard Disk and it does not crash/cancel. The reason is that when I change/toggle TOOL --> Preferences --> Runtime, Buffer Records and Array Processing parameters, the problem is rectifies intermittantly. That is there is no fix combination of above-mentioned parameters to rectify the problem. After lot of attempts, it gets resolved but only temporarily. Next time I have to modify the form, I get the same problem.
Please help.I am still waiting for an answer to the above question.
May be Oracle Corp. or anyabody, please guide.
M. Tariq -
URGENT: I want to pass a variable to a stored procedure at run time
Post Author: aruplabs
CA Forum: Data Connectivity and SQL
I work for a health care provider and I have reports that pull PHI (Protected Health Information) about patients that needs to be logged according to federal HIPAA regulations. One of the pieces of information that needs to be logged is the username of the person who ran the report. Since these reports will be run from our Crystal Enterprise server I can get this from the CurrentCEUserName variable but I am looking for a way to pass this value to a stored procedure that will not only return the records for the report, but also log the disclosure in our PHI disclosure tracking table. I know you can pass a parameter to a stored procedure but I dont know how, or if it is even possible, to pass a run time variable. This is an urgent problem that I need to find a solution for. Any help would be appreciated.
Thank you.Here it is. Right now, when i press te "Go" it runs for the specific time i've set and when its done the variable "Run" is set true. When i call this VI from another VI it waits for the loop to be finished before it will read the variable.
Regards
Viktor
Attachments:
Untitled 2.vi 26 KB -
ADF : How to pass a variable from one frame to another frame ?
Hi,
I have an html page divided into 3 frames, all inside a frameset. Each frame are linked to a specific .jsf page (src attribute). When I list a list thanks to a ADF datatable in ONE frame, each row has a "show more" button. When I click this button I succeeded to print row detail inside the same frame thanks to the processScope ADF's native variable. The problem is that I want to display the row detail in another frame, clicking from this current frame. So for this I need to reload the other frame which display the content of the processScope variable.
For this I use the javascript code :
=> parent.frames['bottomRight'].location.reload()
Just before refreshing, I put the variable in the processScope of course like it appears in the backing bean :
FacesContext context = FacesContext.getCurrentInstance();
CLPRMBuilding building = (CLPRMBuilding)
context.getApplication().getVariableResolver().resolveVariable(context, "building");
if (building == null)
return "error";
AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
afContext.getProcessScope().put("buildingDetail", building);
Next, when the user click on the button "show more" a binding CoreCommandButton component is done. And the accessor's code is executed :
public void setShowMoreCommandButton(CoreCommandButton showMoreCommandButton) {
this.showMoreCommandButton = showMoreCommandButton;
showMoreCommandButton.setOnclick("parent.frames['bottomRight'].location.reload()");
And so the other frame is reloaded ! But the "buildingDetail" variable seems not to be present in the processScope because in the jsf page displayed by the other frame no content is printed, like if the variable were not initialized. How to do then ? How to pass the buildingDetail variable to the other frame which I need to reload to refresh it's content ?elaine_g wrote:
I am wondering why does (r.a) give an error outside the method? What's the reason it only works when used inside the (b/r.a) maths function? This is illegal syntax:
class B {
int b;
A r = new A();
r.a; //syntax error
}Why? Class definition restricts what you can define within a class to a few things:
class X {
Y y = new Y(); //defining a field -- okay
public X() { //defining a constructor -- okay
void f() { //defining a method -- okay
}... and a few other things, but you can't just write "r.a" there. It also makes no sense -- that expression by itself just accesses a field and does nothing with it -- why bother?
This is also illegal syntax:
int doB() {
A r = new A();
r.a; // error: not a statement
}Again, all "r.a" does on its own is access a field and do nothing with it -- a "noop". Since it has no effect, writing this indicates confusion on the part of the coder, so it classified as a syntax error. There is no reason to write that. -
How to pass a variable from one scene to another
I'm making a call from one scene to another via a button, but I have two buttons calling the same scene, each for a different purpose, and I need to pass certain variables tied to each button to that called scene. How can I do this?
import flash.events.MouseEvent;
stop();
var nam:String="test";
testscene2.addEventListener(MouseEvent.CLICK,fn);
function fn(e:MouseEvent){
nam="Raja";
gotoAndStop(1,"Scene 3");
testscene1.addEventListener(MouseEvent.CLICK,fn1);
function fn1(e:MouseEvent){
nam="Emily";
gotoAndStop(1,"Scene 2"); -
How to pass a Variable value into an ODI Scenario from ODI Package
I have created an Interface that uses the variable #ENTITY_ID for retrieving entity data from the DWH; now I have generated a Scenario from the interface and placed the Scenario in an ODI Package; am not sure how to pass the #ENTITY_ID variable to the ODI Scenario?
Any help is greately appreciated.
Best Regards
BeeHi Sutrtha,
Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
Am I missing something?
Regards
B -
How to pass values to Oracle store procedure in Crystal Report
Hi all,
I am newbie on passing values to stored procedure parameters. I created a Crystal Report using the Crystal Report wiward with PULL method and data come from Oracle stored procedure. In an ASP.NET page, I have stored two values in Session and need to pass them as input parameters to Oracle stored procedure to print the report. In Crystal reports 2010 once you connect to a stored-procedure as data source, it automatically creates the parameter fields with Crytal Report Viewer. Please show me how I pass values to store procedure at runtime automatically.
'Set the parametter value
myReport.SetParameterValue("@P_COURSE", "CoursetNo")
myReport.SetParameterValue("@P_CLASS", "ClassNo")
End Sub
I tried to apply above codes from Brian Bischof book but display the error from the following lines:
myReport.SetParameterValue("@P_COURSE", "CoursetNo")
myReport.SetParameterValue("@P_CLASS", "ClassNo")
I also enclosed my code. Any experts, please let me know anything wrongs on my code . I tried several methods that searching via google, but did not solve my issues. Thanks.
Edited by: avt2K7 on Mar 15, 2011 7:02 AMHi,
Thank you for your response. Here are the detailed code and error as following:
Please show what I am missing in my below VB.NET codes:
===========================================================================================
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
LogonToTables("username", "password", "servername", "")
End Sub
Private Sub LogonToTables(ByVal myUserId As String, ByVal myPassword As String, ByVal myServerName As String, ByVal myDataBaseName As String)
Dim Course, Class As String
Course = Session.Item("CourseNumber"))
Class = Session.Item("ClassNumber"))
Dim myReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
myReport.Load(Server.MapPath("CrystalReport1.rpt"))
Dim myTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
'Set the database properties and security credentials
Dim myConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
myConnectionInfo.ServerName = "servername"
myConnectionInfo.DatabaseName = ""
myConnectionInfo.UserID = "username"
myConnectionInfo.Password = "password"
'Apply the ConnectionInfo to the report tables
Dim myTables = myReport.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
myTableLogonInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
'Set the parametter value to Crystal Report parameter named P_COURSE and P_CLASS
myReport.SetParameterValue("@P_COURSE", "Course")
myReport.SetParameterValue("@P_CLASS", "Class")
End Sub
=================================================================================
I put a break point to debug but display the error at the following lines:
myReport.SetParameterValue("@P_COURSE", "Course")
myReport.SetParameterValue("@P_CLASS", "Class")
Eventhough, if I set a specific value to Course=1000 and Class = math and still receive the error:
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
I tried several sources from Google search but it is not working. I really appreciate any detailed code either in C# or VB.NET to solve my issues. Thanks in advance. -
How to pass a variable for a SQL query in OLEDB source?
Hi All,
I am new to SSIS and working on it past few days. Can anyone please help me getting through a scenario where I need to pass a variable in the SQL statement in OLEDB source connection. Please find below for the details.
eg:
1) I have a SQL table with the columns SerialNumber, Name, IsValid, FileName with multiple rows.
2) I have the file Name in a variable called Variable1.
3) I want to read the data from my SQL table filtering based on the FileName (Variable1) within a data flow task and pull that data to the destination table.
Question: In the data flow task, added source and destination DB connection with a script component in between to perform my validations. When trying to retrieve the data from source using the variable (i.e. SQL Query with variable), I am not able to add
the query as the SQL statement box is disabled. How to filter the data based on the variable in the source DB ?
Any help/suggestions would be of great help.
Thanks,
SriJust to add with Vaibhav comment .
SQL Command : SQL query either with SQL variable or any condition or simple Sql statement
Like ;
Select * from dimcustomer
SQL Command using Varible :
Sometimes we design our dynamic query in variable and directly use that variable name in oledb source.
If you Sql query needs a condition based on SSIS variable .
you can find a Example here :
http://www.toadworld.com/platforms/sql-server/b/weblog/archive/2013/01/17/ssis-replace-dynamic-sql-with-variables.aspx
http://www.select-sql.com/mssql/how-to-use-a-variable-inside-sql-in-ssis-data-flow-tasks.html
Thanks
Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com -
How to pass a variable into a cfc?
prior to calling the cfinvoke, I have coding that determins a
variable "X"
I need to pass X into a cfc so it can complete the query held
there.
So I tried
<cfinvoke component="A"
method="AList"
returnvariable="AResults">
<cfinvokeargument name="x" value="#X#"
/></cfinvoke>
correct so far?
Now over on the cfc page is where I'm getting stuck
Inside my cffunction I'm adding <cfargument name="X" />
But how do I get the value in?I don't quite understand your question. Can you rephrase?
But before all that, bear in mind that one doesn't pass a
variables into a
*CFC*, one passes it into a function within the CFC. And as
with all
functions, one passes values into the function by passing it
as an
argument. But - of course - the function has to be coded to
expect the
argument.
Your own sample code demonstrates this in action:
<cfinvokeargument name="abbrCode"
value="#companyAbbrCode#" />
(NB: lose the trailing slash: this is CFML, not XML).
So you know how to do that.
Hence me not quite understanding what you're actually asking.
Adam -
How to pass a variable from HTML to Flash
I have built my flash ad banner in Flash 9 and now want the
HTML code to pass the url over to the flash movie that it should
jump to when clicked.
The info in the help file seems out of date for the latest
HTML template as it uses mainly JavaScript to get round IE's
dreadful embeding issue. So my problem is, how do I pass a variable
from the HTML to the actionScript specified int he Help file
(running on a full screen button) as shown below?
myButton_btn.onRelease = function() {
if (clickTAG.substr(0, 5) == "http:") {
getURL(clickTAG);
via the html code now used by Flash 9 which is like this:
<!-- saved from url=(0013)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Advert_long</title>
<script language="javascript"> AC_FL_RunContent = 0;
</script>
<script language="javascript"> DetectFlashVer = 0;
</script>
<script src="AC_RunActiveContent.js"
language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 115;
// -->
</script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!--
Coping
with
Growing
Audio
Series
Theraputic stories
for children aged
4 to 9
-->
<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
var hasRightVersion = DetectFlashVer(requiredMajorVersion,
requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable
version
// embed the flash movie
AC_FL_RunContent(
'codebase', '
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0',
'width', '120',
'height', '600',
'src', 'Advert_long',
'quality', 'high',
'pluginspage', '
http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'Advert_long',
'bgcolor', '#ffffff',
'name', 'Advert_long',
'menu', 'true',
'allowScriptAccess','sameDomain',
'allowFullScreen','false',
'movie', 'Advert_long',
'salign', ''
); //end AC code
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be
placed here.'
+ 'This content requires the Adobe Flash Player.'
+ '<a href=http://www.macromedia.com/go/getflash/>Get
Flash</a>';
document.write(alternateContent); // insert non-flash content
// -->
</script>
<noscript>
// Provide alternate content for browsers that do not support
scripting
// or for those that have scripting disabled.
Alternate HTML content should be placed here. This content
requires the Adobe Flash Player.
<a href="
http://www.macromedia.com/go/getflash/">Get
Flash</a>
</noscript>
</body>
</html>You should use SWFObject to embed your Flash. Not only does
it make
embedding more straightforward, it makes passing query
parameters very easy.
Check out:
http://code.google.com/p/swfobject/
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
Maybe you are looking for
-
Smart cover interfearing with notification
I Have had my iPad 2 for some time now and I have a smart cover I am running iOS 5.0.1, Now I have my Notifications setup and when I have the smart cover closed and sitting on my desk, coffee table, etc. There is no alert of notifications but the mom
-
Photo/Images will not save in address book. Please help
I am on a macbook 13 aluminum running 10.5.8 and when I try to add an image to a contact in my address book it does not work. I can select one or drag one onto the image icon and it will show the crop image box, but when I click SET, it does not work
-
ORA-04091: table AM is mutating, trigger/function may not see it
I create this trigger: CREATE OR REPLACE TRIGGER pr_test after insert ON AM FOR EACH ROW declare appo_pr varchar2(64):= null; BEGIN select name into appo_pr from AS where AS_ID=:new.AS_ID; insert into AM (name) values (appo_pr); END pr_test; I insert
-
Hi All, Scenario: XI -> R/3 (ABAP proxy) First question: While doing SLDCHECK in R/3 , I am getting the following error: Calling function LCR_GET_OWN_BUSINESS_SYSTEM Retrieving data from the SLD server... No corresponding business system found => Che
-
I am having trouble buying book on Aperture 3
It asks me to create a new account even though I have a valid apple account. Then I re-create account and it gets stuck on the shipping page. Asks me to "try later". I am in Europe but using a US apple account and shipping to US. Really need to pri