Unix shell script to batch file for windows

Hello all,
Iam writing a program in java in unix environment and iam executing using shell scripts in unix this program is for client-server environment
which look like this:
For server:
#! /bin/ksh
export CLASSPATH=/user/vpp/jal/classes:$CLASSPATH
#set var for filename config file
export JAL_CONF_FILE=/user/vpp/jal/conf/JALapp.conf
java -DJAL_CONF_FILE=$JAL_CONF_FILE jalsvr/JALTCPServer 7776for client side it is
#! /bin/ksh
export CLASSPATH=/user/vpp/jal/classes:$CLASSPATH
echo $CLASSPATH
java jalcl/JALTCPClient msoc05:7776my question is know i want to execute them in windows by creating batch files runsvr.bat, runcl.batbut how
i gave PATH by giving JRE path but what is the replacement of export because iam having all class files
in /jalcl for clients and /jalsvr for server but want to create this batch file in separate /bin folder how to do.please help me

Thank you for reply ,
And sorry by mistake question repeated twice,
but when iam executing those batch files it is throwing some exceptions,
in that file you did not mention to set the JRE path whether it is not necessary and also there msoc05 is the machine name of unix system that need to kept or need to be changed with window IP address .please reply.
thanks in advance.

Similar Messages

  • Unix Shell Script to check file Format

    Hello
    I am New to shell scripting.Please help me to write a script for the below condition.Any help is highly appreciated.
    I will get a text file every month like the one below
    Sample file
    Payslip.txt
    ========
    EMPID EMAIL PCTAG#
    4946:[email protected]:151207
    4978:[email protected]:154434
    5091:[email protected]:160784
    5208:[email protected]:153601
    5211:[email protected]:158963
    5218:[email protected]:156967
    5247:[email protected]:153760
    5250:[email protected]:160078
    5276:[email protected]:154693
    I should check for the below conditions in the above file
    Conditions:
    =======
    1.File should be seperated by colon(;)
    2.EMPID should not be null
    3.Email address and pc tag# should be null if it is missing
    4.No empty record should be there
    All the above four conditions should be checked
    If any one of four conditions are not met then the file is invalid and it should exit with status saying that file is invalid.
    If all the four conditions are met it should say that the file is valid
    Any help is highly appreciated.It is urgent.
    Thanks in advance
    Manoj

    Try this :
    error()
    {       echo -n "Line "$NR "  "$LINE "  "       >>$STATUS
            echo $1                                 >>$STATUS
    NR=0
    STATUS=/tmp/status.txt
    rm -f $STATUS
    cat Payslip.txt | while read LINE
    do
            NR=`expr $NR + 1`
            ### Check colons ###########
            if [ ! "`echo $LINE | grep :`" ]; then
                    error "No colon"
                    continue
            fi
            EMPID=`echo $LINE | awk -F: '{print $1}'`
            EMAIL=`echo $LINE | awk -F: '{print $2}'`
            PCTAG=`echo $LINE | awk -F: '{print $3}'`
            ### Check null line ###########
            if [ ! "$EMPID" -a ! "$EMAIL" -a ! "$PCTAG" ]; then
                    error "Null line"
                    continue
            fi
            ### Check null EMPID ###########
            if [ ! "$EMPID" ]; then
                    error "No Empid"
                    continue
            fi
    done
    echo
    if [ -f $STATUS ]; then
            cat $STATUS
            echo
            echo "File is Invalid"
    else
            echo "File is Valid"
    fi
    echo

  • Rman batch file for windows

    Hi,
    I created two files for Rman.
    One is showall.txt
    Another one is rman.bat
    rman.bat contains
    rman target=sys/system @c:\showall.txt
    showall.txt contains
    show all;
    list backup;
    when i click the rman.bat,it is simply running indefinitely and no output display.
    please tell any example script for RMAN on windows by scheduled.

    Santosh Kumar wrote:
    hi,
    thanks for reply.I find that changed the file name rman1.bat insetad of rman.bat .bcz the name conflict with
    RMAN.EXE si when the click that it's running indefinitly...........................Not a convincing reason...........My backup script name is also rman.bat, it runs fine.
    Regards,
    S.K.
    Edited by: Santosh Kumar on Aug 15, 2009 7:02 PMI'd guess a pathing issue. Your directory with rman.bat probably comes first in your path. The OP probably had ORACLE_HOME/bin first, so rman.exe fired. It wouldn't have been 'running forever' so much as it was wating for input that the OP never provided.
    Just my guess.

  • How to run sql scripts using batch file for a web dynpro data dictionary

    Hi,
    I want to develop a sql script to be executed on the server alongwith the installation of a product to pre-populate web dynpro data dictionary tables required for the application.
    I further require to make the scripts independent of the database name,so that it can be run at any client environment.
    Your help will be appreciated and rewarded.

    See shoblock's answer
    call sql script from unix
    masterfile.sql:
    @file1 &1
    @file2 &2
    @file3 &3
    @file4 &4
    then just call the master script:
    sqlplus userid/password @masterfile <p1> <p2> <p3> <p4>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Need Help in creating Unix Shell Script for database

    Would be appreciable if some one can help in creating unix shell script for the Oracle DB 10,11g.
    Here is the condition which i want to implement.
    1. Create shell script to create the database with 10GB TB SPACE and 3 groups of redo log file(Each 300MB).
    2. Increase size of redolog file.
    3. Load sample schema.
    4. dump the schema.
    5. Create empty db (Script should check if db already exists and drop it in this case).
    6. Create backup using rman.
    7. restore backup which you have backed up.

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • Reg: UNIX shell script at File Adapter

    Hi all,
    I am doing a File to file scenario and using command line arguments in Sending file adapter. I am using UNIX shell script ".sh" file for executing the command.
    I gave the following path at "Run OS command before message processing" parameter:
    /temp/xidelivery/send/FILOSC004_shell.sh
    and this file contains following code:
    <b>#!/user/bin/sh cp /temp/xidelivery/send/FILOSC004_in.txt /temp/xidelivery/send/FILOSC004_input_copy4.txt</b>
    I put the source file, FILOSC004_in.txt and shell script files at the respective paths.
    If I give "cp" command directly in command line it is working fine. But I could not execute this with shell script. Can any body give me the reason where I gone wrong.
    Regards,
    Pavani.

    Hi,
    can you try this,
    bash /temp/xidelivery/send/FILOSC004_shell.sh
    let me know.
    hey you can check the blog below to catch the OS errors,
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    Prasad Babu.
    Message was edited by:
            PrasadBabu Koribilli

  • How to read specific line in a file through UNIX shell script..

    Dear Friends,
    I have generated .ldt file under admin/import/US folder through FND_LOAD script for Download the responsibility.
    I registred Shell script (Host concurrent program) in Oracle apps. Now i want to read the file in speciific line which i was generated in admin/import/US folder through unix shell script. Please help me how to read specific line and the i want to replace that which i am going to read the specific line.
    Thanks in advance..
    Regards,
    Velu.

    Hi,
    Thanks for reply,
    My requirement i have to find the specific line in a file and find and replace needed word over there it's should happen programatically. i want to read specific line in a file Once complete find and replace the condition should exists. The loop will go to next file and read the same line in next file also do the same process upto how many files over there.i am doing through UNIX shell script. Please help me out to find the
    Your suggestion is highly appriciated.
    Thanks,
    Velu.

  • How to prepare for Converting UNIX shell scripts to PL/SQL

    Hi All
    I was said, that i may have to convert a lot of unix shell script to PL/SQL, what are the concepts i need to know to do it efficently,
    what are the options PL/SQL is having to best do that.
    I know the question is little unclear, but I too dont have much inputs about that i'm sorry for that, just its a question of how
    to prepare myself to do it the best way. What are the concepts i have to be familiar with.
    Many Thanks
    MJ

    Just how much work is involved, is hard to say. Many years ago I also wrote (more than once) a complete ETL system using a combination of shell scripts, SQL*Plus and PL/SQL.
    If the PL/SQL code is fairly clean, uses bind variables and not substitution variables, then it should be relatively easy to convert that PL/SQL code in the script to a formal stored procedure in the database.
    There is however bits and pieces that will be difficult to move into the PL/SQL layer as it requires new software - like for example FTP'ing a file from the production server to the ETL server. This can be done using external o/s calls from within PL/SQL. Or, you can install a FTP API library in PL/SQL and FTP that file directly into a CLOB and parse and process the CLOB.
    Think of Oracle as an o/s in its own right. In Oracle we have a mail client, a web browser, IPC methods like pipes and messages queues, cron, file systems, web servers and services, etc. And PL/SQL is the "shell scripting" (times a thousand) language of this Oracle o/s .
    In some cases you will find it fairly easy to map a Unix o/s feature or command to one in Oracle. For example, a Unix wget to fetch a HTML CSV file can easily be replaced in Oracle using a UTL_HTTP call.
    On the other hand, techniques used in Unix like creating a pipe to process data, grep for certain stuff and awk certain tokens for sed to process further... in Oracle this will look and work a lot different and use SQL.

  • Calling Unix shell script for some GUI interface

    Hi,
    I'm preparing a shell script, which would check for the syntax of a bteq script.
    I want this shell script to be called from a GUI interface...
    Is it possible to call this shell script from any GUI interface..
    If yes, could you please help me out.
    Thanks,
    Harshad.

    Harshad (user524171) wrote:
    I'm not aware of OEM grid control. Can i use it without Oracle or Oracle is must for this...Er.. this is an Oracle forum... and if you are not using Oracle s/w then why are you using Oracle support forums?
    I'm using teradata database and unix here...And what part of ORACLE Database General Forum+ do you not understand that makes you ask Teradata questions here?
    Teradata is not Oracle. Oracle is not Teradata. Please use the correct forum for your subject matter.

  • Can I call host file ( Unix Shell script ) from Oracle 10g trigger

    Hi,
    I am new to Oracle 10g. Can I call host file ( unix shell script ) from Oracle 10g trigger ?. I know it is possible. Pl explain me with small example
    thanks & regards
    parag

    user12009546 wrote:
    Hi,
    I am new to Oracle 10g. Can I call host file ( unix shell script ) from Oracle 10g trigger ?. I know it is possible. Pl explain me with small example
    thanks & regards
    paragIf you are in 10g, you can simple call shell script from DBMS_SCHEDULER:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'TEST_SCRIPT',
    job_type => 'EXECUTABLE',
    job_action => 'PATH_OF_YOUR_SCRIPT',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=MINUTELY; INTERVAL=1',
    enabled => TRUE,
    comments => 'Shell script from Oracle'
    END;
    /

  • Want to create unix shell script for  Clone procedure in 11i and r12

    Want to create unix shell script for Clone procedure in 11i and r12 .Can anyone help me on this as I m new to oracle apps and scripting.
    Thanks in advance .

    user11958935 wrote:
    Thanks but I want it for application cloning ie adcfgclone and autoconfig etc .Please see old threads for similar topic/discussion.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+Rapid+AND+Clone&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Automate+AND+AutoConfig&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Porting unix shell script to WEBUI having Struts framework

    Hi,
    I am working on an assignment where I have to migrate various unix shell scripts to web based application using struts framework(J2EE).
    Is there any way to call the existing unix shell script thru the web based application?? so that the rewritting complexity can be reduced.
    Any expert suggestion will be appreciated.
    Thanks
    Raj

    Thank you for reply ,
    And sorry by mistake question repeated twice,
    but when iam executing those batch files it is throwing some exceptions,
    in that file you did not mention to set the JRE path whether it is not necessary and also there msoc05 is the machine name of unix system that need to kept or need to be changed with window IP address .please reply.
    thanks in advance.

  • Schedule workbook using with Unix shell script

    Hi,
    Can we schedule workbook using with Unix shell script?
    Thanks,
    Jay

    I can't imagine how.
    1. You can schedule Disco workbooks via Disco itself.
    2. You can schedule Disco workbooks to run and output in different file formats automatically via batch scheduler in Windows running Disco Desktop directly (or can user VBasic).
    3. You can schedule Disco workbooks to run and output in different file formats automatically via a Java program running the Java Command Line interface.
    Moving forward, Oracle has announced that with a further interfacing of Disco with XML Publisher, you'll be able to use Oracle Apps concurrent manager and scheduling. But that's coming supposedly at the end of this year.
    And I think that's about it.
    Russ

  • Batch file for Rman

    hi,
    i want to backup the tablespace by batch file in windows and shell script.i am using control file for rman
    I created two files in windows
    first one is test.bat,second one is trail1.txt
    test.bat contains
    rman target sys/sastha
    *@c:\Oracle\Ora92\d.bat*
    trail1.txt contains
    shutdown immediate;
    startup mount;
    backup tablespace users;
    alter database open;
    exit;
    exit
    but when i executed first file run but it didn't call second file.where i made the mistake.
    thanks
    with regards,
    Edited by: user3266490 on Apr 15, 2009 5:15 AM

    user3266490 wrote:
    hi,
    i want to backup the tablespace by batch file in windows and shell script.i am using control file for rman
    I created two files in windows
    first one is test.bat,second one is trail1.txt
    test.bat contains
    rman target sys/sastha
    *@c:\Oracle\Ora92\d.bat*
    trail1.txt contains
    shutdown immediate;
    startup mount;
    backup tablespace users;
    alter database open;
    exit;
    exit
    but when i executed first file run but it didn't call second file.where i made the mistake.
    thanks
    with regards,
    Edited by: user3266490 on Apr 15, 2009 5:15 AMtest1.bat contains no reference to trail1.txt. It does reference d.bat. What's up with that?

  • HOw to create a Batch file for java application and whats the use of this ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    First of all, you're OT.
    Second, you can find this everywhere in the net.
    If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
    javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
    Otherwise use:
    javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
    Don't specify the .class extension.
    Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
    The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
    This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
    Finally add dukes and give 'hem away.
    Bye.

Maybe you are looking for

  • Java code to get integer values from a gridLayout to put into an array?

    I am writing a tictactoe game for a programming class. I made a grid of 3x3 layout and it alternates between putting an X when clicked and an O. I need to know how to retrieve what button off the grid was picked so I can create an array to check for

  • Using my Photoshoped photo in PowerPoint

    I finished editing my first photo and now I want to use is in PowerPoint.  PowerPoint says "an error occured while inserting this file."  The file is a .psd. Thank you!

  • Contact Form SVG Submit Button...

    I am using the Contact Form widget in Muse. I have a custom submit button in SVG format, but if I add an image to fill the button part of that form it pasts it as an image not SVG - the add image in fill also makes it an image too. Is there a way I c

  • Show thumbnail with spry

    Hi, I want to upload images using ADDT. Normally I show the thumnails with the "show thumbnail"server behaviour. Now I want to create a spry image gallery. How can I get the thumnails with spry from the images which I have uploaded with the "Upload a

  • Javascript OKcode error in approval preview

    Hi In the tabular display of approval preview, the Ok codes are not being picked up and clicking on the buttons results in no action. Any clue on what could be the root cause for this? Thanks Rajeev Message was edited by:         Rajeev Siravara