Call a script with several parameters
OK, it seems that it would be an easy question, but I have googled this to death and I can't find anything. How to pass variables to a script? I have a script with three variables, and only the first is necessary. I'm eager to make the BACK and SQLPlus command line. The only difference is that I would need to call information more SQLPlus connection when I call back.I tried using single quotes, double quotes, I tried to delimit it with a space, the command and the semicolon, but nothing works.
sqlplus user/pwd@db @"F:\Script.sql" variable1 "" variable3
When I run the present, it always pushes me to the three variables. Once again, the only variable 1 is required. The variables 2 and 3 will be more often then not be blank. Any help would be appreciated.I'm on 10.2.0.4 if it's important.
Published by: nik_m on April 29, 2010 09:18
HA. Assume that cr * p is a bad word.
Hello
nik_m wrote:
Most of the East baseDECLARE v_screen VARCHAR2 (40); v_app_layer_custom VARCHAR2 (4) := ''; v_table VARCHAR2 (40); BEGIN v_screen := UPPER ('&screen'); v_app_layer_custom := UPPER ('&layer_override'); v_table := UPPER ('&table'); end; /
Apparently, you're never set variables such as & screen before you try to use them. Don't do this; set them all first.
When you call a SQL * more script like this:
@"F:\Script.sql" variable1 "" variable3
who defines and assigns values to variables substitution & 1, & 2 automatically and & 3
& 1 is 'variable1' in the example above,
& 2 is an empty string, and
& 3 is "variable3.
You pouvez use these variables in your script, like this:
...
v_screen := UPPER ('&1');
v_app_layer_custom := UPPER ('&2');
v_table := UPPER ('&3');
but it is better to use meaningful names, like you do. To do this, copy the values & 1, & 2 and 3 & to & screen & layer_override and & table at the beginning of the script:
DEFINE screen = "&1"
DEFINE layer_override = "&2"
DEFINE table = "&3"
DECLARE
v_screen VARCHAR2 (40);
v_app_layer_custom VARCHAR2 (4) := '';
v_table VARCHAR2 (40);
BEGIN
v_screen := UPPER ('&screen');
v_app_layer_custom := UPPER ('&layer_override');
v_table := UPPER ('&table');
end;
/
Tags: Database
Similar Questions
-
How to run the powershell script of command with several parameters
Is there a way to run a powershell script from the dialog box run with several parameters? In addition, the path to the script contains spaces, for example, c:\powershell scripts\script.ps1.
Take a look at http://www.powershell.nu/2009/12/16/running-scripts-with-arguments-in-powershell/ which explains how to pass arguments to a script.
André
-
Functions defined by the user with several parameters
I set features three following user using "Define."
UF1 takes a single patameter;
UF2 takes two parameters;
and UFX takes two parameters - with the second is 'X' in the definition.
Œuvres F1. F2 is the EVAL of F1 version and it works too. User functions only seem to work fine.
F3, a function of two user settings, produces a graph of NaN.
F4 is the EVAL of F3 version. Note that 'B 'is not replaced by 1'. Also produces a NaN chart.
F5 produces a graph of NaN.
F6 is EVAL of F5. The 'X' is not replaced (even with the ' B' above), and even if it looks like 'X * X', it also produces a graph of NaN.
Is it possible to get defined by the user, with several parameters, features work by tracing the curve?
Hi!, Fortin:
If you download and install the ultimate Firmware with the version of the software: 2015 6 17 (8151), with the number of Version: 1.1.2 - 11, you can trace your examples of definition of the function, with curves and values, without NaN.
-
ThinApping an Application with several parameters
Still new to ThinApp please bare with me.
I have captured a request and I now have an App.exe and an App.dat. Then, I opened this request, altered some settings and captured these changes & named settings1.dat. I have also settings2.dat, settings3.dat and so on.
App.exe is about 50 KB
App.dat is about 80 MB
Settings1.dat, Settings2.dat and so on is 2 MB.How can I go on these chaining so Settings1.dat/Settings2.dat/etc calls and run App.exe and App.dat?
I don't want to wind up with more than 80 MB file, which is the only way I could make it work.
These settings are changed are all stored in HKCU, so this is a simple registry change.
If you want to get started ThinApped application with different parameters, you need not separate .dat files. What you can do, is something like the following:
- Install your application, change its settings and capture it with ThinApp.
- You change the application settings, and export the appropriate registry key.
- Repeat step 2 all the time.
- Go to your project directory and create a subfolder in the folder where your application executable.
- Copy the .reg files exported in the subfolder created in step 4.
- Create a script or a batch file for each .reg file, and then save it to the folder created in step 4. The script file or batch must have the necessary code to merge the .reg in the registry file. Also, you must run the main script executable file or batch file.
- Add the necessary lines in the package.ini file to create an entry point for each script or batch file.
- Build your application.
Another approach, you can create a menu with an InputBox statement. In this way, you can choose load settings before running your application.
- Follow the steps 1 to 5 of the previous approach.
- Write a script to create a menu and merge the corresponding .reg file into the registry according to the user's selection.
- BUiD your application.
-
Appeal with several parameters of the URL
Hello!
I'm unable to call a procedure by URL with several parameter, a parameter is passed to the following example, the syntax would be like spending several parameters?
# OWNER #. PK_UTIL. PKB_TXT? En_param1 = xxx
How to include the second parameter? I tried several and could not happen.
Thank you
Márcio GoncalezThis isn't really a question of APEX but more close mod_plsql or the apex listener I think?
Have you tried?
# OWNER #. PK_UTIL. PKB_TXT? En_param1 = xxx & En_param2 = yyy
James
-
see link with several parameters
Hi all:
I use af:golink to call a new page with different parameters like the code below:
but when I use it cann't page display "website cannot display the page.<af:goLink text="Run Report" styleClass="xes" destination="/printreportservlet?reporttype=pdf&filename=new_report.jasper" targetFrame="_blank"/>
but when I use a single parameter as:
or<af:goLink text="Run Report" styleClass="xes" destination="/printreportservlet?reporttype=pdf" targetFrame="_blank"/>
It works successfully,<af:goLink text="Run Report" styleClass="xes" destination="/printreportservlet?filename=new_report.jasper" targetFrame="_blank"/>
so is there any problem to send several parameters while asking us to servlet.
Best regardsWhat happens if you put this URL in the address bar directly, it works? If it isn't, then it seems that the problem is with your servlet. If this does not work, try to escape the ampersand in the URL. I can't paste the value here, as the forum he transformed into an ampersand, but you can read [url http://articles.techrepublic.com.com/5100-10878_11-5032714.html] this
JOhn
-
I tried to call a script in a loop of a procedure of Jython, using startcmd.bat and sub-process; the command succeeds when I omit the "-AGENT_CODE = MySA_Agent1 ' parameter (highlighted and emboldened)
But omitting the '-AGENT_CODE = MySA_Agent1 "the scenario starts with the default value (no Agent) and subsequently fails to find the w: drive. Wen, I understand the '-AGENT_CODE = MySA_Agent1 ' the command fails with return code 2.
Also, it seems that the OdiWaitForChildSession will not work with this approach, because the sessions so are not recognized as child sessions at all.
Another simpler process is to have a step for each folder that I want to ask and just use OdiTools and StartScen; but it's a huge process because it could have potentially many interrogation records.
Please Guide:
from __future__ import with_statement
from com.ziclix.python.sql import zxJDBC
import of subprocesses
#GetSources.py
def getdata (c, stmt):
Try:
c.Execute (stmt)
except zxJDBC.Error, e:
raise Exception (e, stmt)
Another thing:
return c.fetchall)
driver, url, user, passwd = ("< % = odiRef.getInfo ("SRC_JAVA_DRIVER") % > ',")
'< % = odiRef.getInfo ("SRC_JAVA_URL") % >',
'< % = odiRef.getInfo ("SRC_USER_NAME") % >',
'< % = odiRef.getInfo ("SRC_PASS") % >'
)
Try:
subprocess.check_call ([' cmd',
'/c',
"dir" command
« t: »
])
except subprocess. CalledProcessError, e:
raise the Exception (e, ' Mapping The for the t: drive has not completed in the previous step. aborting... ")
Another thing:
folddic = {}
with zxJDBC.connect (url, user, passwd, pilot) as conn:
with conn.cursor () heart:
stmt = "SELECT SOURCE_SYSTEM, ABS (DIC - ROWNUM) FROM (SELECT SOURCE_SYSTEM, COUNT (1) DIC FROM DIR_USER.). (RÉPERTOIRES WHERE ACTIF = \ 'Y\' GROUP BY SOURCE_SYSTEM) ".
for the NTC in getdata (cur, stmt):
folddic [Str(CNT[1]) [:-2]] = cnt [0]
because me in folddic.iterkeys ():
Try:
subprocess.check_call ([' cmd',
'/c',
"startcmd.bat,"
"OdiStartScen,"
'- SCEN_NAME IS POLL_T_DRIVE_AND_SUBDIRS',
'-SCEN_VERSION = - 1',
'-SESSION_NAME = Polling_' + str (folddic.get (i)).
'-AGENT_CODE = MySA_Agent1',
'- SYNC_MODE = 2',
'-Interfaces.VarSubDirectory =' + str (folddic.get (i)).
'- Interfaces.VarPollInterval = 5'.
'- Interfaces.VarTimeout = 4'.
'- Interfaces.VarWait_N_Minutes = 30000 ".
])
except Exception, e:
raise the Exception (e)
Another thing:
Print "Called".
Hello
After much deliberation with the approach Prrocedure to do that are installed with the package, has been described in https://blogs.oracle.com/dataintegration/entry/using_variables_in_odi_creatin.
It takes away that the question of the child scenario waiting problem sessions will be managed ODI.
It was a good learning experience anyway.
Thank you for contributing A J Chantal Mangano
and JeromeFr for your taste.
-
script with several SET options on a single line does not
I have a script that worked very well on the 4.0.3 version but now in 4.1.0.19, he's not taking my SET options. Simple test case:
TOGETHER TO CHECK OUT LONG PAGES 350 LINES 500 1000 CUT OFF ECHO FEED
SELECT RPAD('&val1',100,'Y') FROM DUAL;
< F5 >
SP2-0158: unknown SET "check" option
old: SELECT RPAD('&val1',100,'Y') FROM DUAL
New: SELECT RPAD('a',100,'Y') FROM DUAL
RPAD ('A', 100, 'Y')
--------------------------------------------------------------------------------
aYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYY
(Size of the default line to 80 characters and show the SQL text for the substitution of the value of the variable)
It seems to work fine if I use several SET commands
SET VERIFY OFF
500 FIXED LINES
SELECT RPAD('&val1',100,'Y') FROM DUAL;
RPAD ('B', 100, 'Y')
----------------------------------------------------------------------------------------------------
BYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
Is it a bug or a feature in version 4.1?
I do not use a login.sql (Tools > database > Startup Script is not defined)
SQL Developer Version 4.1.0.19
Build a HAND - 19.07
It is an interesting question. Of course, SQL * more actually accepts a SET command listing several pairs of variable/value system
Despite the fact that recent literature does not promise this syntax of management and only mentions the
VALUE... https://docs.Oracle.com/CD/E11882_01/server.112/e16604/ch_twelve039.htm#i2698538
.. then by the summary of all the variables SET system...
https://docs.Oracle.com/CD/E11882_01/server.112/e16604/ch_twelve040.htm
Check the bug list, I see a fix in 4.1.0 for the case of variable/value pairs 3 (with no error message), but failing to put the last 2 variables correctly.
By checking your test scenario against 4.1.0 and the last line of the main code, it also works for the first 4 variable/value pairs...
all check out along lines of 1000 pages 350 500
then complained to carve out on being the fifth...
game check long 1000 350 lines of topping on 500 pages
line 1: "game of topping on ' is obsolete.
and finally the errors to try to manage any valid system variable after the fourth...
game check long 1000 pages 350 lines 500 feed
SP2-0158: unknown SET "check" option
game check long 1000 pages 350 lines 500 topping on feed off echo off
SP2-0158: unknown SET "check" option
Buggy.
-
TopLink called native query with named parameters
Hello
Set my metadata in TopLink native xml and use the TopLink native interface Session I can access and execute a query named using positional parameters (parameters passed to match the? 1? 2, etc.). For this I used the method Session.executeQuery (String, class, list) for example
Select p p person where p.name =? 1
Now, how can I get the same Session to run queries called using named parameters? None of the methods Session.executeQuery seems adapted... Am I missing something here? for example
Select p p person where p.age =: age
I can't find a good match for this use case in Session http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/b13698/oracle/toplink/sessions/Session.html. I expect something like:
Session.executeQuery (String queryName, target of the class, argNames list, list argValues)
or
Session.executeQuery (String queryName, target of the class, map argsKeyedByName)
but impossible to find a good match, can someone enlighten me please?
Thanks in advance,
Best regards
GiovanniHello Giovanni,.
Session.getQuery () returns the query if it is set on the session. If it is set on the descritor, you will need to use:
Query DatabaseQuery = session.getDescriptor (domainClass) .getQueryManager () .getQuery (queryName);My answer was for positional and named parameters. A query object must have defined named parameters to this subject (IE setParameter) for the query to use. If you use JPQL via interfaces to the APP, it is done for you when the JPQL is analyzed.
So can you give an example of the definition of the query that you have problems with?
Best regards
Chris -
What is the syntax to call a procedure with named parameters?
I should know this, but I can't seem to remember how to do it and did not find reference.
If I have a procedure like this:
CREATE or REPLACE myProc (inParam1 IN VARCHAR2, inParam2 in NUMBERS)...
If I want to call this stored proc with a call control and the name of the parameters instead of having to go through position, how should I do that?
That is to say, I know that I can do: call the myProc('somevalue'1)
But I want to be able to do something like this: call myproc (inParam1: = "somevalue", inParam2: = 1)-which doesn't seem to work. Anyone know the syntax I'm looking for?
Thank you!I don't know if you are referring to the call to the procedure according to the parameters.
His
Call MyProc (inParam1-online "somevalue", inParam2-online 1)
call MyProc (inParam2-online 1, inParam1-online "somevalue")
Hopefully it's that you make reference to.
-
Using transformations of curve with several parameters
I would like to use the ChnLinScale function as a curvetransformation in DIAdem report.
I created the sub in my file of the user controls:
Void ScaleAndOffset (dCustScale, dCustOffset)
Call ChnCopy (CurveTransfInX, CurveTransfOutX)
Call ChnLinScale (CurveTransfInY, CurveTransfOuty, dCustScale, dCustOffset)
End SubWith this feature, I expect to use the Transformation of the curve "ScaleAndOffset (3,5)" to multiply and compensate for my signal. However when I use I get the following error:
"Cannot use parentheses when calling a Sub".
For a single parameter, I can use this construction:
Void ScaleAndOffset (dCustScale)
Call ChnCopy (CurveTransfInX, CurveTransfOutX)
Call ChnLinScale (CurveTransfInY, CurveTransfOuty, dCustScale, 0)
End Subwithout problem.
Is it normal?
Tone
Hi tone,
No, this is not a limitation of the curve of the Transformations, but is rather a matter of syntax VBScript. Whenever you call a VBScript Sub procedure or function that has more than 1 parameter, you MUST use the prefix 'call '. For a Sub or Function with 1 single parameter or no parameter, you can omit the 'call '. I tested with the allocation of processing of the following curve:
"Call the CurveSmooth (100, 1)."
.. who calls 2 user setting below control curve of Transformation:
Void CurveSmooth (SmoothPts, SmoothSym)
SmoothType = "symmetric"
IF SmoothSym <> "" SmoothSym AND <> 0 THEN SmoothType = "maxNumber»»"
Call ChnCopy (CurveTransfInX, CurveTransfOutX) ' copy the input into the output channel channel
Call ChnSmooth (CurveTransfInY, CurveTransfOuty, SmoothPts, SmoothType) ' smooth the input channel and save the result as output channel
End SubBrad Turpin
Tiara Product Support Engineer
National Instruments
-
ADF page call Web Service with several params the right way
Hello
I use JDev 11.1.1.4.0.
I have a web of e-mail notification service which takes 4 parameters, to, subject and body. What I need to do, it's at the end of each "commit", calling this web service to send a notification to a group of viewers telling them a new record has been created. Here are the steps of my work to make it work:
1. creates a data control of web service using WSDL email notification.
2 drag - move the control of data on page jspx as a parameter in the ADF.
3 set the Visible of the presentation of the Panel shape to "False" so that the control does not appear.
4. in a backingbean where is the 'onSave()' method, I put the code to call the web service.
This code works, but I don't know if I'm doing things. For some reason, there is a better way to achieve what I need.// in onSave() method after successful commit ValueExpression veFrom = efactory.createValueExpression(elctx, "#{bindings.from.inputValue}", Object.class); veFrom.setValue(elctx, "[email protected]"); ValueExpression veTo = efactory.createValueExpression(elctx, "#{bindings.to.inputValue}", Object.class); veTo.setValue(elctx, "[email protected]"); // omitted rest of the params for brevity OperationBinding method = bindings.getOperationBinding("process"); method.execute();
Thank you very much in advance for your comments francs and suggestions.
Bones Jones
Published by: Bones Jones on April 29, 2011 06:44Check out this blog of Shay - which describes exactly the same scenario:
http://blogs.Oracle.com/Shay/2009/07/java_class_data_control_and_ad.htmlInstead of setting the visible property of panelFormLayout to false, the author removes the user interface components unwanted on the page in step 7)
7. deletion of a component of a page JSF without deleting is mandatory
Thank you
Nini -
Hi all
I know I can do this task to help navigate and have guests in the target report, but I would really like to know what I'm doing wrong with GoURL.
This is the code I have:
' <-a href = http://server:9704/analytics/saw.dll?GO & path=/shared/Office%20of%20Ins%20Res/St_by_clas_by_school & Action = Browse & P0 = 2 & P1 = eq & P2 = table1. School_Code & P3 =' | Cast (table1. School_Code as char). "& P4 = eq & P5 = table1. CLAS & P6 =' | Cast (table1. CLAS as char). ' > '. Table1. "" CLAS Format | "< / a-> '"
I know that I don't have space in one of the following values. I see that this first parameter correctly. When I check the link with the values passed, the link stops at the end of the p3.
Any ideas why or how I can pass the second parameter?
Thank you
Banu1. try to replace cast (PS_CNS_S_ENRL. School_Code as char) trim (TRAILING ' ' of AFTER casting (PS_CNS_S_ENRL.) School_Code as char))
OBIEE convert CAST (AS CHAR) cast ( AS CHARACTER (30)). If School_Code has less then 30 characters empty positions will be replaced by spaces. 2. If School_Code has a fixed length, e.g. 4-digit, you can write cast (PS_CNS_S_ENRL. School_Code as char (4))
-
have a multi-record with several unrelated elements blocking, filled by simply calling
Forms of oracle, I have a form with a block of several recording, with several unrelated elements.
One of these non-is a basic formula element.
The formula for this article fills the others not consolidated items.
A procedure with several out parameters is called.
For example
: cmr.id (now the unique id of a database record)
: cmr.unbound_dummy, with the formula f_fill_blk_unbound_items(:blk.id)
: cmr.unbound_adres
: cmr.unbound_contactperson
function f_fill_blk_unbound_items (p_id in customers.id%type)
Return number
is
number of l_rc;
Start
customer_pck.get_adres_and_contactperson
(p_id = > p_id - IN)
, p_adres = >: cmr.unbound_adres - OUT
, p_contactperson = >: cmr.unbound_contactperson - OUT
);
Return (0);
end;
QUESTION: How can I do something similar in the APEX; have a blocking of multi-record with several elements not related, filled by calling a procedure with several out parameters?The suggestion refers to functions in pipeline
http://www.Oracle-Developer.NET/display.php?ID=207This will allow you to select your information you need in a query like
SELECT * FROM TABLE(table_function)
It should also more powerful than the example of forms.
Scott
-
USING SEVERAL PARAMETERS FOR GET_SEARCH_RESULTS WITH THE HELP OF API RDCI
Using Oracle Web Center content Web Service, I'm able to pass several parameters to the search entry to GET_SEARCH_RESULTS.
" < envelope soap: xmlns:soap = ' http://schemas.xmlsoap.org/SOAP/envelope/ ">
" < soap: Body = xmlns:ns1 ' http://www.Oracle.com/UCM "> "
< ns1:GenericRequest webKey = "cs" >
< ns1:Service IdcService = "GET_SEARCH_RESULTS" >
< ns1: User / >
< ns1:Document >
<!-ns1:Field name = "QueryText" > xCUSTOMER_MSISDN & lt; contains > '044444444' < / ns1:Field->
< name ns1:Field = "QueryText" > xCHANNEL_ID & lt; contains > '11222212' < / ns1:Field >
AND
< name ns1:Field = "QueryText" > xCUSTOMER_id & lt; contains > '08848484848' < / ns1:Field >
AND
< name ns1:Field = "QueryText" > xCHANNEL & lt; contains > 'ISL' < / ns1:Field >
< / ns1:Document >
< / ns1:Service >
< / ns1:GenericRequest >
< / soap: Body >
< / envelope soap: >
How do I pass several entrance to search for GET_SEARCH_RESULTS parameter when you use the RDCI API?
I have this code RDCI, but I get parse error as soon as I try out several settings. It works very well with a single parameter. Please advice
Public Shared Sub {search (String content_dDocName)
String queryText = "dDocName < match > '" + content_dDocName + "'";
create the binder
DataBinder searchResultBinder = idcClient.createBinder ();
fill the binder with the settings
searchResultBinder.putLocal ("IdcService", "GET_SEARCH_RESULTS");
searchResultBinder.putLocal ("QueryText", queryText);
searchResultBinder.putLocal ("ResultCount", "20");
run the query
ServiceResponse searchResponse;
print a Boolean = false;
for (int counter = 0; counter < 1000; counter = counter + 1) {}
try {}
searchResponse = idcClient.sendRequest (userContext, searchResultBinder);
If (! print) {}
myExecutable.logEvent ("GET_SEARCH_RESULTS successful call.");
print = true;
}
} catch (IdcClientException e) {}
myExecutable.logEvent ("GET_SEARCH_RESULTS failed");
e.printStackTrace ();
return;
}
DataBinder searchData;
try {}
searchData = searchResponse.getResponseAsBinder ();
} catch (IdcClientException e) {}
myExecutable.logEvent ("cannot get the answer.");
e.printStackTrace ();
return;
}
DataResultSet search results = searchData.getResultSet ("SearchResults");
If (searchResults.getRows () .isEmpty ()) {}
continue;
}
myExecutable.logEvent ("successfully obtained response - (s) dDocName ' following was found:" ");
Iterator it = searchResults.getRows () .iterator ();
While (it.hasNext ()) {}
Date of birth of DataObject = (DataObject) it.next ();
myExecutable.logEvent (dob.get ("dDocName"));
}
return;
}
myExecutable.logEvent ("failed to get a response at the time given.");
}
You can provide several search parameter to RIDC as follows:
dataBinder.putLocal ("QueryText", 'xOriginalServiceId
'DISO' xApprover 'fmwtuser' ') In above query, I gave 2 search parameters.
You can replace OR with AND & also you can replace 'contains' by 'correspondences' according to your requirement.
-Prashant
Maybe you are looking for
-
Where can I find a new screen for Satellite L40
Where can I find the screen for satellite L40? The screen is broken and he is almost nine laptop. Please let know me.
-
I have I've unloaded .a pixela application disc ver.3.5 (pixela corporation). It has been downloaded successfully... but when I tried to open it, it was said that the http shortccut doesn't have a register ed program and there do not have open.what d
-
I am the system administrator for my pc
I am and have been a Director on my xp pc. I can't download the upgrade of windows, because he says that I am not logged as an administrator. Why, when it comes to my computer? How can I change this? I went on the account of users without help. Why?
-
screen saver does not lock to protect the password
I don't know how to lock the password protect the screen saver.
-
Hello I deleted all my programs out of my program list in the start menu. I know they are always installed, but I have no idea how to access. Specifically, the program HP Recovery Manager. I have a HP and what he was going to reformat my hard driv