Shell script using CONCSUB utility

I'm trying to run a shell script using CONCSUB. I've checked several documents on metalink related to CONCSUB but didn't find an example to run a shell scripts using CONCSUB. Can someone post an example please. I would really appreciate it.

From Metalink note 240718.1
For a concurrent program defined via "Define Concurrent Program" form
but submitted via CONCSUB, the following parameters can be used by CONCSUB :
PRINTER=<printer name>
NUMBER_OF_COPIES=<number of reports to be printed>
PRINT_STYLE=<printer style to be used>
LANGUAGE=<language to be used>
Sample:
CONCSUB apps/apps SYSADMIN "System Administrator" SYSADMIN \
WAIT=Y CONCURRENT FND FNDSCARU LANGUAGE=FRENCH \
PRINTER=hplj4l NUMBER_OF_COPIES=1 \
PRINT_STYLE=LANDSCAPE
Note: the others parameters which can be used with CONCSUB
are described in the "System Administration User Guide" as follow :
$ CONCSUB <APPS username>/<APPS password> \
<responsibility application short name> \
<responsibility name> \
<username> \
[WAIT=N|Y|<n seconds>] \
CONCURRENT \
<program application short name> \
<program name> \
[PROGRAM_NAME=<description>] \
[REPEAT_TIME=<resubmission time>] \
[REPEAT_INTERVAL= <number>] \
[REPEAT_INTERVAL_UNIT=< resubmission unit>] \
[REPEAT_INTERVAL_TYPE=< resubmission type>] \
[REPEAT_END=<resubmission end date and time>] \
[START=<date>] \
[IMPLICIT=< type of concurrent request> \
[<parameter 1> ... <parameter n>]
For parameters that follow the CONCURRENT parameter and include
spaces, enclose the parameter argument in double quotes, then again in
single quotes.

Similar Messages

  • Help Read:shell script using CONCSUB utility

    I have a shell script that will re registered as a conc prgm and then this shell script will inturn call another CONC PGM which is a report. Due to some secuirty issues we have to do this way,
    But my problem is the Printer parameters that are passed on to the shell script need to be passed to the conc pgm which generates the report..
    Plzz help me .. this is the code that calls the CONC PGM , which is a report
    NMHR_REQUEST_ID=`echo $FCP_LOGIN | cut -d"/" -f2 |
    CONCSUB APPS "$RESP_APPL_NAME" "$P_RESP_NAME" $USERNAME WAIT=Y CONCURRENT $APPL_NAME '"TAX_EXEMPT"' "$P_LOCATION"` PRINTER='"$VAL_PRINTER"' NUMBER_OF_COPIES='"$VAL_NOC"' PRINT_STYLE='"$VAL_PRINT_STYLE"' LANGUAGE='"$VAL_LANGUAGE"'
    Plzz help. if there is anything wrong..
    Thanks in advance..

    Hi,
    Following is the sample for using printer setting.
    CONCSUB apps/apps
    SYSADMIN "System Administrator" SYSADMIN
    WAIT=Y
    CONCURRENT FND FNDSCARU
    LANGUAGE=FRENCH
    PRINTER=hplj4l
    NUMBER_OF_COPIES=1
    PRINT_STYLE=LANDSCAPE
    What is the error message?
    Regards
    Prashant Pathak

  • Execute unix shell script using DBMS_SCHEDULER

    Hi,
    I am trying run to shell script using DBMS_SCHEDULER.
    1) I check..nobody user exist on my HP-UX.
    2) I check externaljob.ora on (10.2.0.2.0) also..It has an entry..
    run_user = nobody
    run_group = nobody
    3) I created job successfully and enabled it.
    begin
    DBMS_SCHEDULER.CREATE_JOB
    job_name => 'test_unix_script',
    job_type => 'EXECUTABLE',
    job_action => '/tmp/test.ksh',
    start_date => '08-NOV-2006 04:45:16 PM',
    job_class => 'DEFAULT_JOB_CLASS',
    enabled => TRUE,
    auto_drop => FALSE,
    comments => 'test_unix_script.'
    END;
    EXEC DBMS_SCHEDULER.enable('test_unix_script');
    4) test.ksh script had -r-xr-xr-x permission.
    5) When I checking dba_scheduler_job_run_details view, ADDITIONAL_INFO column display following error messgae.
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    Did I miss anything?
    Any help will be appreciated!!
    Thanks..

    My /tmp/test.ksh trying to find database status.
    . ~oracle/.profile > /dev/null
    db_status=`eval sqlplus -s 'system/passwd@DEV' << EOF
    set pagesize 0 feedback off verify off heading off echo off
    select status from v\\$instance;
    exit
    EOF`
    echo $db_status > /tmp/db_status_out

  • Issue with calling Shell Script using DBMS_SCHEDULER

    Hi All,
    I am executing a shell script using DBMS_SCHEDULER from APEX web page. Execution part is working fine without any issues.
    In my shell script file (abc.sh) I have few oracle sql procedure calls which connects back to same database and that SQL call is not executing some reason, it not giving any errors.
    Inside my shell script code looks like this.
    sqlplus -silent $USER/$PASSCODE@$SCONNECT > /dev/null <<END
    set pagesize 0 feedback off verify off heading off serveroutput on
    echo off linesize 1000
    WHENEVER SQLERROR EXIT 9
    BEGIN     
    dbms_output.enable(1000000);
    do_enable_cons();
    dbms_output.disable;
    END;
    spool off;
    exit;
    END
    When I run this shell script file from backend it works fine now issues.
    Is there any restrictions in executing sql code using DBMS_SCHEDULER? Any ones help is much appreciated.
    -Regards

    james. wrote:
    Thanks you sb and Sybrand . It is problem with environment variables. After running .bash_profile in the beginning of the shell script, it is working fine.
    One issue is when I check the process it is showing two entries with two different process id's.
    The command I used
    ps -ef | grep <my script> is COPY & PASTE broken for you?
    any reason why you did not show us EXACTLY was produced by OS command above?
    >
    Is it something wrong with my code or is it normal? Is it really executing two times ?
    -Regards
    bcm@bcm-laptop:~$ sqlplus user1/user1
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 20 15:14:15 2012
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    15:14:15 SQL> !ps -ef | grep sqlplus
    bcm      24577  1903  1 15:14 pts/0    00:00:00 sqlplus           
    bcm      24579 24577  0 15:14 pts/0    00:00:00 /bin/bash -c ps -ef | grep sqlplus
    bcm      24581 24579  0 15:14 pts/0    00:00:00 grep sqlplus
    15:14:23 SQL> how many different copies of "sqlplus" running on my laptop based upon actual output above?

  • Call a shell script using OA framework page.

    Dear all,
    I am new to OA Framework.There is a requirement in which I have to call a shell script using a Web page using OA framework.Can anyone throw light on how can we do this?
    Regards

    Hi,
    You can call shell script from Java and hence from OAF, following is a piece of code
    try
    String execString = "ls -all"
    Runtime r t = Runtime.getRuntime();
    Process proc = rt.exec(execString);
    /* handle you process from here..
    outputstreams, inputStreams and such
    catch (Exception e)
    e.printStackTrace()
    I also don't know Java much but to run shell script you need an object runtime class, I searched it on goolge for you.
    Regards,
    Reetesh Sharma

  • Run shell script using Host Command

    How do I run Unix Shell Script using Host command?
    Please help me......

    Are you running the shell script from the same box as the forms are deployed in? If not, then HOST call will try to execute on the machine where the forms are hosted(App server).

  • Shell Script + GoldenGate (Logdump utility)

    Can anyone help me in this?
    As we know in oracle goldengate using Logdump utility we can retrieve the previous RBA by these commands.
    open <trail file>
    pos <current RBA>
    sfh prev
    it gives previous RBA
    Now I want to extract this RBA using shell script. And I want to save this RBA for the further use.
    Can anybody help me out?

    Pass in the RBA as input. Shift arguments, or prompt for user input.
    #!/bin/ksh
    ./logdump << EOF
    open ./dirdat/rt000016
    pos 0
    n
    EOF
    [oracle@oel32 ggs]$ chmod 744 dolog.ksh
    [oracle@oel32 ggs]$ dolog.ksh
    Oracle GoldenGate Log File Dump Utility
    Version 11.1.1.0.0 Build 078
    Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
    Logdump 253 >Current LogTrail is /u01/app/ggs/dirdat/rt000016
    Logdump 254 >Reading forward from RBA 0
    Logdump 255 >
    2011/02/16 21:39:05.787.043 FileHeader Len 1557 RBA 0
    Name: FileHeader
    3000 0416 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0...0...GG..TL..1...
    0002 3200 0004 2000 0000 3300 0008 02f1 c2a6 6f00 | ..2... ...3.......o.
    7ea3 3400 0021 001f 7572 693a 6f65 6c33 323a 6163 | ~.4..!..uri:oel32:ac
    6d65 3a63 6f6d 3a3a 7530 313a 6170 703a 6767 7335 | me:com::u01:app:ggs5
    0002 7535 0000 2100 1f75 7269 3a6f 656c 3332 3a61 | ..u5..!..uri:oel32:a
    636d 653a 636f 6d3a 3a75 3031 3a61 7070 3a67 6773 | cme:com::u01:app:ggs
    3500 0021 001f 7572 693a 6f65 6c33 323a 6163 6d65 | 5..!..uri:oel32:acme
    Logdump 256 >[oracle@oel32 ggs]$

  • Parameter  to shell script using Runtime.exec(string)

    Hi all, ( Speciall hi to dheeraj tak )
    Briefly : How do i pass an arguement to a non - java executible being called using Runtime.exec.
    In detail : i am using Runtime.exec to call a shell script : The code is as follows:
    String callAndArgs[] = {"/home/tom/jakarta-tomcat-4.1.24/webapps/dash/script.sh"};
    try {
    Runtime rt = Runtime.getRuntime();
    Process child = rt.exec(callAndArgs);
    This works properly & calls the shell script which in turn invokes some other executible (c file).
    $HOME/midi/test/build/bin/<C-EXECUTIBLE>
    Here i am specifying the name (say hello.exe ) . So far so good.
    I want to make this happen dynamiclaly. so i need to pass the name of the executible as a parameter to the script.
    To pass a parameter i hav to change the string to :-
    String callAndArgs[] = {"/home/tom/jakarta-tomcat-4.1.24/webapps/dash/script.sh <C-EXECUTIBLE HERE>"};
    and the script to
    $HOME/midi/test/build/bin/$1 --- where $1 refers to argument 1. (C-EXECUTIBLE AGAIN).
    This is giving an IO - Execption. Plz help
    Code will be very helpful.
    Thanx in advance

    some 1 plz tell me the difference :-
    This is the documentation of Runtime.exec that i found :-
    1> exec
    public Process exec(String command) throws IOException
    Executes the specified string command in a separate process.
    The command argument is parsed into tokens and then executed as a command in a separate process. This method has exactly the same effect as exec(command, null).
    Parameters:
    command - a specified system command
    Complete refernce says : Process (String progName) ----- Executes a program specified by programname as a seperate process.
    2> exec
    public Process exec(String cmdarray[]) throws IOException
    Executes the specified command and arguments in a separate process.
    The command specified by the tokens in cmdarray is executed as a command in a separate process. This has exactly the same effect as exec(cmdarray, null).
    Parameters:
    cmdarray - array containing the command to call and its arguments.
    Complete reference says : Process exec(String comLineArray[]) ---- Executes the command line specified bythe string in comLineArray as a seperate process.
    This means that there is provision 4 command line arguments...
    how do u use it then????????????????????????????

  • How to invoke a shell script using java

    Hi
    I am trying to invoke a shell script(unix) using java and I have tryied to load the shell using exec(cmd) and then trying to execute the shell.
    But it is not working.
    Can you please guide me on this matter.

    Hi I am facing the same problem
    I want to call a shell script through java in linux system of course.
    I am using the following section of code .
    public class LinuxServer {
         public static void main(String args[]){
              Runtime r = Runtime.getRuntime(); //get runtime information
              try
              Process Child = r.exec("/usr/bin/ksh") ; //execute command
              BufferedWriter outCommand = new BufferedWriter(new OutputStreamWriter(Child.getOutputStream()));
              outCommand.write("/opt/jboss-4.0.0/test1.sh");
              outCommand.flush();
              try
              Child.waitFor(); //wait for command to complete
              catch(InterruptedException e)
              { //handle waitFor failure
              System.out.println("ERROR: waitFor failure");
              System.exit(10); //exit application with exit code 10
              catch(IOException e)
              { //handle exec failure
              System.out.println("ERROR: exec failure"+e);
              System.exit(11); //exit application with exit code 11
    But when I am compiling and running this script in the linux system,
    Its giving the following error.
    Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: LinuxServer
    at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
    at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)
    at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
    at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
    at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
    at JvThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
    at JvRunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
    at __gcj_personality_v0 (/opt/jboss-4.0.0/java.version=1.4.2)
    at __libc_start_main (/lib/tls/libc-2.3.4.so)
    at JvRegisterClasses (/opt/jboss-4.0.0/java.version=1.4.2)
    Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in [file:/usr/local/staf/lib/JSTAF.jar, file:/usr/local/staf/samples/demo/STAFDemo.jar, file:/home/db2inst4/sandip/staf/lib/JSTAF.jar, file:/home/db2inst4/sandip/staf/samples/demo/STAFDemo.jar, file:/usr/share/java/libgcj-3.4.3.jar, file:./, core:/]
    at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
    at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
    at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.5.0.0)
    at JvFindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
    at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
    at JvBytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.5.0.0)
    at JvVerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.5.0.0)
    at JvPrepareClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
    at JvWaitForState(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)
    at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
    at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)
    ...9 more
    Pls help

  • How to run shell script using External Process in Process Flow?

    Hi,
    We can run external process using Process flow.
    I would like to run shell script as external process in Process flow.
    Could any one please explain it?
    Thanks and regards
    Gowtham Sen.

    HI,
    As you said I tried this case. I got the following error. The script is running successfully while I tested at unix command prompt.
    The error is as follows..
    tarting Execution PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: wc: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Sep 29 22:57:39 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    Completing Task PFPS_SMPL_RUNSHELL
    Completing Execution PFPS_SMPL_RUNSHELL
    My scenario is---
    I am trying to return a file name from one shell script. I created a external process for that. After completion of this process, I am running another script which takes that file name and trying to create a external table. The both scripts are runnning successfully. But while I am trying to run using process flow, its not coming.
    And I am not getting the way to catch the output of external process and pass it as parameter as another external process.
    Any suggestions are welcome.
    Thanks and regards
    Gowtham Sen.

  • Prepend 2 lines to an existing shell script using java

    Hi:
    I have a shell script such as
    #!/bin/sh
    #author ...
    #goal ...
    set CMDARGS = ...
    Now, I need to add 2 lines to this file before the set command so that the script looks like
    #!/bin/sh
    #author ...
    #goal ...
    Line 1
    Line 2
    set CMDARGS = ...
    Essentially, Line 1 will be the first line of the script after the comments. How can I do this using File IO in java 1.5?
    Thanks.

    There no special I/O methods to insert lines into the middle of a file.
    I would do the obvious:
    1. Read from a BufferedReader
    2. Open a temporary file and write to a BufferedWriter,
    inserting the new lines where they should go.
    3. Delete the original file and rename the new one to take its place.

  • Error executing shell script using dbms_scheduler

    I have a job running which executes a shell script,which fails with following error :
    SQL> SELECT additional_info
    2 FROM user_scheduler_job_run_details
    3 WHERE log_date = (SELECT MAX (log_date)
    4 FROM user_scheduler_job_run_details);
    ADDITIONAL_INFO
    ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
    STANDARD_ERROR="mkdir: Failed to make directory "/export/home/bwsolaris/abc"; Permission denied"
    This are contents of my shell script
    #!/bin/ksh
    /bin/mkdir /export/home/bwsolaris/abc
    Can anyone suggest me some way out of it?
    Thanks in advance!!!

    Does oracle still creates a user nobody"nobody" is a "standard" Unix/Linux lowly privileged user, which is used by DBMS_SCHEDULER by default.
    You should change permissions on /export/home/bwsolaris, e.g.
    $ chmod 777 /export/home/bwsolaris
    or use a different directory, where everyone has access, for example /tmp.
    Or take a look at Metalink Note:391820.1 - Scheduled Job Running Shell Script Fails With ORA-27369

  • Executing shell script using OSLinetoken fetchlet

    Hii,
    I do have a requirement. I need to use a shell script in the OSLineToken fetchlet. In response metric i will be checking whether the directory exists or not on the server. In order to check the existence of the directory, i have created a shell script. But how can i relate its result with the Response metric? The shell script is as follows:
    Shell Script:
    if test -d $1 ; then
    echo "DIR exist"
    else
    echo "false"
    fi
    The Response metric for the same will be:
    <QueryDescriptor FETCHLET_ID="OSLineToken">
         <Property NAME="command" SCOPE="GLOBAL">
              sh {dir_name where the shell script is uploaded}/{shell script file name} {dir_name_parameter} </Property>
         <Property NAME="startsWith" SCOPE="GLOBAL">em_result=</Property>
         <Property NAME="delimiter" SCOPE="GLOBAL">|</Property>
    </QueryDescriptor>
    Please suggest what is the use of em_result here?
    once the existence of the directory is checked, if it up then i need to call another shell script in order concatenate the contents of all the files with extension .log(this will be the parameter of shell script). Get the output from shell script and display it into custom management plug-in. As i am using cat *.log>>consolidatefile command to concatenate the data, i need to read consolidatefile file from the server and return this concatenated file data into plug-in. Again, how can i read the content of consolidatefile file in EMF? I will be creating another matric for this purpose say "read_content". the querydesciptor of the same will be as follows:
    <QueryDescriptor FETCHLET_ID="OSLineToken">
         <Property NAME="command" SCOPE="GLOBAL">
              sh {dir_name where the shell script is uploaded}/{shell script file name} {dir_name_parameter} {extension of the files to concatenated} </Property>
         <Property NAME="startsWith" SCOPE="GLOBAL">em_result=</Property>
         <Property NAME="delimiter" SCOPE="GLOBAL">|</Property>
    </QueryDescriptor>
    I am not sure which all properties to be used in this case..I have seen multiple sample files some of them uses perbin, scriptsdir but some of them does not..The related pdf also does not say anyhting about such kind of properties. Please suggest.
    I hope the explaination of the problem is not so cumbersome. Please let me know if you have any query to understand.
    Thanks,
    AS

    If you notice, localScriptsDir is a directory within scriptsDir. If you package your plug-in up and deploy it through the UI, any scripts you create will go into %scriptsDir%/emx/<target_type>. So localScriptsDir just specifies that directory for you. You don't need it but then in the command paramater you'll have something like:
    sh %scriptsDir%/emx/yourtargettype/yourscript...
    So whether you specify it in the command or another property (localScriptsDir) doesn't really matter.
    You can create your own properties in the QueryDescriptor. Just make sure you have the correct scope specified and it should be fine (options for scope are described in the Enterprise Manager DTD section of the Extensibility Guide).
    Metric collection isn't really meant for dynamic specification of input parameters. I can think of a few solutions:
    1) Create a target instance for each log directory. When you create the instance, the directory is specified. If you need to monitor a different directory, you can just create another instance. Upside is that it's flexible and scalable, and also, when you get an error you'll know exactly which directory it is based on which instance throws the error. Downside is that you have to have a separate instance for each directory.
    2) If the log directories are well known and finite (and won't change names), hardcode them into the target metadata. Have a different metric collect for each log directory, so you'll have as many metrics as log directories you want to monitor. Even if the names of the directories are different, you can use instance properties to map them, so if you know there will always be 5 log directories you want to monitor, you can have 5 instance properties to map the names into the metrics, although this won't work if you don't have the same number each time. Upside is that there is only a single target instance. Downside is that it's not as flexible.
    3) Use a job rather than a target type to find out this information. You could create a new job type which scans the logs for information and have the directory as an input parameter to the job. You could have this job on a repeating schedule to duplicate the effect you are trying to get out of creating a target type. The upside is that you can start the job whenever you want from the UI and specify exactly which directory whenever you run it. The downside is that the job system is centered on the OMS rather than the agent, so every time it runs it will have to contact the agent to do the work. In the case of the target type, the agent acts autonomously without contact from the OMS.
    There are probably other options, but these are the quick ones off the top of my head.
    Chris

  • Can i invoke Unix Shell Script using JSP or Java

    Hi
    I am working on developing web application .In this application user will upload a file and this file will be stored on server .once the file is saved i have to invoke shell script which triggers the informatica process to read the file content.
    Can some please assist me on this. If any one have pseudo code for this it will be of great help
    Thanks

    This article has example code and explains how to use it.
    You should read the entire article first.
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Executing a UNIX shell script using SM49

    I have been trying all sorts of things to get this to work and I have been un-successful
    I am trying to run the UNIX script using SM49. the command line that I am using is
    /test/directory/bin/testmail.sh
    the script testmail.sh looks like
    #!/bin/ksh
    /usr/bin/mailx -s testmail <email address>
    I have tried all sorts of combinations to run this script
    example
    sh /test/directory/bin/testmail.sh
    /test/directory/bin/testmail.sh %f
    /test/directory/bin/testmail.sh %F
    does anyone have any suggestions on how to get this to run successfully. once I get this to run successfully in SM49, I am going to try it in the intregration builder of my PI process.

    Hi,
    considering authorization issues, you can use
    CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
        EXPORTING
          commandname                         = 'LIST_DB2DUMP'
          additional_parameters               = l_path
         operatingsystem                      = 'UNIX'
        TABLES
          exec_protocol                       = lt_btcxpm
        EXCEPTIONS
    to extract information about files on the server
    I used this code to get detailed information for display including the attributes
    LOOP AT lt_btcxpm ASSIGNING <btcxpm>
        WHERE length > 57
          AND ( NOT message+57 CO '. '
                OR  message+57 = '..' )
          AND ( message(1) = 'd' OR
                message(1) = 'l' OR
                message(1) = '-' ).
        l_srvfil-type  = <btcxpm>-message(1).
        IF l_srvfil-type  = '-'.
          l_srvfil-type = 'F'.
        ENDIF." l_srvfil-type  = '-'.
        TRANSLATE l_srvfil-type TO UPPER CASE.               "#EC TRANSLANG
        l_srvfil-file  = <btcxpm>-message+57.
        CONDENSE l_srvfil-file.
        l_srvfil-attri = <btcxpm>-message+1(9).
    *    l_srvfil-time = <btcxpm>-message+44(12).
        l_srvfil-size = <btcxpm>-message+32(11).
        APPEND l_srvfil TO lt_srvfil.
      ENDLOOP." at lt_BTCXPM assigning <BTCXPM>.
      pt_srvfil = lt_srvfil.
    For the srvfil information I used this structure
    BEGIN OF typ_srvfil,
      %_box  TYPE flag,                                         "#EC *
      type   TYPE char01,
      attri  TYPE isp_rel,
      file   TYPE file,
      name   TYPE file,
      size   TYPE sytleng,
      owner  TYPE sy-uname,
      mod_date TYPE sydatum,
      mod_time TYPE syuzeit,
      END OF typ_srvfil,
    I do not remember exactly how the attribute information is resolved. In Unix all file system authorizations can be set as for the user, the group or for all and it can be read, write, execute granted. If you are no unix expert, ask one or google/wiki for some details.
    I wrote a program for navigation, display, and some more functions on the file system which is too big to post here and is not fully system-independent. Not perfect but useful and more than 5 years old. Contact me by mail if you want it.
    Regards,
    Clemens
    Edited by: Clemens Li on Oct 23, 2009 9:16 PM

Maybe you are looking for