Can i reference an environmant variable from a package?
Hi,
My problem is this,
I am using a file from a package to dump some of my data. The
path or the file name need not be fixed. I would like to pick it
up from the environment. Is this possible ?
In short is there a function in Oracle similar to getenv() in
Unix?
Thanks in advance.
null
vishakha (guest) wrote:
: Hi,
: My problem is this,
: I am using a file from a package to dump some of my data. The
: path or the file name need not be fixed. I would like to pick
it
: up from the environment. Is this possible ?
: In short is there a function in Oracle similar to getenv() in
: Unix?
: Thanks in advance.
Did you try "OWA_UTIL.GET_CGI_ENV('VARNNAME')"
This is not for Ora-Lite. It is a PLSQL package belonging
OAS's and WebDB.
Txr
null
Similar Messages
-
How can you create a local variable from a boolean control?
I want to create a local variable from a boolean control, but it says that boolean latch actions are incompatible with local variables, but I need a way to check this boolean control in two differents loops, how can I do it?
"Graci" schrieb im Newsbeitrag
news:[email protected]..
> I want to create a local variable from a boolean control, but it says
> that boolean latch actions are incompatible with local variables, but
> I need a way to check this boolean control in two differents loops,
> how can I do it?
Use global variables.
Compare them with a constant Boolean like F or T.
The result is true or false and then you can use it in a Cae-Loop.
Martin -
Can't subtotal on measure variables from Query 2 in merge dimension report
I use a query identifying customers (Query1.HH_ID) sold by each salesperson. A second query identifies a subset of those customers who are longtime customers. I merge these queries using the dimension, HH_ID. I project Query1.HH_ID onto the report and create a variable via =If([Query2].[HH_count]=1;1;0) to get a measure which is either 1 or 0 depending on whether a record is retrieved from Query2 with a value for Query2.HH_ID that matches Query1.HH_ID. The report is fine at the detail level, but when I insert a break and try to subtotal the measures, the variable from Query 2 produces a subtotal of 0 even though I can see a mixture of detail records with 1s and 0s. It appears that one cannot subtotal on measures from Query2 in a merged dimension report, or at least not if the merged dimension is not projected onto the report but rather only the dimension from Query1. Is this a known principle?
Hi Michael,
I think the issue is that they Query2.HH_Count is being summed first. So if you have a mixture of values, say
rownumber, value
1,1
2,0
3,1,
4,0
you will get 0 as your HH_count will equal 2.
Try
=If(Query2.HH_count>=1;1;0)
Alternatively try
=If(Average(Query2.HH_count)=1;1;0)
Hope this helps
Alan -
How can you get the public variables from object that extends JLabel?
I'm using the mouseClickedListener method e.getComponent(); to get the component that is clicked on the sceen. The component i clicked is type "object" and extends a jlabel, and i really need to acces a variable from it. Heres the code i'm using-
MouseListener listenerDown=new java.awt.event.MouseListener() {
public void mousePressed(MouseEvent e){
paintAll();
mX=e.getX();
mY=e.getY();
public void mouseClicked(MouseEvent e) {
Component c = e.getComponent();
drawResizeBox(c);
selected=c;
public void mouseReleased(MouseEvent e) {
public void mouseEntered(MouseEvent e) {
public void mouseExited(MouseEvent e) {
package javapoint;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.geom.Line2D;
import java.awt.image.BufferedImage;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
public class object extends JLabel{
public object(Rectangle rect,int id){
idNum=id;
Rect=rect;
BufferedImage image = new BufferedImage((int)rect.getWidth()+1, (int)rect.getHeight()+1, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D) image.getGraphics();
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.drawRect((int)rect.getX(), (int)rect.getY(), (int)rect.getWidth(), (int)rect.getHeight());
Icon icon = new ImageIcon((Image)image);
setIcon(icon);
setBounds((int)rect.getX()-1, (int)rect.getY()-1, (int)rect.getWidth()+1, (int)rect.getHeight()+1);
mainFrame.slideArr[mainFrame.sIndx].add(this);
setVisible(true);
r=true;
object(Oval oval,int id){
idNum=id;
setBounds(oval.getX(), oval.getY(), oval.getWidth(), oval.getHeight());
getGraphics().drawOval(oval.getX(), oval.getY(), oval.getWidth(), oval.getHeight());
o=true;
setVisible(true);
object(Line2D line,int id){
idNum=id;
setBounds((int)line.getX1(), (int)line.getY1(), (int)line.getX2(), (int)line.getY2()); //Not gunna work
getGraphics().drawLine((int)line.getX1(), (int)line.getY1(), (int)line.getX2(), (int)line.getY2());
l=true;
setVisible(true);
object(Icon icon,int id){
idNum=id;
setIcon(icon);
setBounds(50,50,icon.getIconWidth(),icon.getIconHeight());
i=true;
setVisible(true);
void drawObject(object obj){
if(r){
Rectangle rect=obj.Rect;
setBounds((int)rect.getX()-1, (int)rect.getY()-1, (int)rect.getWidth()+1, (int)rect.getHeight()+1);
Rect=rect;
BufferedImage image = new BufferedImage((int)rect.getWidth()+1, (int)rect.getHeight()+1, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D) image.getGraphics();
g.setColor(Color.red);
g.drawRect(0, 0, (int)rect.getWidth(), (int)rect.getHeight());
Icon icon = new ImageIcon((Image)image);
setIcon(icon);
}else if(l){
}else if(o){
}else if(i){
public boolean r=false;
public Rectangle Rect;
public boolean o=false;
public Oval Oval;
public boolean l=false;
public Line2D Line;
public boolean i=false;
public Icon Icon;
public JLabel label;
public int idNum;
}Edited by: ghostbust555 on Feb 12, 2010 2:14 PMghostbust555 wrote:
Well see the problem is i have an array of 200 objects.What does that have to do with anything? And if it does, why isn't it in the code you posted?
I dont understand what you mean in your "Edit..." part. could you show some code/ explain farther? sorry if its a dumb question I'm still a bit of a novice at java.Yeah.
object yuck = (object) e.getComponent(); // That's a cast.
boolean yucksR = yuck.r; // Get the "r" variable from the object. -
Can I set a Session Variable from a Dashboard Prompt, using values that are
Hi All
Trying to set a Session Variable to an integer value, by letting users select a text value from the drop-down list on a Dashboard Prompt. The goal is to set the input parameter to the IndexCol function, but to provide the end users with a text description of what they are setting.
Select Value Set Variable Value
My 0
My Team 1
My Companies 2
My Teams Companies 3
Any suggestions on how to accomplish this? Certainly we could populate the drop-down from a data source, however I don't see how to populate a variable with something other than the values on the screen.
The IndexCol function is referenced in a Filter in Answers, and I'm thinking to populate a Session variable using the (Presentation) variable value set from the prompt. But how to do this? I see a reference to a function NQSSetSessionValue(), but cannot find documentation on how it works.
Any clue will be greatly appreciated.
ThanksHi kishore..
Looks like the link u have sent uses advanced SQL tab to set session variables. I want to know if I can use "set variable NQ_SESSION.myvar= @something" in the "SQL results" -while creating a dashboard prompt-.
Purpose: I want the session variable to be set based on whatever report that im currently in.
And i dont want to use presentation variables because im using a reset button in my page.
My reset script resets presentation variables and NOT session variables.
Thanks in advance
Loy -
Can I reference page-flow bean from a bounded-task-flow page-fragment?
I have a view activity implemented as page fragment in my bounded task flow.
I declare a page-flow scope managed-bean in adfc-config.xml to do some initialization for the bounded-task-flow:
<managed-bean id="__23">
<managed-bean-name id="__22">TaskFlowBean</managed-bean-name>
<managed-bean-class id="__21">view.backing.TaskFlowBackingBean</managed-bean-class>
<managed-bean-scope id="__20">pageFlow</managed-bean-scope>
</managed-bean>
In my bounded task flow, the default activity is a method-call activity which call the page-flow bean method
<method-call id="initFlow">
<method>#{pageFlowScope.TaskFlowBean.initFlow}</method>
<outcome id="__27">
<fixed-outcome>showPanel</fixed-outcome>
</outcome>
</method-call>
But JDeveloper (11.1.1.2) show a warning "Refereneed pageFlowScope not found" at the "Diagram" view of the flow definition.
The fixed outcome of the default activity is to render a page-fragment which also reference the page-flow scope bean method getPanelTitle():
<af:panelBox text="#{pageFlowScope.TaskFlowBean.panelTitle}" id="pb1">
<f:facet name="toolbar"/>
</af:panelBox>
At runtime, the page fragment was rendered properly except the panel box title is missing. No other error is reported
When I debugged the application, the bean methods initFlow() and getPanelTitle() didn't get call as the program didn't stop at the breakpoint set in the bean methods.
The page fragment was rendered properly except the panel box title is missing.
When I change the scope to backing bean, both initFlow() and getPanelTitle() get called but under a different backing bean.
As the bean attributes set by initFlow() were not no longer set when getPanelTitle() was invoked even though the methods were invoked in the correct order.
Why can't I use a page-flow scope bean within the bounded task flow?
On further debugging, I noticed the bean was not created when it is set to be page-flow scope. I put a debug message in the constructor... never get called.
When should a page-flow scope bean be created to be accessible on entry to a bounded task flow?
Edited by: Pricilla on Apr 29, 2010 3:16 PMPlease check the scope of the pageFlow from the manual.
pageFlowScope is only available for the pages/views in that taskflow and not in the included taskflows. -
Can not create a environment variable from a script
Hi I need to develop a script that allows me to create and set two environment variables in my system but I can�t get it ....
This is what I got till now ...
#!/sbin/sh
SEISDB_HOME=/usr/local/
export SEISDB_HOME
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
If I run this commands directly in the shell it works Ok ... but calling the sentence from a script nothing happens ....
Thanks ....
Edited by: Jes_79 on Sep 18, 2007 1:58 PMdo this
create a script file
vi /tmp/temp
in /tmp/temp add
GLOBAL_VARIABLE="Hello World"; export GLOBAL_VARIABLE
save and quit vi
fix the permissions and run /tmp/temp from a shell prompt
then
echo $GLOBAL_VARIABLE
should show as empty
from a shell window type
. /tmp/temp
period space /tmp/temp
echo $GLOBAL_VARIABLE
for you script, do the same.
do not type the script name, but source it (add a period and space)
alan -
How can I change my Shared Variable from "I/O Variable" to "Network Published"
Hello,
I have an application that is using a series of NI wireless sensor nodes. I am trying to programmatically access shared variables. Right now the only method I have found to access the data from the shared variables is datasocket read. I am on labview 8.6.1 so I don't have as many shared variable options as newer versions of labview. I do think there is a way to access properties for the shared variables, but I'm not sure about how to change the nodes channel properties to "Network-Published". Do i need to remove the node from the project and bring it back in with the new settings? When i have done this in the past i have run into naming conflicts. I would appreciate any ligtht that can be shed on this issue that will help me create a vi that operates quicker.Any Shared Variable that has “I/O Variable” for its Variable Type (see screenshot of the Shared Variable Properties below) refers to any channel of data (such as Analog Input or Output or Digital Input or Output) directly from a module channel. In other words, this is how you directly get the raw reading straight from (or to!) a specific module channel.
You cannot edit the Variable Type to Network Published. You can check “Enable Network Publishing” as above, which allows this Variable to be accessed from a VI on a Host VI. You could also create a separate Network-Published Shared Variable which you can wire directly to the I/O Variable on the Target VI if you wish.
Best,
Ryan C.
Applications Engineer
National Instruments -
Is there a way to reference a private variable from one class in another?
My first class starts off by declaring variables like so:
class tStudent {
// declare student name, id, grades 1 & 2, and gpa
private String fname, lname, g1, g2;
private int id;
private double gpa;
// define a constructor for a new student
tStudent () {fname=lname=g1=g2=null; id=-1; gpa=0.0;}
// define methods for manipulating the data members.
// readStudent: reads information for just one student
public void read (Scanner input) {
fname = input.next();
lname = input.next();
id = input.nextInt();
g1 = input.next();
g2 = input.next();
}And the second class:// tStudentList: for a list of students
class tStudentList {
private int nStudents;
private tStudent[] list;
// constructor for creating student list
tStudentList() {
list = new tStudent[36];
for (int i=0; i < 36; i++) list=new tStudent();
// read the individual students into the student list
public void read(Scanner scan) {
nStudents=0;
while (scan.hasNext()) {list[nStudents++].read(scan);}
// display the list of all students - fname, lname, id, g1, g2 and gpa
// with an appropriate header so the output matches my sample //output
public void print() {
Is there a way to reference the variables in the first class to use in the second? Specifically in the last section of code where I am going to print the list.Not without resorting to reflection hackery. If the fields are private (and are supposed to be), then that means "don't allow access to these to outsiders of this class" by design.
So if you really meant them to be accessible, then don't use private, or provide public accessors for them. -
[AS3] reference to stage variable from MC
Hi!
At the begining I'm sory for my English ;)
I've been coding in AS2 for a while, but now I decided to try
AS3. The situation is like:
- I've got one Movie Clip on a stage
- I have a code in the 1st frame of the Main Timeline:
var somevar:String = "somevalue"
- I have a code in the 1st frame of the Movie Clip's
timeline:
trace(root.somevar) // error
trace(parent.somevar) // error
How to trace that variable?? The same is with stopping the
Main Timeline's playback.
parent.stop() and root.stop() don't work :(
HEEELLLP MEEE! ;)(use the attach code option to display code in this forum):
-
How we can pass the list of variable from ref cursor ??
pls explain with example
Simple example:
SQL> create table t as select level col from dual connect by level <= 10;
Table created.
SQL> create or replace procedure myproc
2 ( p_num_list in sys.odcinumberlist
3 , p_ref out sys_refcursor
4 )
5 as
6 begin
7 open p_ref for select col
8 from t
9 where col in (select * from table(p_num_list));
10 end;
11 /
Procedure created.
SQL> var rc refcursor
SQL> set autoprint on
SQL> exec myproc(sys.odcinumberlist(1,2,3), :rc);
PL/SQL procedure successfully completed.
COL
1
2
3
3 rows selected.
SQL> exec myproc(sys.odcinumberlist(1), :rc);
PL/SQL procedure successfully completed.
COL
1
1 row selected.
Search http://asktom.oracle.com for more examples...
Also, see:
The Tom Kyte Blog: Varying in lists... -
Excel Connection Manager suddenly can no longer connect to Excel from SSIS package
<p>During the last 3 months, I used 32 bit SSIS 2008 (v 10.50.2500.0) on an WinXp machine (v 5.1.2600 SP3 Build 2600) to create a package that writes multiple query results (reports) to an excel spreadsheet. Each report is written to a different
tabbed sheet in the same spreadsheet. </p><p>The package was working just fine until May 9 2013, when suddenly every single Data Flow task with an Excel Destination displayed error icons and raised the following
error message when opening the Advanced Editor:</p><p>SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005 Description: "Unspecified error". <br />Error at <DataFlow task name>: SSIS
error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager <Excel connection Manager> failed with error code 0xC0202009. There may be error messages posted before this with more
information on why the Acquire Connection method call failed. Exception from HRESULT: 0Xc020801c (Microsoft.SQlServer.DTSPipelineWrap)</p><p>Originally the error message reported that the Error Code was "0x8000FFFF", but I can't seem
to reproduce that error code since. Now I am only getting the above error message.</p><p>From the time I created the original package (when it worked fine) until now, I have been using the same computer, writing to a (32 bit) 2010 Excel file in
a local folder. The filename and location have not changed. The ConnectionString has not changed. The Connnection String I am using is Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Conversion\Conversion Results_dt01.xlsx;Extended Properties="EXCEL
12.0 XML;HDR=YES;". </p><p>Now an attempt to create and test a NEW Connection Manager yields me this error. "Test connection failed because of an error in initializing provider. Unspecified error.", whereas before I had
no problems creating a new connection manager.</p><p>I checked a second SSIS package, which I also built during the past 3 months, which loads multiple sheets from multiple Excel files to a SQL Server 2008 database holding table. It uses the same
ACE OLE DB 12.0 connection to load the Excel speadsheets and this package continues to work fine on the same workstation.</p><p>In desparation, wondering if the Microsoft ACE OLE DB 12.0 driver had become corrupt (even though the second package
was raising no errors), I did download and install the Microsoft ACE OLE DB 12.0 driver. That did not solve my problems with the first package.</p><p>I need to get this package running again ASAP as it is targeted for UAT testing in a
matter of days. Any help with this issue would be greatly appreciated!</p>I submitted this issue above and now I am having the same problem again. I am using the same local computer, the same operating system (WinXp v 5.1.2600 SP3 Build 2600) as originally described. I am working with the same SSIS package that
writes multiple query results (reports) to an excel spreadsheet. This package has been successfully executed multiple times, but now I am suddenly getting the same error as follows:
Error at 1ConversionContacts [Connection manager "Excel Connection Manager"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80004005 Description: "Unspecified error".
Error at DFlow Write soft deleted duplicate claims to Excel sheet [Excel Destination - write duplicate claim nbrs that have been removed to Excel [61]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method
call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
The package will not run because of these multiple errors (multiple because it occurs on every single excel destination in the package).
I have Run64BitRuntime set to false on the project. I have triple checked that the excel file name (which I created and can access) exists with the correct name in the correct path, which is local on my machine. The file is the same file in the same
location as when the package worked. I am running the SSIS service under my own network login, as I was when the package worked. I have been consistently getting this same error whenever I change my network password without updating the password
in the SSIS service, but I have triple verified that the service is using my latest password. If I try to open and edit the Excel Destination in any DataFlow task I get the same error. I can successfully create a new Excel Connection Manager pointing
to the same excel file. However if I try to assign the newly created Excel Connection Manager in the data flow, I cannot activate the drop down to choose the Excel sheet without getting an 'Unspecified error' message. I then swapped out
the file with its template version, and ensured the name was updated as correct. I still get the same errors.
Oh, and the SSIS package is extracting data from a SQL Server 2008 database with an ADO.net Connection Manager using Windows authentication. I have no problems with the SQL Server connection, it has always worked and still does. It is only
the connection to excel output file which is locally stored on my machine.
Has anyone got any suggestions for me? -
ForEach Loop Container Mapping Variable From SSIS Package Not Working In SQL-Server StoredProcedure
I have an SSIS package that uses a ForEach Loop Container to enumerate Excel Files in a dir. I also have a Task Flow that inserts data from those Excel files into SQL-Server.
Im trying to insert the file names into a column into the same table in SQL-Server by using a mapping variable in my StoredProcedure.
Im having trouble with my MappingVariable at the end of the script with red squigglies. The following is my StoredProcedure script.
CREATE PROCEDURE [dbo].[Insert_F_STG_v2]
-- Add the parameters for the stored procedure here
@Hrs float,
@Type nvarchar(100),
@SN nvarchar(100),
@Op nvarchar(100),
@[USER::CurrentFileName]
AS
BEGIN
SET NOCOUNT ON;
INSERT INTO [CRM_RC].[dbo].[F_StgTbl]
[Hrs],
[Type],
[SN],
[Op],
[Report_Date]
VALUES
@Hrs ,
@Type,
@SN,
@Op,
@[USER::CurrentFileName]
END
The last @[USER::CurrentFileName] in the Values block at the bottom of the script is the one giving me issues.
The following is the error:
Msg 102, Level 15, State 1, Procedure Insert_F_STG_v2, Line 95
Incorrect syntax near 'USER::CurrentFileName'.This seems to be the solution, but get the following exception:
[Derived Column [2]] Error: The "Derived Column" failed because truncation occurred, and the truncation row disposition on "Derived Column.Outputs[Derived Column Output].Columns[Derived Column 1]" specifies failure on truncation. A truncation error occurred
on the specified object of the specified component.
AND: [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Derived Column" (2) failed with error code 0xC020902A while processing input "Derived Column Input" (3). The identified component returned
an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. -
Why I can't call my native method from my package?
it is fine if my java code didn't complied into a package.
But if I complied my java code as a package, and call its native method outside. It give me "UnsatisfiedLinkError". And can not find my method. It is indeed the method is inside.
Thank a lot any helps. Email me on [email protected]I have found that javah does not generate the correct JNI function names when the native function is in a class that is within a Java package. The net result is an Unsatisfied link error.
The JNI function name must be included in the package name. The naming is a bit complicated and that's why javah should be used, except in this case it does not work. I can't quite remember exactly how it works, something like adding in packagename_1 into the JNI name. The SWIG tool (http://www.swig.org) does generate the correct names when using packages. It is a tool which takes C or C++ header files and generates the JNI and Java classes for you so that you can call C/C++ code from Java. Once you have installed SWIG and run 'make check', have a look in the directory Examples/test-suite/java for the JNI naming for packages. I'll try remember to post the exact naming if you don't want to install SWIG. -
Variable from Java Beanshell procedure for usage in interface
A variable from my package contains value: ' text',' text2',' text3',....etc.
I need to use this variable in my interface as: 'text','text2','text3',...etc.
So I wrote a Java beanshell procedure with following code and with this input variable as an option: forecastOrgCode
String forOrgCode = "<%=odiRef.getOption("forecastOrgCode")%>";
String orgCodeTrimmed = forOrgCode.replaceAll (" ","");
Any other code between <@ or <? or <% gets me messed up because of the ' characters present in the variable, so I just chose the beanshell technology and this does the trick...
However...how can I reach this orgCodeTrimmed variable from my interface?As you are directly passing the value in Option , why not lets do it directly inside interface
Using ODI Variable
Step 1. Set Variable = ' text',' text2',' text3','text4 '
Step 2. Inside Interface
'<@ out.print("#VAR".replace(" ", "").replace("'", "''"));@>'You will need to convert '(single quotes) to double single quotes else oracle will throw error ,similar to what we do in pl/sql
Directly
'<@ out.print("' text',' text2',' text3'".replace(" ", "").replace("'", "''"));@>'
Maybe you are looking for
-
Search and replace string problems
Hi to all, I have problem with Search and replace string function. It shows me a wrong Value (Number) from 15 to 100 is everything OK (15=0, 30=1, 45=2, 100=3), but after 100 ........ Take look in VI and if you have any ideas post them please THX Igo
-
How do I get my applications back into iTune library
Just upgraded PC to Windows 7. Got my music libray 75% back, but not i have an issue with iPhone. Over 100 applications on phone, but can't get them to show on PC iTunes. How do I get library updated or do i have to download them all again. Also why
-
1:N mapping Scenario, BPM errors
Hi, I am following this scenario 1: N multi mapping Various multi-mappings and Optimizing their Implementation in Integration Processes (BPM) in XI. I need your help to fix my errors for Container1, container 2, and Send step in BPM In BPM, 1. I hav
-
Camera RAW works on Mac but not PC
I updated Elements 12 from the Help menu and the Mac version opens my Nikon D610 NEF RAW files just fine. The PC version, after updating, doesn't recognise the RAW format. Why? I am running Windows Vista on my Laptop PC. Any help appreciated. Andy!!!
-
Component Extension for EHSM 3.0: Webdynpro Error
Hi, I have installed Component Extension for EHSM 3.0 and its business package in EP 7.3. Some of the links of the application are giving webdynpro error. Can anyone please help me in fixing this error? Regards, Kapil