Hi,
I have a requirement to convert one special character("") to empty (Need to drop this character when encountered).The sequence of keys to generate the special character is:CTRL + Shift +6.
I have used the convert function as
Convert("","",lnk_db_xfm_po_part_dimension.NM_PART).
But the transformer is throwing a compilation error
Property value cannot contain UniVerse mark characters.
Property name is: Value
Invalid data is : //
// Generated file to implement the V0S17_CopyOfCopyOfDRD5558_ex_OTO_XFM_PO_PART_DIMENSION transform operator.
//
// define our input/output link names
inputname 0 lnk_db_xfm_po_part_dimension;
outputname 0 lnk_xfm_ds_po_part_dimension;
initialize {
// define our row rejected variable
int8 RowRejected0;
// define our null set variable
int8 NullSetVar0;
// declare our intermediate variables for this section
string InterVar0_0;
string InterVar0_1;
string InterVar0_2;
// initialise constant values which require conversion
InterVar0_0 = "1845561";
InterVar0_1 = "
";
InterVar0_2 = "";
}
mainloop {
// initialise our row rejected variable
RowRejected0 = 1;
// evaluate constraint and columns for link: lnk_xfm_ds_po_part_dimension
if ((trimc_string(lnk_db_xfm_po_part_dimension.ID_PART) == InterVar0_0))
{
lnk_xfm_ds_po_part_dimension.NM_PART = replace_substring(InterVar0_1 , InterVar0_2 , lnk_db_xfm_po_part_dimension.NM_PART);
writerecord 0;
RowRejected0 = 0;
}
}
finish {
}
Will replace with: //
// Generated file to implement the V0S17_CopyOfCopyOfDRD5558_ex_OTO_XFM_PO_PART_DIMENSION transform operator.
//
// define our input/output link names
inputname 0 lnk_db_xfm_po_part_dimension;
outputname 0 lnk_xfm_ds_po_part_dimension;
initialize {
// define our row rejected variable
int8 RowRejected0;
// define our null set variable
int8 NullSetVar0;
// declare our intermediate variables for this section
string InterVar0_0;
string InterVar0_1;
string InterVar0_2;
// initialise constant values which require conversion
InterVar0_0 = "1845561";
InterVar0_1 = "*";
InterVar0_2 = "";
}
mainloop {
// initialise our row rejected variable
RowRejected0 = 1;
// evaluate constraint and columns for link: lnk_xfm_ds_po_part_dimension
if ((trimc_string(lnk_db_xfm_po_part_dimension.ID_PART) == InterVar0_0))
{
lnk_xfm_ds_po_part_dimension.NM_PART = replace_substring(InterVar0_1 , InterVar0_2 , lnk_db_xfm_po_part_dimension.NM_PART);
writerecord 0;
RowRejected0 = 0;
}
}
finish {
}
Property value cannot contain UniVerse mark characters.
Property name is: Derivation
Invalid data is : Convert("
","",lnk_db_xfm_po_part_dimension.NM_PART)
Will replace with: Convert("*","",lnk_db_xfm_po_part_dimension.NM_PART)
Property value cannot contain UniVerse mark characters.
Property name is: ParsedDerivation
Invalid data is : Convert("
", "", lnk_db_xfm_po_part_dimension.NM_PART)
Will replace with: Convert("*", "", lnk_db_xfm_po_part_dimension.NM_PART)
Can anyone please suggest me how to achieve this.
Thanks in advance
Convert Special Character Issue
Moderators: chulett, rschirm, roy
Hi,
Thanks for your reply.
To be more specific I am creating XML file and handling the reserved characters in the XML Output stage. But when the target side tried to use the XML file for their process they got the following error
ABCDE.xml: Loader is throwing errors due to invalid XML character 0x1e
Thu May 27 10:44:53 CDT 2010,Error in processing file /c/abcde.20100521-171128.xml:org.xml.sax.SAXException: **Parsing Fatal Error **
Line: 1
URI: null
Message: An invalid XML character (Unicode: 0x1e) was found in the element content of the document.
Thu May 27 10:44:53 CDT 2010,Exception during dataload task [ABCDE] :com.prosrm.taskmanager.ImException: com.prosrm.common.OperationFailedException: org.xml.sax.SAXException: **Parsing Fatal Error **
So when I looked at the source data I see a non-printable character in one of the fields which caused this issue and they recommended to use CTRL + Shift +6 sequence of keys to generate the special character and drop this character when encountered.
Thanks
Thanks for your reply.
To be more specific I am creating XML file and handling the reserved characters in the XML Output stage. But when the target side tried to use the XML file for their process they got the following error
ABCDE.xml: Loader is throwing errors due to invalid XML character 0x1e
Thu May 27 10:44:53 CDT 2010,Error in processing file /c/abcde.20100521-171128.xml:org.xml.sax.SAXException: **Parsing Fatal Error **
Line: 1
URI: null
Message: An invalid XML character (Unicode: 0x1e) was found in the element content of the document.
Thu May 27 10:44:53 CDT 2010,Exception during dataload task [ABCDE] :com.prosrm.taskmanager.ImException: com.prosrm.common.OperationFailedException: org.xml.sax.SAXException: **Parsing Fatal Error **
So when I looked at the source data I see a non-printable character in one of the fields which caused this issue and they recommended to use CTRL + Shift +6 sequence of keys to generate the special character and drop this character when encountered.
Thanks
Use this command to remove the special character in your input file
Code: Select all
tr -d \\036 < input file
You are the creator of your destiny - Swami Vivekananda