on 11-28-2007 8:46 PM
Hi,
I am trying to execute a third party encrypton program on an application server.I have craeted a OS script to execute the encryption in a series of steps.When I execute this script(compress.cmd) from OS level directly I goes well successfully.However when I created an external commmand in SM69 and try to execute the same script it throws an error message"External program terminated with exit code 128".I am not able to proceed .Please help.
Regards,
Max
sounds like a Windows environment.
try run your script and then check the return code:
compress.cmd
echo %errorlevel%
see what is the result. if it shows you 128, it means the script returns a none 0 code it's just NT command prompt ignores it.
If it returns 0, it indicate that your script may rely on some environment settings that exist in your command prompt window but not active when called by SM69. Try use full path names, and no variables in your script (or a temp script) to see if that works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then as I said previously, it is very posible that this is a environment variable thing.
there are a couple of things you can try:
1) check dev_* files see if there are any error related to this once you run the script in SM69;
2) try generate some verbose output (i.e. echo "compressing now" >> C:\temp\compress.log ) and redirect them to a flat file. and see if the log file is created and what's in it (so you know at which step it failed).
3) as previously suggested, try use full path and not use evnvironment variables.
It depends on what compress tool you are using. Itself may rely on some variable to work (i.e. LIB directory, etc).
try modify your script to add "2> C:\temp\compress.log" (no space between 2 and >).
This will redirect all error messages from the compress command to the log file. after you run it in SM69, check the log file content.
Well, now I'm a little bit confused I though the script works if it does not do compress. Anyways, please clarify for me if possible.
1) is there any other script (your custom scripts, not standard SAP delivered) works in SM69?
2) does this compress.cmd script works without the line that does the compression (let's say remove the C:\TD...compress.... line altogether).
3) if you add "echo script started > c:\temp\compress.log" and run the script from SM69, do you see the c:\temp\compress.log file contain words "script started"?
4) is there any other program named "compress" in your PATH? if you rename your script to comptest.cmd does it run?
Good! that rules out lots of potential issues.
SM69 works, your script name is also not a problem.
It is very likely the problem exists somewhere in the script (I'm still thinking it may because of something like a missing environment variable).
if your script is not too long, try add "echo step 1 completed with rc %errorlevel% >> c:\temp\compress.log" after each real statement.
of course replace the "step 1" with "step 2", "step 3", etc to represent each step of the script.
Then call the script in SM69. See what is the last step it run in the script. You will then know which step of your script is the one causing you grief.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.