Rwcgi60 on UNIX needs shell script ?

I am trying out Reports 6i on a Linux box.
Using Apache Webserver, I have mapped all the virtual directories with execute permission.
When I call rwcgi60 through the browser, I get the following output
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<CENTER><H1>
</CENTER></H1>
<BR></BODY>
</HTML>
But when i call a shell script (which in turn calls rwcgi60) through the browser, i get some output.
The shell script exports all the environment specific to Oracle Reports and calls rwcgi60.
Is the CGI intended to be called from a script file ? If no, what other configuration is necessary ?
Thanks.

I am having exactly the same problem on Solaris. The information I have shoehorned out of support so far is that you do need a shell script to make this work. I have followed these instructions but am still having problems. The document which details this bug is unpublished by Oracle so I only got extracts. Detailed below.....if you do have success with this please let me know as I am tearing my hair out.
REPORTS60_SERVER
1. The REPORTS60_SERVER file is located in your Oracle_Home and is used to
start the Report Server.
2. You may need to modify this file for variables such as DISPLAY, TNS_ADMIN
and the REPORTS60_PATH to fit your environment. @Also, please refer to
@Note: 111548.1 for setting up the TNSNAMES.ORA file.
3. If you are not using a WebDB Listener, you can delete the section which
stops and starts it. However, make sure you have started up your Webserver
Listener.
4. Once this file has been modified, the command to execute it is:
reports60_server start
Shell Script (RUNREP.SH)
1. You will need to create a shell script to run RWCGI60. This shell will then
be called from RUNREP.HTM file. You can name it anything (the example is
called runrep.sh) and needs to include the following:
#!/bin/sh (or which ever shell you want to use)
- ORACLE_HOME="/u03/app/oracle/product/dev6i"; export ORACLE_HOME
- TNS_ADMIN="/u03/app/oracle/product/dev6i/network/admin"; export
TNS_ADMIN
- exec /u03/app/oracle/product/dev6i/tools/web60/cgi/rwcgi60
2. You will need to redefine the ORACLE_HOME and TNS_ADMIN due to BUG:1201156.
3. This script can be located anywhere as far as the Webserver
Listener is
concerned. However, the best place would be in the ORACLE_HOME/tools/web60/
cgi directory for which we already have a virtual name defined in the
listener configuration file.
RUNREP.HTM
1. The RUNREP.HTM file is located in the ORACLE_HOME/tools/web60/html
directory.
2. You will need to modify this file due to the above mentioned Bug.
Go to the function called runReport( ) and for the var cgiexe = "rwcgi60",
replace it with the above shell script.
Example: var cgiexe = "runrep.sh"
3. Next, modify the port number for the Webserver. This file assumes that you
will be using the WebDB listener and is installed on port 8080 (by default).
You will need to find the following and change it to the correct port
number:
<td><input TYPE="TEXT" NAME="WEBPORT" SIZE="4" VALUE="8080"></td>
Change the Port Number to the one your WebServer Listener is on, such as:
7777.
After doing all of the above, you are ready to run a report on the web using
CGI implementation. From the browser run the following URL:
http://your_machine_name:listener_port#/virtual_dir_for_cgi/runrep.htm
This brings up a Template for you to provide the report name. Also change the
parameter values here for the userid/password, port#, and reports_server.

Similar Messages

  • Unix master shell script to run jobs in parallel with dependency

    I need a master shell script which would call the following shell scripts as per below order. Kindly note that if any shell script fails then the master shell script should abort.
    Level 1     PRODUCTS
         SP_ROST_DLY_STG_lD
         SP_ROST_DLY_ITG_lD
    After Level 1 completes run below two shell scripts in parallel:
    Level 2     SP_IDL_EDGE_CON_POSTN_STG_Ld ,     SP_IDL_EDGE_ACCT_POSTN_STG_LD
    After Level 2 completes run below shell scripts as per the seqeunce and in parallel:
    Level 3     SP_IDL_EDGE_ACCT_STG_LD ,     SP_IDL_EDGE_CONT_STG_LD
         SP_IDL_EDGE_ACCT_STG_VAL ,     SP_IDL_EDGE_CONT_STG_VAL
         SP_IDL_EDGE_ACCT_ITG_Ld ,     SP_IDL_EDGE_CON_ITG_Ld
    After Level 3 completes run below shell scripts as per the seqeunce and in parallel:
    Level 4     SP_IDL_EDGE_CONT_POSTN_ITG_LD ,     SP_IDL_EDGE_VISITS_LD
         SP_IDL_EDGE_ACCT_POSTN_ITG_LD ,     SP_IDL_EDGE_VISITS_DTL_LD

    can i avoid using set -e and use some other method so that if there is an error in previous job then the next job is not triggered.Sure, but it is ugly.
    The below is not the only way to do this...
    Wrap every place you start another script with:
    $ if ! MYSCRIPT; then
        echo Script MYSCRIPT failed. >&2
        exit 1
    fibut the wrapper for parallel scripts is even worse:
    $ MYSCRIPT &
    $ MYSCRIPT_JOBNO=$!
    $ MYSCRIPT2 &
    $ MYSCRIPT2_JOBNO=$!
    $ MYSCRIPT_STATUS=`wait ${MYSCRIPT_JOBNO}`
    $ if [ ${MYSCRIPT_STATUS} -ne 0 ]; then
        echo Script MYSCRIPT failed. >&2
        exit 1
    fi
    $ MYSCRIPT2_STATUS=`wait ${MYSCRIPT2_JOBNO}`
    $ if [ ${MYSCRIPT2_STATUS} -ne 0 ]; then
        echo Script MYSCRIPT2 failed. >&2
        exit 1
    fi
    ...Now, doesn't a simple 'set -e' look much better?

  • Need  Shell Script  for picking the files

    Hi,
        I want to write a shell script for piking the files in a sequence order (according to filename with time stamp)  from the sorce FTP server ..
                     Requirement is  in the source directory I'm getting files (Jain_1.xml  , Jjain_2.xml, Jain_3.xml .. ect..)  at  present my file adapter is picking all the files at a time  but  i want to pick  one by one... that to first i want to Jain_1.xml  after finish the processing of the file then only my file adapter should  pick the next file ( Jain_2.xml )  .
                  so..  all the forum mates suggest me to write a shell script..  but where  i have to write the s hell script. and where i have to deploy this script.... my Xi is running on UNIX ... so please sugest me  the procedure ...
    Regards
    Jain

    Hi,
    Why dont you use the option EOIO in which files will be picked up in order and will be proccessed in sequence....one after another....
    Regards,
    Sreeni.

  • Need shell Script for Invalid object

    Hi All,
    Can anyone post me a script for checking the invalid objects in 10g/11g database.
    The should should check for invalid objects,recompile and sent the email .

    I could think fo something like below(And applicable to multiple SID's running on the server) and i tested it it works(bash shell script)
    Assumptions:
    You have environmental file to set ORACLE_HOME ORACLE_SID
    say in this example
    /oracle/env
    ls -ltr
    env_ORCL.sh
    env_TEST.sh
    env_HR.sh
    You also have uuencode rpm installed to use along with mailx command(or else get it installed not big deal). uuencode is required
    to send as mail attachment
    1)I have kept SID list in file (/oracle/INVALID directory for eg)
    cat SID.lst
    ORCL
    TEST
    HR
    If you have lot of SID's you can populate the file using ( ps -ef|grep -i pmon | grep -v grep | awk '{print$9}' | sed 's/ora_pmon_//g' > SID.lst)
    2) Here are the list of SQL's(/oracle/INVALID directory
    cat invalid_pre.sql (For listing invalid objects per instance)
    set echo off
    set heading off
    set time off
    set timing off
    spool invalid.log append
    break on instance_name
    select instance_name , a.*
    from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
    spool off
    exit;
    cat invalid_compile.sql--to recompile invalid objects
    set echo off
    set termout off
    set feedback off
    @?/rdbms/admin/utlrp.sql 4; (Note you change degree 4 or 8 accordingly)
    exit;
    cat invalid_post.sql--to list post recompilation
    set echo off
    set heading off
    set time off
    set timing off
    spool invalid_post.log append
    break on instance_name
    select instance_name , a.*
    from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
    spool off
    exit;
    3)here is the shell script
    cat invalid.sh
    for i in `cat SID11g.lst`
    do
    cd /oracle/env/
    source env_$i.sh
    cd /oracle/INVALID
    sqlplus "/as sysdba" @invalid_pre.sql
    sqlplus "/as sysdba" @invalid_compile.sql
    sqlplus "/as sysdba" @invalid_post.sql
    done
    uuencode invalid.log invalid.log | mailx -s "Invalid" <your mail id>
    uuencode invalid_post.log invalid_post.log | mailx -s "Invalid" <your mail id>
    4) Finally run the shell script, hopefully you should receive email :-)
    I have tested it on bash
    ./invalid.sh
    Once tested you can schedule it in cron
    Edited by: vreddy on Jul 19, 2012 9:57 AM

  • Sqlplus and unix (bash) shell scripting

    Hi,
    I'm extracting some information from a DB and then "spooling" it to a file. So far so good.
    The problem is that the records I get are not like what they look like when I run the stuff in sqlplus. Instead, the spooled file has alot of weird spaces and tabs in between and does not properly separate between the different rows.
    Does anyone have any tips on how to do this?
    Note: The datatype of the field I'm retrieving is "long". I've set linesize, pagesize and long to 1000.

    Hi!
    Try also to change SQL*Plus settings, i.e. SET LINESIZE 1000 (or whatever the most long line of your report could be), then TRIMSPOOL ON, TRIMOUT ON.
    Regards,
    Andrew Velitchko
    BrainBench MVP for Developer/2000
    http://www.brainbench.com

  • Need UNIX Shell script

    My file(xxx.mf) contains big single line which includes header,details,tailer and number of records.
    example
    RA.........RW...RS.....RW....RS.....RW...RS..RT...39214
    This RA......... header record(1024 bytes)
    RW...RS.....RW....RS.....RW...RS..(38MB approximately)
    RT...Tailer record(1024 bytes)
    39214 number of records.
    User needs as
    RA......
    RW..
    RS...
    RW..
    RS...
    RW..
    RS..
    RT.....
    39214
    I need shell script to get above result. Please help me regarding this.

    trivial ksh shell script to insert linefeed characters in file
    #!/bin/ksh
    # copy input file and insert linefeed characters in output file
    # parse string and insert linefeed after each fixed-length record
    # input file: testin.txt
    # contains 10 5 character records in one string
    # R0001R0002R0003R0004R0005R0006R0007R0008R0009R0010
    # output file: testout.txt
    # contains 10 records separated by linefeed
    # R0001
    # R0002
    # R0003
    # R0004
    # R0005
    # R0006
    # R0007
    # R0008
    # R0009
    # R0010
    # arguments:
    # $1 input filename
    # $2 output filename
    str=`cat $1`
    rec_len=5
    str_len=$((`expr length ${str}`))
    rec_cnt=$((${str_len}/${rec_len}))
    i=1
    while (( i <= $str_len ))
    do
    rec_out=`expr substr $str $i $rec_len`
    echo ${rec_out} >> $2
    (( i += $rec_len ))
    done

  • Regarding the shell scripting

    Hi,
    i am working on supporting side for a migrated project.My application is an ASO.
    As i have to execute the MaxL scripts in Unix using shell scripting.
    Can any one help me out in writing and executing the scripts in Putty server.
    it is very apreciable if i get response soon to my id [email protected]
    Thanks and waiting for reply.
    Srinivas

    We are using Essbase on UNIX (AIX) too. Generally speaking, I always create 2 files when I want to execute a MaxL script on our UNIX server:
    1) a shell script, eg. proc.sh, that contains "essmsh -l <user> <password> proc.msh".
    The proc.sh file can be edited using the standard UNIS editor "vi" and needs to be executable (the "x" bit needs to be set).
    2) the MaxL script, eg. proc.msh, that contains the MaxL statements to be executed on Essbase
    Hope this helps.

  • Oracle 10g and Korn Shell Scripting

    I have a table,SALES_STAGING, with 3 main columns.
    Sales_Date, Sales_type,Sales_Code.
    A sale is added to the table then waits until approved to be processed. The Sales_Code is 1(waiting approval). Then manually changed to 2 every 30 minutes by sales staff except on weekends. By Monday,a large queue develops. This must be changed because the queue is slowing the system. Can someone help create a Unix Korn shell script to
    1) Run every 30 minutes via Crontab
    2)login to the Oracle DB.
    3)Count the number of records to be processed, if any.
    4)Update another 'log' table with the time it ran and the records to be processed
    5)if there are less than 20 add another 50 to be processed by changing the Sales_Code from 1 to 2.
    This would really help out tremendously! Thank you.

    Wait... Isn't this forum designed for the sharing of information? The experts here shouldn't be concerned whether the request is from a Student, Oracle newbie or Developer and should focus on the request. If you are capable of assisting then I am hoping you will out of the core respect for professionalism and the motivation to provide something of value to others. If not, don't waste my time or any one else by responding with preconceived judgments and insulting remarks as these will be reported.
    Sales transactions can peak at 20,000 per hour with an average of several million thru the week. Those sales by VIP customers are immediately identified and have a priority for approvals because their balances can easily exceed $1,000,000.00. There is a pre-approval process to be introduced but until programs can be modified/tested and deployed we need a quick fix. The programming system isn't slow, it's the limited human resources approving VIP customers. My request was to keep it simple and expand on it myself to include the entire scope of our project. dbms_scheduler, although a good idea will require DBA assistance and there is no resource available. I need a simple working model to give me some direction/ideas...

  • Accessing concurrent prg parameter values having space in shell script

    Hi, I have a CP that is tied to Host (shell script). One of the parameter values of CP contains spaces. When I print this parameter ($5) in shell script, space is taken as terminator and it parses it in mutiple postions, like if value is "Hello There" then $5 comes as "Hello" and $6 comes as "There"
    How do I access whole values including space as one parameter value?
    Regards,
    Harish

    Hi Ashutoosh,
    OS is SunSolaris 5.9
    My problems was that if I pass a value from concurrent program that has space and wanted to access that value in shell script as one parameter, it won't allow.
    I did anlaysis on this and I think for now, there is no way out. If I pass values from unix to shell script it works, because I will enclose in quotes.
    I removed the spaces while passing value from Concurrent program and was able to achieve what I wanted but its an work around.
    Thanks,
    Harish

  • Need Example on calling a unix shell script from oracle stored procedure

    Hi
    Can anybody give example on how to call unix shell script from an Oracle stored procedure. Please give a small example on how to do this .I need this urgently please.
    Have a nice time.
    Thanks & Regards
    Jogesh

    If you are on 10g you can also use DBMS_SCHEDULER. See Re: Excute Unix command Using PL SQL

  • 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

  • Calling a report from unix shell script

    Hi,
    I had to call a report from unix shell script.
    May i know the procedure to accomplish this
    Thanks in Advance
    A.Gopal

    First you should not include the whole path to your report in the call ...
    Use like this:
    /ora/u01/oracle/v101/as2/bin/rwrun.sh report=an_stati destype=file desname=/ora/u01/oracle/v101/as2/test.pdf desformat=pdf
    In $ORACLE_HOME/bin/reports.sh:
    1) Verify that you have updated the REPORTS_PATH variable to include your folder where you have the report in question
    REPORTS_PATH=/ora/u20/app/qits/env1/run:$ORACLE_HOME/reports/templates:$ORACLE_HOME/reports/samples/demo: ....
    2) Verify that the REPORTS_TMP variable is pointing to a valid location and that the oracle user has access to write on it.
    After that, post the content of the tracefile located at $ORACLE_HOME/reports/logs/{in-process report server name folder}/rwserver.trc
    If no file is present then it means that you need to enable trace in your reports's conf file.... go to the $ORACLE_HOME/reports/conf folder and and locate the .conf file that correspond to your in-process reports server name (as specified in the rwservelet.properties file)... open/edit the file to enable trace logs ..
    i.e.
    Change the following line:
    <!--trace traceOpts="trace_all"/-->
    to <trace traceOpts="trace_all"/>
    Bounce the reports server and try to run the report again, this time the .trc file should be generated, post the content so that we can take a look.

  • Using a UNIX shell script to run a Java program (packaged in a JAR)

    Hi,
    I have an application (very small) that connects to our database. It needs to run in our UNIX environment so I've been working on a shell script to set the class path and call the JAR file. I'm not making a lot of progress on my own. I've attached the KSH (korn shell script) file code.
    Thanks in advance to anyone who knows how to set the class path and / or call the JAR file.
    loggedinuser="$(whoami)"
    CFG_DIR="`dirname $0`"
    EXIT_STATUS=${SUCCESS}
    export PATH=/opt/java1.3/bin:$PATH
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIR
    java -classpath $
    EXIT_STATUS=$?
    cd $OLDDIR
    echo $EXIT_STATUS
    exit $EXIT_STATUS

    Hi,
    I have an application (very small) that connects to
    our database. It needs to run in our UNIX environment
    so I've been working on a shell script to set the
    class path and call the JAR file.
    #!/bin/sh
    exec /your/path/to/java -cp your:class:paths:here -MoreJvmOptionsHere your.package.and.YourClass "$@"Store this is a file of any name, e.g. yuckiduck, and then change the persmissions to executechmod a+x yuckiduckThe exec makes sure the shell used to run the script does not hang around until that java program finishes. While this is only a minor thing, it is nevertheless infinite waste, because it does use some resources but the return on that investment is 0.
    CFG_DIR="`dirname $0`"You would like to fetch the directory of the installation out of $0. This breaks as soon as someone makes a (soft) link in some other directory to this script and calls it by its soft linked name. Your best bet if you don't know a lot of script programming is to hardcode CFG_DIR.
    OLDDIR="`pwd`"
    cd $PLCS_ROOT_DIRVery bad technique in UNIX. UNIX supports the notion of a "current directory". If your user calls this program in a certain directory, you should assume that (s)he does this on purpose. Making your application dependent on a start in a certain directory ignores the very helpful concept of 'current directory' and is therefore a bug.
    cd $OLDDIRThis has no effect at all because it only affects the next two lines of code and nothing else. These two lines, however, don't depend on the current directory. In particular this (as the cd above) does not change the current directory for the interactive shell your user is working in.
    echo $EXIT_STATUS
    exit $EXIT_STATUSEchoing the exit status is an interesting idea, but if you don't do this for a very specific purpose, I recommend not to do this for the simple reason that no other UNIX program does it.
    Harald.

  • Sending email attachments using unix shell script

    hi
    I want to send report generated my spooled file as attachment using unix shell script.
    Can somebody help me out ?
    many thanks

    thanks a tonn it worked.
    but i have another issue is it possible to add names in CC also ?
    Also here is my code which spools the output of SP to a txt file. the File name is generated dynamically.
    as shown below:
    I need to send this generated file as attachement.
    how do I do this? Here the shell script
    =========================================================
    #!/bin/sh
    ORA_USER=scott
    ORA_PWD=tiger
    #Get the input parameter
    if [ ! "$1" ]; then
    STR="NULL"
    else
    STR="'"$1"'"
    fi
    #echo "exec pkg1($STR);"
    #Connecting to oracle
    sqlplus -s <<EOF
    $ORA_USER/$[email protected]
    ---sql plus enviornment settings
    set linesize 160
    set pagesize 60
    set serveroutput on size 1000000 for wra
    set feedback off
    set termout off
    column dcol new_value mydate noprint
    select to_char(sysdate,'YYYYMMDDHH24MISS') dcol from dual;
    spool &mydate.report.txt
    exec pkg1($STR);
    spool off
    EOF
    exit
    =========================================================
    the file name will take sysdate as name so that every time a new file will be generated.
    this file I need to send as attachment.
    null

  • 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.

Maybe you are looking for

  • Goods receipt against inbound delivery

    After an import po has been created then an inbound delivery is created also.So after the inbound delivery we do goods receipt and our goods receipt is done against po even when their is inbound delivery.The reason why the goods receipt is done with

  • Embedding google map in Indesign for DPS

    Has something changed with the lastest update ....? In the past, when I needed to place a embed a map, I just went to google pick up the embed code and Cmd V into Indesign.  I'll see a static image but it is "live" when when tested on the iPad. Since

  • How do I consolidate the library in iTunes 11?

    In the previous versions of Itunes you could consolidate your files. According to the apple support  i need to click File > Library > Organize Library But on the new version when I click library, organize library is not an option...I want to be able

  • The fancybox images on the Recent Images section of the site are loading very slowly. This just started happening with Mozilla 8. Is there a fix?

    The images on the fancybox on the bottom of our main page (Recent Images) are loading very slowly. This issue is only on Mozilla 8. When you browse through the images the loading begins from top to bottom.

  • Smartform text

    Hello, There is a text element in one of the smartforms for which the actual text is hardcoded with couple of dynamic variables (values picked up at runtime) The text maintained is in English, however the smartform is called for portuguese language a