Thanks Albert,
That works too!
Bernie Lis
----- Original Message ----- From: "Albert Berry" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Thursday, November 03, 2005 1:16 PM
Subject: [RBG7-L] - Re: format


set var xtrans = (LJS(format(.Numtrans,'0000')),4)

Bernard Lis wrote:

How can I get format to return a 4 digit number without a space for a sign? In the example below, xtrans is a 5 char text value, I only want 4 char or it won't fit in the position I need it to go into.

set var xtrans = (format(.Numtrans,'0000'))

R>show var xtrans
2314

R>set var ln = ' '

R>set var ln = (sput(.ln,.xtrans,1))

R>show var ln
2314

2314 actually is in positions 2 thru 5

Bernie Lis





Reply via email to