<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: executing a UNIX shell script using SM49 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336078#M1396830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the same problem, but I create the SH on the VI editor directly on our AIX.&lt;/P&gt;&lt;P&gt;So, this don't solve my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Sebastian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Dec 2009 21:28:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-14T21:28:22Z</dc:date>
    <item>
      <title>executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336070#M1396822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying all sorts of things to get this to work and I have been un-successful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to run the UNIX script using SM49. the command line that I am using is&lt;/P&gt;&lt;P&gt;/test/directory/bin/testmail.sh &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the script testmail.sh looks like &lt;/P&gt;&lt;P&gt;#!/bin/ksh&lt;/P&gt;&lt;P&gt;/usr/bin/mailx -s testmail &amp;lt;email address&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried all sorts of combinations to run this script&lt;/P&gt;&lt;P&gt;example&lt;/P&gt;&lt;P&gt;sh /test/directory/bin/testmail.sh &lt;/P&gt;&lt;P&gt;/test/directory/bin/testmail.sh %f&lt;/P&gt;&lt;P&gt;/test/directory/bin/testmail.sh %F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 17:11:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336070#M1396822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T17:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336071#M1396823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you getting any error message?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 17:29:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336071#M1396823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T17:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336072#M1396824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't exec external program (No such file or Directory)                                                                                External program terminated with exit code 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 17:32:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336072#M1396824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T17:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336073#M1396825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are sure /test/directory/bin/ exists and the file exists, check if you have permission issues. Can you log onto the operating system and navigate to this directory and execute this shell script? If not, then it is you who do not have access to this directory and the file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 18:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336073#M1396825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T18:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336074#M1396826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not have access to the operating system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the only way I know of to access the operating system to do UNIX commands is thru SM49&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 18:11:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336074#M1396826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T18:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336075#M1396827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So that is probably your problem. Even SM49 will use your user ID to check the permissions. Check with someone in basis who has access and test it through them or get the access and test yourself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 18:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336075#M1396827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T18:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336076#M1396828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;considering authorization issues, you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
    EXPORTING
      commandname                         = 'LIST_DB2DUMP'
      additional_parameters               = l_path
     operatingsystem                      = 'UNIX'
    TABLES
      exec_protocol                       = lt_btcxpm
...
    EXCEPTIONS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to extract information about files on the server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this code to get detailed information for display including the attributes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT lt_btcxpm ASSIGNING &amp;lt;btcxpm&amp;gt;
    WHERE length &amp;gt; 57
      AND ( NOT message+57 CO '. '
            OR  message+57 = '..' )
      AND ( message(1) = 'd' OR
            message(1) = 'l' OR
            message(1) = '-' ).
    l_srvfil-type  = &amp;lt;btcxpm&amp;gt;-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  = &amp;lt;btcxpm&amp;gt;-message+57.
    CONDENSE l_srvfil-file.
    l_srvfil-attri = &amp;lt;btcxpm&amp;gt;-message+1(9).
*    l_srvfil-time = &amp;lt;btcxpm&amp;gt;-message+44(12).
    l_srvfil-size = &amp;lt;btcxpm&amp;gt;-message+32(11).
    APPEND l_srvfil TO lt_srvfil.
  ENDLOOP." at lt_BTCXPM assigning &amp;lt;BTCXPM&amp;gt;.
  pt_srvfil = lt_srvfil.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For the srvfil information I used this structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Clemens Li on Oct 23, 2009 9:16 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 19:16:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336076#M1396828</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-10-23T19:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336077#M1396829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the problem is solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there were special characters in the sheel script taht I did not know about. the UNIX admin had to use VI to edit the file and remove the characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 13:14:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336077#M1396829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-27T13:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336078#M1396830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the same problem, but I create the SH on the VI editor directly on our AIX.&lt;/P&gt;&lt;P&gt;So, this don't solve my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Sebastian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2009 21:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336078#M1396830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-14T21:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336079#M1396831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i created command using sm69 and assign the unix path and file. it is working when the file is having Read, write and execute permission.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for some security reason my administrator not giving the above permission.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible to execute the unix script without permission. if possible then how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Muthuraj.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2009 11:51:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336079#M1396831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-28T11:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336080#M1396832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry, this is unix: No authorization, no way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2009 19:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336080#M1396832</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2009-12-28T19:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: executing a UNIX shell script using SM49</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336081#M1396833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Keep in mind that a Unix/Linux command or a Unix/Linux script has to run in a shell (Korn, Bash, etc).  If the path to your shell is not found, you'll get that failure "No such file or directory".  So if you've confirmed that the script is indeed where it should be and that the permissions are what they should be, you might also have your Unix/Linux team confirm that the shell path is ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On our new RHEL5 servers, we had to put this link out there to resolve the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ln -s /bin/bash /usr/bin/sh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 14:58:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/executing-a-unix-shell-script-using-sm49/m-p/6336081#M1396833</guid>
      <dc:creator>richard_howard</dc:creator>
      <dc:date>2011-07-07T14:58:26Z</dc:date>
    </item>
  </channel>
</rss>

