09-20-2007 6:04 PM
Hi All,
Just wondering how I can delete some of the leading zeros, but keep two of them.
My field incoming will be '0000000003'. I want to use DELETE LEADING '0', but I want my output to be '003'.
This field incoming can also contain text instead of a number, so I don't want to mess around with field lengths.
Any suggestions?
Thanks
Charla
09-20-2007 7:10 PM
Very simple call the conversion exit "conversion_exit_alpha_out"...This will make you output to '3'..Now assign the same to a numerical character
ie Data number(3) type N.
09-20-2007 6:07 PM
09-20-2007 6:18 PM
hi Charla,
one way:
SHIFT field LEFT DELETING LEADING '0'.
CONCATENATE '00' field INTO field.
this works on any number of leading zeros.
hope this helps
ec
09-20-2007 6:27 PM
What do you want if the field is '00012'?
What do you want if it's '00a3' or '00a'?
Rob
Message was edited by:
Rob Burbank
09-20-2007 6:44 PM
Hi Charla,
try to use "Write to".
example:
<b>parameters: num(10) type N.</b>
user digit "20"
num has the value: "0000000020"
<b>write num+7(3) to num.</b>
num has now the value: "020"
<b>write: num.</b>
Regards
Allan Cristian
09-20-2007 6:45 PM
Hi, try to use edit mask property, and you can define the format of the strings.
Best Regards,
RP
09-20-2007 7:10 PM
Very simple call the conversion exit "conversion_exit_alpha_out"...This will make you output to '3'..Now assign the same to a numerical character
ie Data number(3) type N.