I have an account# that I want to strip out the dash from the first 16 positions and put the remainder in a 15 character field (DL27)
The account number is 003-0001-001-001-250-01
When I execute
DL27 = %Scanrpl('-':'':djacct:1:16);
it populates DL27 with '0030001001001-2'
So apparentlly it strips out the dash from the 1st 16 positions which produces a 13 character string which it populates into the leftmost 13 pos of DL27 and then continues populating DL27 with the remaing characters after pos 16 of DJACCT until DL27 is filled. I only want the 1st 16 positions of djacct. I guess I have to use %Substr along with %Scanrpl or is there a better option.
The account number is 003-0001-001-001-250-01
When I execute
DL27 = %Scanrpl('-':'':djacct:1:16);
it populates DL27 with '0030001001001-2'
So apparentlly it strips out the dash from the 1st 16 positions which produces a 13 character string which it populates into the leftmost 13 pos of DL27 and then continues populating DL27 with the remaing characters after pos 16 of DJACCT until DL27 is filled. I only want the 1st 16 positions of djacct. I guess I have to use %Substr along with %Scanrpl or is there a better option.




Comment