How to handle þ character in a field in a sequential file
Moderators: chulett, rschirm, roy
First of all you need to find out if it is an ASCII character or not. If you cannot find it, try hexadecimal value or octal value of the character. If you find one of them use a tr function in the source stage and replace this character with something else. And in the transformer stage use this as the delimiter. I am assuming it is a sequential file stage.
Think Field function in PX takes only ASCII characters as delimiters. Did you find the hex or octal value for this character. Never got a chance to work on sever jobs . So don't know what @FM does. Anyways i had a similar problem. This is the link to the post. I tried converting the character in transformer, but never worked. Finally settled for tr command in unix.
viewtopic.php?t=113640
viewtopic.php?t=113640
How you parse the field depends upon what you wish to do with the sub-values. Do you want to 'raise' them to separate fields? In that case, an external command such as UNIX tr might be easiest.
But if there are variable numbers of value in this sub-field then that method isn't optimal. You can get the number of values using FIELD(In.Field3,CHAR(254)) or the single distinct values using FIELD(In.Field3,CHAR(254),{subfield number}) in both server and PX/EE jobs.
But if there are variable numbers of value in this sub-field then that method isn't optimal. You can get the number of values using FIELD(In.Field3,CHAR(254)) or the single distinct values using FIELD(In.Field3,CHAR(254),{subfield number}) in both server and PX/EE jobs.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>