- ERP System: Oracle, SAP
- Advisor: MarkView 9.0 and Below
If a cold sync import file contains records which have carriage returns within fields - such as description - the cold sync will fail, even though there are no .bad files in the coldsync export directory from which the date is being imported.
An error message like the one below will be written to the log file:
'ERROR - Unexpected exception happened when process cold sync. java.lang.StringIndexOutOfBoundsException: String index out of range: 0'
The attached Perl script, hcffilter.pl detects lines which do not end in a ' character and replaces the end- of-line carriage return with a space.
To run this script, follow the syntax below:
perl ./hcffilter.pl <import file name> <output file name>
perl ./hcffilter.pl cold-sync-invoiceheadercreate new-cold-sync- invoiceheadercreate
The original import file can then be archived safely and replaced with the modified import file before re- running ColdSync.
Keywords: ColdSync, exception