PDA

View Full Version : ascii file update help!



sapience
08-30-2005, 04:21 AM
my woes with IS 11 continues unabated...

i could never figure out how to use the ascii file update. i'm trying to edit a file that will be installed by the installer.

is either of the following path acceptable?
$PATH($P(bean.absoluteInstallLocation), etc/config.xml)
or
$P(bean.absoluteInstallLocation)/etc/config.xml

bearing in mind i'm installing on windows, does the slashes for the 2nd matter?

anyway, nothing works... and the dearth of debugging/error messages is frustrating...
1. i don't know whether IS can locate the file.
2. i don't know whether my search actions work.

also, i tested on a static file (which can definitely be found), e.g. c:\temp\test.txt and used an Add Line action with End of File as the location. guess what, it always truncates the whole file and adds only that line... way to go!!!

rahall
08-31-2005, 01:45 PM
my woes with IS 11 continues unabated...

i could never figure out how to use the ascii file update. i'm trying to edit a file that will be installed by the installer.

is either of the following path acceptable?
$PATH($P(bean.absoluteInstallLocation), etc/config.xml)
or
$P(bean.absoluteInstallLocation)/etc/config.xml

bearing in mind i'm installing on windows, does the slashes for the 2nd matter?

anyway, nothing works... and the dearth of debugging/error messages is frustrating...
1. i don't know whether IS can locate the file.
2. i don't know whether my search actions work.

also, i tested on a static file (which can definitely be found), e.g. c:\temp\test.txt and used an Add Line action with End of File as the location. guess what, it always truncates the whole file and adds only that line... way to go!!!


I was able to get ASCII file update on windows to work using:

$N($P(absoluteInstallLocation)\Courier\conf\subsystem.properties)

You can also normalize the path specifying a slash ie. / or \

$N($P(absoluteInstallLocation)/Courier/conf/subsystem.properties, /)

Hope this helps,
Aaron

tausifk
08-31-2005, 11:36 PM
hi,

can u post here ur ascii file contents and the ascii file update actions
you have written in sequence? may be after that we might help u..

meanwhile the hint is striking me is, if u r modifying the properties
variable value and variable name then it is pretty straight forward
but if u r trying to replace a line then u will have to search that file
first then replace...

hope it helps

sapience
09-05-2005, 10:23 PM
hi,

can u post here ur ascii file contents and the ascii file update actions
you have written in sequence? may be after that we might help u..

meanwhile the hint is striking me is, if u r modifying the properties
variable value and variable name then it is pretty straight forward
but if u r trying to replace a line then u will have to search that file
first then replace...

hope it helps

i have done all of that... searched for a string, then tried to replace a portion of the line, didn't work, tried to replace the whole line, didn't work. and worse, i don't know where is going wrong...

in the end, wrote my own bean, though not as powerful, but works for me...