on 04-15-2010 9:05 AM
hello,
we have following scenario -> proxy to file
before appending to the file, it should be copied/renamed to a "tmp" file
xi should then append to that tmp file and copy/rename the file back to the normal name
I tried it with "Run operating system command before message processing" but
it's not working
anybody has an example on how to use those settings before/after message processing ?
regards,
michel
hello,
another question, anybody knows with which user xi is trying to execute the os command ?
we receive following error 'Error when executing OS command', nothing more
regards,
michel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michel,
little confused,
1) before message processing do there any file exists?
2) why should we change file name to 'tmp' and append data to that and again rename that file ?
con't we directly proceed in append mode with file name?
When we use single command say for example cp or mv (copy or move) the commands then
eg: cp %F /var/opt/data/outbound/Test/Dummy.txt
when we club commands together or try to redirect the outputs of commands
eg: cp %F /var/opt/data/outbound/Test/Dummy.txt & mv %F /var/opt/data/outbound/Test/Dummy.txt
or
cp %F /var/opt/data/outbound/Test/Dummy.txt
mv %F /var/opt/data/outbound/Test/Dummy.txt
Include all ur command in one file and call that file in the OS parameter
Regards,
Pradeep A.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pradeep,
the file should exist and should be copied first to make sure that when
the other system picks up the file, the append is done correctly
the append should be done on that copied file, later the tmp file should be copied to the normal file
the script is ok when we run it on the os, but not when called via xi
we can see in the rwb log that the script is called, but it gives and error
unfortunately we can't see the exact error, just a small message
any idea's where we could find such a log ?
Regards,
Michel
Hi,
You can use redirectional operator ">>" provided as one of the operators in DOS to create one error file on your application server in your script file to create a log of execution of each command in your file for example :
copy d:ftpfile.txt G:PIftpfile.txt >> G:PIerror.txt
The above command would create a file error,txt on the application server which would contain the log of the copy command as to whether it was succesfully executed/ error in case there was some problem when copying.
In your case what you can do is to use redirectional operator ">>" after each line of your code and redirect the output of your command to error text file to see where the problem is.
[Michael's Blog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5814] [original link is broken] [original link is broken] [original link is broken]; would be helpful.
Hope this helps !!
Regards,
Amit
Hello,
We found out what the problem was.
It seems that you have to create a command that calls the script.
So this works now, but, XI doesn't wait until the script is finished on the os.
It only calls the command and returns immediately to continue.
Does anybody know if it's possible that xi waits until the command is finished ?
Regards,
Michel
Hi André,
it's on an as400 operating system
so, we created a script that renames the file
this works when we run it on the as400 itself but not when
we call the command via xi
any idea's why this doesn't work ?
regards,
Michel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Check the Write option on Processing tab. Use Temporary file option instead of Directly.
you Give the file name *.tmp .
BR,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michel,
with "Run operating system command before message processing" you can call a script on your server.
The script can check if there is a file, can rename it, etc.
Cheers,
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.