[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: <No subject given> (edit mask)



The space is a pad, NOT a sign.  If you had 9999, it would print as '  31' -
there are not two signs there!  The edit mask 9 ('edit 999') space fills to the
left.

It is also not necessary to use LTRIM to get rid of the leading spaces.  Using
the edit mask 8 ('edit 888') instead of 9 will trim leading blanks, or left
justify it.  Usually if you are using a character other than 9, you can also
just use it as the first character, with 9's following ('edit 899'); it would
still trim both spaces even if the result was just one digit.

Other common mask characters are 0, which will zero fill to the left ('edit 099'
= '031'), and B, which will leave the output blank if the number is equal to
zero ('edit B99').  You can also use a dollar sign, which will float ('edit $99'
= '$31', or 'edit $9999' = '$31').

I recommend using the SQR Manual (Language Reference), if you have one.  Most of
the edit masks are described under the EDIT parameter of the PRINT statement,
and there are more described under the LET statement.

HTH,
Denise White
Sr. Programmer/Analyst
Vicor

------------------------------

Date:    Thu, 15 Feb 2001 13:51:10 -0500
From:    Tara K <tkurtz999@HOTMAIL.COM>
Subject: <No subject given>

And if you desire to remove the space (' 31') you can use LTRIM... I have
had to do that for several data exports to update a remote SQLServer.

Just use a LET statment:

LET $yourvarible = ltrim($yourvariable, ' ')


Sincerely,

Tara Kurtz
Tampa,Florida

>From: richard.mitchell@GSA.GOV
>Reply-To: sqr-users@list.iex.net
>To: SQR-USERS@list.iex.net
>Date: Thu, 15 Feb 2001 10:09:37 -0800
>
>Actually, the space is probably the sign rather than a pad.
>
>Rick
>
>
>
>
>
>"Risman, Mark D." <mrisman@PAINEWEBBER.COM>@list.iex.net> on 02/15/2001
>09:28:57 AM
>
>Please respond to sqr-users@list.iex.net
>
>Sent by:  "Discussion of SQR, Brio Technology's database reporting
>       language" <SQR-USERS@list.iex.net>
>
>
>To:   SQR-USERS@list.iex.net
>cc:    (bcc: Richard L. Mitchell/CONTRACTOR/10P/R10/GSA/GOV)
>
>Subject:
>
>
>Anthony, et. al.
>
>The 999 is what SQR calls an "edit mask".  These are explained as part of
>the PRINT command in the SQR maual.
>
>One thing about an edit mask of 999, though - it will also pad the output
>with spaces.  So if the page number here was 31, the output would be " 31",
>not "31".  This is a technique that is often used to line up columns of
>data
>on an SQR report.
>
>Happy to help,
>- Mark
>
>
>                 -----Original Message-----
>                 From:   Warren, Anthony [UBS]
>                 Sent:   Thursday, February 15, 2001 9:41 AM
>                 To:     SQR-USERS@list.iex.net
>                 Subject:
>
>                 Thanks for that.
>
>                 I am just beginning sqr programming.
>
>                 Cheers.
>
>                 -----Original Message-----
>                 From: ljng [mailto:ljng@CNNET.COM]
>                 Sent: Donnerstag, 15. Februar 2001 15:00
>                 To: SQR-USERS
>                 Cc: ljng
>                 Subject:
>
>
>                 It edits the printed output to the format specified.
>                 For example, if you do a DISPLAY play #page-count, you
>might
>see 31.0000
>                 (something like that) but when you use an edit option,
>what
>will be printed
>                 out will be 31
>
>                 Hope that helps.
>
>                 LN
>                 ----- Original Message -----
>                 From: Anthony Warren <anthony.warren@UBS.COM>
>                 To: <SQR-USERS@list.iex.net>
>                 Sent: Thursday, February 15, 2001 6:22 AM
>
>
>                 > Hi all,
>                 >
>                 > Could someone explain the edit option used with the
>print
>command.
>                 >
>                 > Print #page-count          (,+1) edit 999
>                 >
>                 >
>                 >
>                 > Thanks in-advance