Thanks all,  good suggestions...

>>> Bob Bates <[EMAIL PROTECTED]> 10/15/2008 10:59 AM >>>
If you need leading zeroes to preserve the length of a number or for
pattern matching (usually happens for me when I add one to month and
need to compare something like 4/01/08 to 04/01/08) then I put the zero
back on with right.
 
Example
 
x=01234
y = x + 1
y = right('00000'y,5)
say y
 
Results in 01235
 

Bob Bates 
Enterprise Hosting Services - Enterprise Virtualization - z/VM and
z/Linux (
http://ehs.homestead.wellsfargo.com/Mainframe/zSS/zSE/zVM-zLinux/Pages/default.aspx
)

w. (469)892-6660 
c. (214) 907-5071 
“This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based on
this message or any information herein.  If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message.  Thank you for your cooperation."
 

From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Howard Rifkind
Sent: Wednesday, October 15, 2008 9:52 AM
To: IBMVM@LISTSERV.UARK.EDU 
Subject: REXX Coding Question.

Greetings.
 
Is there anyway to perform an arithmetic operation (add/subtract) on a
string of numbers that has a leading '0' (zero) and perceive the leading
zero?
 
If I have the following:
 
X = 01234
 
and I add/subtract some number from the above the leading zero is
gone.
 
Thanks




_____________
LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential
and may be privileged. It is intended for the addressee(s) only.
Access to this E-mail by anyone else is unauthorized.
If you are not an addressee, any disclosure or copying of the
contents of this E-mail or any action taken (or not taken) in
reliance on it is unauthorized and may be unlawful. If you are not an
addressee, please inform the sender immediately, then delete this
message and empty from your trash.
_____________
LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential
and may be privileged. It is intended for the addressee(s) only.
Access to this E-mail by anyone else is unauthorized.
If you are not an addressee, any disclosure or copying of the
contents of this E-mail or any action taken (or not taken) in
reliance on it is unauthorized and may be unlawful. If you are not an
addressee, please inform the sender immediately, then delete this
message and empty from your trash.

Reply via email to