Bernie,
Refer to my From The Edge: Creating Fixed Field ASCII Files, dated 11/15/2001.
http://www.razzak.com/fte
Enjoy!
Very Best Regards,
Razzak.
At 12:43 AM 12/12/01 -0500, you wrote:
>>>>
In the following code, I want to put 2 currency amounts into a text line, right justified and zero filled. The fields are 11 spaces each. The first amount should go into 1 thru 11 and the second amount should go into 12 thru 22. However, it seems that the format function is putting a sign field in front of the digits and therefore truncating the last digit. Anyone know how I can eliminate the extra space in front of the amounts?
set echo on
set var gross curr = 35,123.45
set var ftax curr = 2,345.56
set var igrs int = (.gross * 1000/10)
set var itax int = (.ftax * 1000/10)
set var agrs = (format(.igrs,"[>]00000000000"))
set var atax = (format(.itax,"[>]00000000000"))
set var ln = " "
set var ln = (sput(.ln,.agrs,1))
set var ln = (sput(.ln,.atax,12))
set var ln2 = " "
set var ln2 = (smove(.agrs,1,11,.ln2,1))
set var ln2 = (smove(.atax,1,11,.ln2,12))
write .ln
write .ln2
set var ln3 = " "
set var ln3 = (smove("ABCDE",1,5,.ln3,1))
set var ln3 = (smove("fghij",1,5,.ln3,6))
write .ln3
set echo off
return
===================================-============================
Official R:BASE List Server: mailto:[EMAIL PROTECTED]
RBTI Events/Training: http://www.rbase2000.com/events
R:DCC Members: http://www.rbase2000.com/rdcc
================================================================
R:BASE, Oterro & R:Tango are registered trademarks of RBTI.
==================================-=============================
================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l
