Sitemap

Amicuk Programming Answers

File adapter operating system command exit code

2015-10-11   Views:0

Advertisement

Hello, If you call an operating system command in the file adapter, how is the exit code of the command handled? The documentation says nothing about this. If I call 'true', I expect the file adapter to succeed. If I call 'false', I expect the file a

Hello,
If you call an operating system command in the file adapter, how is the exit code of the command handled? The documentation says nothing about this.
If I call 'true', I expect the file adapter to succeed.
If I call 'false', I expect the file adapter to fail.
Hope someone can calrify.
Best regards
/Otto Frost

The replay answer
Advertisement
Hi, Yes, you are rigth, it spawns a subprocess, that runs without control.
In java you use Runtime.exec().
It returns a process.
process.exitValue() returns an int.
The process is already used to terminate the process after timeout I suppose.
You would like to be able to have the fileadapter succeed or fail depending on this exitValue.
Depending on the command you execute, the exit code is different. RTFM on unix.
You would like to define which codes should be treated as success, and which ones that should be treated as failure.
true typically returns 0 and false not 0
However, a comparison command could for example return 0 for equal, -1 if the frist argument is smaller and 1 if the first argument is larger.
For the diff command, Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
Thanks
/Otto

Go to See the other 8 answers

File adapter operating system command exit code

Category:DefaultRelease time:2015-10-11Views:130

Hello, If you call an operating system command in the file adapter, how is the exit code of the command handled? The documentation says nothing about this. If I call 'true', I expect the file adapter to succeed. If I call 'false', I expect the file a[More]

Unzip file using operating system command in file/ftp receiver adapter

Category:DefaultRelease time:2015-10-11Views:130

Hi, I'm wonderdering how to unzip a zip-file in the receiver file/ftp adapter. I know it is possible to do it using the 'Operating system command' feature, but somehow the command I use seems to be ignored! (I'm using SP14, unix). The command I enter[More]

Unable to run a Batch File Operating System Command

Category:DefaultRelease time:2015-10-11Views:130

Using XI 3.0, I am unable to run a Batch File Operating System Command After Message Processing. My Batch file: gpg -se -r BOA3RSKY --armor --passphrase-fd 0 %1 < C:\Progra~1\GNU\GnuPG\gpgin My Command Line (ID scenario) exec "cmd.exe /c C:\Progra[More]

Operating system command in file adaptor

Category:DefaultRelease time:2015-10-11Views:130

Hi, I am doing file to Idoc scenario, can i use the Operating system command in file adaptor to compress the file at FTP server and decompress the file at IE. I don’t know is it possible and if yes then how or is there any other way to handle the big[More]

Operating system command in file receiver adapter

Category:DefaultRelease time:2015-10-11Views:130

Hi, How to use the Run Operating system command after message processing option in the parameters tab of the file receiver adapter. I am working on a scenario wherein a batch file needs to be invoked after the file is written on the file system. So h[More]

File Adapter 7.11 - set operating system command line dynamically

Category:DefaultRelease time:2015-10-11Views:130

Hi, is there any way to set the "Operating System Command Line" in the file adapter as ASMA / dynamic attribute? I need to set  a command line exec depending on some XSL mapping values. thx holgerhi, >>>is there any way to set the "[More]

File Receiver Adapter:Run Operating System COmmand after message Processig:

Category:DefaultRelease time:2015-10-11Views:130

Dear All, I have gone through this link [http://help.sap.com/saphelp_nw2004s/helpdata/EN/e3/94007075cae04f930cc4c034e411e1/content.htm] But i have a problem. In the scenario which we have, File name is DYNAMICALLY GENERATED by a UDF I want to call th[More]

Operating System Command After File Processing in Sender File Adapter

Category:DefaultRelease time:2015-10-11Views:130

Hello guys, actually we have different interfaces, and the client to take all the files from only one directory, for example D:/DPI. Unitl now we had one adapter for every file with the content conversion, so we didn't have problems with that. Now we[More]

Run operating system command for sender File adpter (NFS)

Category:DefaultRelease time:2015-10-11Views:130

Hi All, iam doing a file to RFC scenario, using 'Run operating system command' in sender file adapter to change the file name while archiving (after processing completed). I mention OS command like this: sample_server\scripts\Test\Rename.bat" Rename.[More]

Re: Error while Execute External Operating System Command using T.code SM49

Category:DefaultRelease time:2015-10-11Views:130

Dear Experts, I Have uploaded one .exe file in the application server (eg: sum.exe) and created the OS command in SM69 transaction . And maintained the application server path in the 'operating system command' field in SM69 t.code. Our SAP system, op[More]

Operating  System commands in FTP adapter

Category:DefaultRelease time:2015-10-11Views:130

Hi I have a requirement to use "Operating System Command" option in the Sender/Receiver side File Adapter. And in help.sap.com they have brief notes on this. http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.[More]

Hot
I open 1 session of Firefox 5.0.1 and everything seems to work fine. Then I open a second session of Firefox and most of the time the navigation bar does not show the page that I am on and the back and forward buttons do not work. When this happens, [More]
I got my wife a new Macbook Air, with 10.8 on it. I was going to migrate her stuff from a 10.6 iMac via migration assistant and her Time Machine external drive. But she logged in, creating her username, before I had a chance to do the migration. My u [More]
Hello everyone, Just installed PSE10 on my windows 8 pro machine I got with a scanner.  I am using the organizer and I tried the find>Visual Searches>Search for Duplicate photos but I got photos that were simillar and exact.  I have a lot of exact d [More]
Hi guys, I have a quesion: in KM-Collaboration-roomstructure, if I have a folder A, how can I get its sub folders like A.1,A.1.1,A2. I mean of course  how code can realize: using context folder=(IPcdContext) ictx.loopup(path) ? Please give me some hi [More]
I have an iMac and have been using Adobe reader successfully for sometime. Recently, however, whenever I go to sign a document on Adobe reader The document closes unexpectedly with an error statement. I have already uninstalled and reinstalled Adobe [More]
I wrote following code in my sp: select id into tempflag from table where conditions.... if tempflag is null then insert xx into table else do something else end if; commit; Now let's assume this sp is excuted 2 times at almost same time, 1st transac [More]
My ipad is connected to my wifi at home but safari says "server is not responding" and i am unable to load any internet pages. My mac air has no trouble at all. What can i do? It has worked on other wifi networks before...then two more things to [More]
Hi all, First post in these forums.  I've been using ACR for years and have been using Photoshop CS5 for a few weeks with no problems.  I've now installed ACR 6.1... Here's the problem that is driving me nuts: when I apply a preset to an image, ALL s [More]
Hi experts, i am working on Inbound PO Idoc scenario. I am testing Idoc in WE19 with ORDRSP mesage type. Idoc type:ORDERS05 Process code:ORDR FM:IDOC_INPUT_ORDRSP while trying to create PO it is giving an error 'Purchasing document does not exist' in [More]
The instructor of my OWB class said that OWB's partition exchange loading (PEL) requires all of a table's partitions to be in the same tablespace. This obviously is not a good thing for partitioned tables. Does anyone know if this is true for the cur [More]