I have a 16 digit GL account# that I want to remove the dash from and poulate into another field. How to do this with %replace
Announcement
Collapse
No announcement yet.
%Replace
Collapse
X
-
Re: %Replace
Put an empty string in the first parm of %replace. Put a 1 in the fourth parm.
This may help:Code:D Account s 16a D EditedAccount s 16a D Pos s 5i 0 D EmptyString c const('') /free EditedAccount = Account; dow '1'; Pos = %scan('-': EditedAccount); if (Pos <= *zero); leave; endif; EditedAccount = %replace(EmptyString: EditedAccount:Pos:1); enddo;
http://www.itjungle.com/fhg/fhg042507-story02.html
Comment
-







Comment