<?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 Using Unix date command in SM69 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842683#M1884830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use the Unix command DATE in SM69 and pipe the output in a file in a specific directory.&lt;/P&gt;&lt;P&gt;For example the unix command would look like this: date &amp;gt; /usr/sap/sst_data/APD/receive/ppk_kp8/test.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried several variants to enter the command parameters in SM69 but no one works fine.&lt;/P&gt;&lt;P&gt;Entering the whole command line in the first line in SM69 (operating system command) does not work too.&lt;/P&gt;&lt;P&gt;It seems that the system has a problem with the pipe command '&amp;gt;' to put the output in a file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I receive the following error:&lt;/P&gt;&lt;P&gt;-------------------------------------------------------&lt;/P&gt;&lt;P&gt;date: extra operand `/usr/sap/sst_data/APD/receive/ppk_kp8/test.txt'&lt;/P&gt;&lt;P&gt;Try `date --help' for more information.&lt;/P&gt;&lt;P&gt;External program terminated with exit code 1&lt;/P&gt;&lt;P&gt;-------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I would need is to create a file in a specific directory containing the actual timestamp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any proposal what I did wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks and best regards&lt;/P&gt;&lt;P&gt;Günter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 15:03:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-02-09T15:03:45Z</dc:date>
    <item>
      <title>Using Unix date command in SM69</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842683#M1884830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use the Unix command DATE in SM69 and pipe the output in a file in a specific directory.&lt;/P&gt;&lt;P&gt;For example the unix command would look like this: date &amp;gt; /usr/sap/sst_data/APD/receive/ppk_kp8/test.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried several variants to enter the command parameters in SM69 but no one works fine.&lt;/P&gt;&lt;P&gt;Entering the whole command line in the first line in SM69 (operating system command) does not work too.&lt;/P&gt;&lt;P&gt;It seems that the system has a problem with the pipe command '&amp;gt;' to put the output in a file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I receive the following error:&lt;/P&gt;&lt;P&gt;-------------------------------------------------------&lt;/P&gt;&lt;P&gt;date: extra operand `/usr/sap/sst_data/APD/receive/ppk_kp8/test.txt'&lt;/P&gt;&lt;P&gt;Try `date --help' for more information.&lt;/P&gt;&lt;P&gt;External program terminated with exit code 1&lt;/P&gt;&lt;P&gt;-------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I would need is to create a file in a specific directory containing the actual timestamp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any proposal what I did wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks and best regards&lt;/P&gt;&lt;P&gt;Günter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 15:03:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842683#M1884830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-09T15:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using Unix date command in SM69</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842684#M1884831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Directories for SAP is in a different namespace form the oper.system. Try AL11 too see first if the file you want to right exists and has the same name as in the command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i help. Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 15:36:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842684#M1884831</guid>
      <dc:creator>miko2</dc:creator>
      <dc:date>2015-02-09T15:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using Unix date command in SM69</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842685#M1884832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Günther,&lt;/P&gt;&lt;P&gt;this won't work since the redirect operator is not a parameter but a shell operator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SM69 checks rather thoroughly, that to any given command, only listed parameters are provided.&lt;/P&gt;&lt;P&gt;If you need to redirect the output of your date command, you'll have to work around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. ask your os-team to create a small commandfile (script) to wrap your date command and provides the output redirection as parameter. Make it executable (chmod).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can create an SM69 command with the pathname of that script and use a path as parameter on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should do the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards - Jörg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW: the pipe operator is this | and it reroutes the ouput of one command as input for a second one. Not to be confused with the&amp;nbsp; redirectors &amp;gt; for stdout and &amp;gt;&amp;gt; for stderr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842685#M1884832</guid>
      <dc:creator>jrg_wulf</dc:creator>
      <dc:date>2015-02-09T16:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using Unix date command in SM69</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842686#M1884833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh and another one.&lt;/P&gt;&lt;P&gt;Why do you bother with OS-command date?&lt;/P&gt;&lt;P&gt;You can retreive date and time as easily from SAP&amp;nbsp; with get time, prepare it like whatever you need and than just output to file system, using open dataset and transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR - Jörg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 18:13:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842686#M1884833</guid>
      <dc:creator>jrg_wulf</dc:creator>
      <dc:date>2015-02-09T18:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using Unix date command in SM69</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842687#M1884834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jörg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot for your explanation!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for my request is that we currently use the RFC_REMOTE_PIPE to execute some OS commands for creating, deleting and moving trigger files (for a prpcess chain) on OS level which should contain the timestamp.&lt;/P&gt;&lt;P&gt;Now we want to substitute the RFC_REMOTE_PIPE function and thats why I am searching for another solution to delet, create or move this little file and I tried to use OS commands in SM69 because I wanted to avoid abap programming.&lt;/P&gt;&lt;P&gt;So basically you helped already because now i know that it will not work to use '&amp;gt;' in SM69.&lt;/P&gt;&lt;P&gt;I will have a look at your proposal with using 'get time', open dataset,......but I am not good in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you know any other workaround your advice is really welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway.....many thanks for your input so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;Günter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 06:36:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842687#M1884834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-10T06:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using Unix date command in SM69</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842688#M1884835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Günter,&lt;/P&gt;&lt;P&gt;regarding workaround - what about my earlier script suggestion?&lt;/P&gt;&lt;P&gt;It's easy enough to build, can be distributed or used on a share and gives the flexibility you need.&lt;/P&gt;&lt;P&gt;Surely, you have one or the other unix specialist capable of providing&amp;nbsp; a two-line-script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all else fails, there's still the famed system call, where you can inout any actual command line.&lt;/P&gt;&lt;P&gt;With that even your redirection operator would work as intended.&lt;/P&gt;&lt;P&gt;Although i have to admit, it won't work on many systems due to restrictions and is definitely not a favourite of security concerned responsibles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR - Jörg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 09:08:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-unix-date-command-in-sm69/m-p/10842688#M1884835</guid>
      <dc:creator>jrg_wulf</dc:creator>
      <dc:date>2015-02-10T09:08:36Z</dc:date>
    </item>
  </channel>
</rss>

