How to use GUI_EXEC to call a bat file with 3 varibale paremeters
HI Experts,
I would likd to call a.bat with parameters. however these parameters are varibles.
for example i need call a.bat with the current system ID current hostname and system number. I do not think my writing is right...
CALL FUNCTION 'GUI_EXEC'
EXPORTING
COMMAND = 'D:\restart.bat'.
PARAMETER = SY-SYSID ' ' SY-HOST '50'
Best regards,
Cliff
Hi,
Your bat should look like this...
yourcommand %1 %2 % 3
...and abap code like this...
DATA: l_cmd(30) TYPE c.
MOVE 'D:\restart.bat' TO l_cmd.
MOVE SY-SYSID TO l_par1 .
MOVE SY-HOST TO l_par2.
MOVE '50' TO l_par3.
CONCATENATE l_cmd l_par1 l_par2 l_par3 INTO l_cmd SEPARATED BY SPACE
CALL FUNCTION 'GUI_EXEC'
EXPORTING
COMMAND = l_cmd.
Edited by: Simo Mertsola on Sep 27, 2009 7:28 PM
Edited by: Simo Mertsola on Sep 27, 2009 7:28 PM
Edited by: Simo Mertsola on Sep 29, 2009 3:20 PM
Similar Messages
-
How to call a .bat file from java code?
How to call a .bat file from java code? and how can i pass parameters to that .bat file?
Thanks in advancethanks for ur reply
but still i am getting the same error.
I am trying to run a .bat file of together tool, my code looks like below
import java.lang.Runtime;
import java.lang.Process;
import java.io.File;
class SysCall{
public static void main(String args[]){
String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
//String path="D://Borland//Together6.2//bin//Together.bat ";
Runtime r= Runtime.getRuntime(); //Declare the system call
try{
System.out.println("Before batch is called");
Process p=r.exec(cmd);
System.out.println(" Exit value =" + p.exitValue());
System.out.println("After batch is called");
/*can produce errors which must be caught*/
catch(Exception e) {
e.printStackTrace();
System.out.println (e.toString());
I am getting the below exception
Before batch is called
java.lang.IllegalThreadStateException: process has not exited
at java.lang.Win32Process.exitValue(Native Method)
at SysCall.main(SysCall.java:17)
java.lang.IllegalThreadStateException: process has not exited -
How to use Stored Procedure Call in Sender JDBC adapter
Hi All,
Could someone send me a blog on how to use Stored Procedure call in Sender JDBC adapter?
XierHi Xler
refer these links
/people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
Also, you can check Sriram's blog for executing Stored Procedures,
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
/people/jegathees.waran/blog/2007/03/02/oracle-table-functions-and-jdbc-sender-adapter
This blog might be helpfull on stored procedures for JDBC
JDBC Stored Procedures
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
Please go through these threads and see if it helps...
Re: How to execute Stored Procedure?
Re: Problem with JDBC stored procedure
Thnaks !! -
How to use @jws:sql call Stored Procedure from Workshop
Is there anyone know how to use @jws tag call Sybase stored procedure within
Workshop,
Thanks,Anurag,
Do you know is there any plan to add this feature in future release? and
when?
Thanks,
David
"Anurag Pareek" <[email protected]> wrote in message
news:[email protected]..
David,
In the current release, we do not support calling stored procedures from a
database control. You will have to write JDBC code in the JWS file to call
stored procedures.
Regards,
Anurag
Workshop Support
"David Yuan" <[email protected]> wrote in message
news:[email protected]..
Anurag,
I know how to use DB connection pool and create a db control with it. In
fact, we have created a Web Service with the db control using plain SQL
in
@jws:sql. However, my question here is how to use @jws tag in Weblogic
Workshop to create a Web Services based on Sybase stored procedure orany
Stored Proc not plain SQL.
Thanks,
David
"Anurag Pareek" <[email protected]> wrote in message
news:[email protected]..
David,
You can use a database control to obtain a connection from any JDBC
Connection Pool configured in the config.xml file. The JDBC Connectionpool
could be connecting to any database, the database control is
independent
of
that.
Regards,
Anurag
Workshop Support
"David Yuan" <[email protected]> wrote in message
news:[email protected]..
Is there anyone know how to use @jws tag call Sybase stored
procedure
within
Workshop,
Thanks, -
In SQLScript, how to use EXEC to call another procedure with parameters in procedure?
Hi experts,
In SQLScript, How to use EXEC to call another procedure with input and output parameters in procedure?thanks very muchHi Sagar,
thank you! I generate another procedure with an input parameter and an output parameter in a procedure. Then i need to call the generated procedure using EXEC. Here is my code:
create procedure ftest1(out sum_num bigint)
as
begin
declare fa_output bigint;
declare v_sql_drop varchar(200);
declare v_sql varchar(500);
declare cursor c_cursor1 for select num from TABLE1;
--v_sql_drop := 'drop procedure fe';
--exec v_sql_drop;
v_sql := 'create procedure fe(in i_num bigint,out o_num bigint) as begin';
v_sql := :v_sql || ' o_num := :i_num * 2 + :i_num * :i_num;';
v_sql := :v_sql || ' end';
exec v_sql;
open c_cursor1;
for c_item as c_cursor1 do
exec 'call fe(c_item.num,o_num=>fa_output)';
if sum_num is null then
sum_num := fa_output;
else
sum_num := :sum_num + fa_output;
end if;
end for;
close c_cursor1;
end;
The underline code is using exec to call the generated procedure. But this method cannot work. Any suggestion? thanks again! -
How to use the program called ZSAPLINK to import Function Name
How to use the program called ZSAPLINK to import Function Name
Not sure why you posted into this forum?
Note the header for this forum:
This forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
Ludek -
How do you end a call after you've merged it for three way calling?
Hi there, there is no star function to activate the three-way calling feature. Here is a very helpful link that will explain on how to use three-way calling with Verizon.
http://www22.verizon.com/ResidentialHelp/Phone/Calling+Features/Three-Way+Calling/Questions+and+Answ...
--James
--James
Verizon Support
Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or Plan. -
How to use "Set Enterprise Call Info" step in the script ?
Hi all
Can anyone please suggest how to use "Set Enterprise Call Info" step in the script.
Does anyone has any example script with the same (a complete example script) ?Hi
go to this guide
http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
and see the chapter
"Designing Scripts for use with the Cisco Application Gateway" -
Execute SSIS Package from JOB which contains Execute Process Task calling a .bat file
Hi All,
I have a EXCEL Macro needs to be called from SSIS. We could not use Script task because of some internal reason.
So we have taken an approach to call a .BAT file using Execute Process Task. This .BAT file will call a .VBS file which will execute the EXCEL Macro.
The SSIS Package is running good if I execute the package from BIDS.
But the real problem is with the scheduling this SSIS Package using SQL JOB.
If i execute this SSIS package from SQL Server Job, its executing the whole package successfully except the Execute Process Task.
So the overall issue is SQL Server Job is not executing properly if I call any .BAT file from the SSIS Package.
Please give me suggestion to get rid of the issue. Thanks in advance.Hi Sai.N,
If you run the SQL Server Agent job manually from SSMS, does the package execute properly? If the package executes properly when you run the job manually, the issue should occur due to permission issue. In this case, I suggest that you create a SQL Server
Agent proxy based on the current Windows account which you use to log onto the operating system, and run the job under the proxy account.
If it is not the issue, please enable logging in the package as Visakh mentioned and post the warning/error message for further analysis.
Regards,
Mike Yin
TechNet Community Support -
Using java to call a text file
I am new to java and was wondering if there is a way of using java to call a text file on my server and use it to create a webpage using a template. Namely to click a link to a poem, and have the java automatically create a page from a text file of the poetry. I need to know if this is even possible, what I would need to look into, (IE: which software or applet to look for), and if there are any sites that anyone knows about that I could learn how to do this. currently I am having to create a page for every poem posted on my site, which takes a great deal of time, and I would like to speed the process up a bit if it is possible. Any suggestions would be greatly appreciated.
Why a text file? I don't think it is a best practice of doing that. Just use a database, keep your poem collections there, and set up a jsp page that seek the database, and then display it on another jsp page. I guess you can find similar application in the sample projects provided by JSC.
-
Problems running bat file with calls to java programs (.jar)
I created a bat file with calls to jar programs. In each line,
I put a call to the programs with parameters, but bat only
executes the first line and ends execution.
All lines of my bat file must be executed.
What should I do?
Best Regards,
Pedro Felipe
[http://pedrofao.blogspot.com|http://pedrofao.blogspot.com]
[http://viajantesmundo.blogspot.com/|http://viajantesmundo.blogspot.com/]user8730639 wrote:
I realized that the problem isn`t my bat file. I made tests calling another jar files and then all the lines of the batch file were executed. So, the jar file called on my previous bat is finnishing the execution. I verified and the jar apps worked without error.
I would like to know if exists any command in Java that can cause this effect (close a batch), to modify the open source code of the application.Not that I know of.
Is prism a bat file?
If you are invoking bat files from your bat file without using call that would explain it
:: mymain.bat file
:: call the first bat file
call prism.bat arg1 arg2 arg3
:: call the other bat file
call prism.bat arg4 arg5 arg6
:: -
Okay so I set up my Time Capsule already and is now backing up 2 of my iMacs. Works great. What I want to know is how to use the TC to directly store files? I want to do this to delete some files on iMac 20inch but still have them on the TC for future reference..eg some movies on iTunes. I want to directly save them on the drive so I can delete them from iTunes and gain some storage. (Ps on iMac 20 inch (it's almost full - 320 GB) when I enter time machine, a tab comes up on finder which reads "Time Machine backups" it's able to be ejected like a disc or a connected device. On the iMac 20 inch, I dragged some files onto there as if using it like a hard drive. Is this the correct method? Then I went to my 27inch iMac and saw the "Time Machine Backups" hoping to see the files I dragged from the 20inch iMac. But the files were not there except a folder that said "Backups.backupdb". Can someone help me?
It's not a good idea to use a network disk for both Time Machine backups and other things. By design Time Machine will eventually consume all the space on its output disk, which will then cause problem for your other files. I'd store those other files on an external disk connected to the Time Capsule. The problem with that is that Time Machine will only back up files that are local to your Mac. That means that you'll only have one copy of the files on or attached to your Time Capsule.
By the way, you've been misled by poor field labeling on this forum into typing a large part of your message into the field intended for the subject. In the future just type a short summary of your post into that field and type the whole message into the field below that. -
How to use Xerces to validate an XML file against a DTD
Hi, can anybody tell me how to use Xerces to validate an XML file against a DTD. its urgent. post some sample code. it would be helpful for my project. isupposed to use SAX parser(Xerces)
Thanx in advanceCome on, I googled "xerces validate" and the first link is the Xerces FAQ:
http://xerces.apache.org/xerces-j/faq-general.html
And of course "how to validate" is a Xerces FAQ. Help yourself by doing a little research instead of waiting for other people. -
How can use my Wireless Location Appliance to work with RF ID's?
How can use my Wireless Location Appliance to work with RF ID's for Asset Tagging.
It seems Smartcard used for ID cards have a small RF ID, can I use this for Asset Tagging?
Thanks in AdvanceThere are two kinds of RFID tags: Active tags, which have a battery or other internal power source, and passive tags, which have no power source and work by reflecting the energy from an RFID scanner (basically). At the energy levels and distances used for WiFi location detection, passive tags will not return a detectable signal.
Take a look at http://www.aeroscout.com/ for more info on WiFi RFID tagging. -
How to use Connection Pool in ADF ear file creaion from jDev 10.1.3
Hi,
We are developing big application in ADF with 10 different modules. We are creating ear file with data source setting.
How to use connection pool while creating ear file from jDev. Connection pool is alreday created in Application Server 10g.
What all the setting we need do to make use of connection pool while creating ear file jDev.
ThanksUser,
If you are using ADF Business Components, you can right-click each application module, select "configurations" and edit the configuration you are using. On the initial page of the configuration dialog, you can specify to use either a JDBC URL or a Datasource - you just need to choose Datasource and then provide the name by which to access it.
John
Maybe you are looking for
-
IPad stuck on "Connect to iTunes" screen after iOS 8.0.2 Update
Attempted to update to iOS 8.0.2 last night on my 4th Gen iPad. After verifying the download, the iPad instructed me to "Connect to iTunes". Once connected, iTunes stated that my iPad was in need of a restore, which I attempted to do so. Upon "extrac
-
When I used a previous browser the tabs opened to the home page? Can this be done with Firefox and if so how? == This happened == Every time Firefox opened
-
Migrating from Cisco 4402 to 5508 - AP Compatibility
We currently run six 4402 Wireless lan controllers - these are managed by a WCS server - soon to be replaced by Cisco Prime. We run a mixture of LAP1242 and LAP1142 wireless access points. I need to add more but have been told by my supplier that the
-
Hello all I have tried to undertake HotSync with a LifeDrive as well as a Z22 to MacBookPro running 10.5.5. Two weeks ago there was no issue with syncing to either PDA, but today, during HotSync, the application on the Mac quits and I get the standar
-
Interation between IBM CM MANAGER (Document management ) and Financial
Hi, We are in the process of implementing the middle ware. We have installed the 9iAS release 2 and its components. For integration we are using interconnect. We have oracle financials application and IBM applications, trying to integrate the IB