Thanks How do I allow '.' in a numeric field in a quick screen ?

Abraham Zwygart azwygart@anodizing.com
Tue, 9 Nov 1999 11:16:43 -0800


Thanks for all those that answered.  Sorry for not getting back sooner.  The
day I posted the original question I go sick and was out for several days.
The field in question was a temp field defined in the quick screen.  I ended
up changing it from a numeric to character field then in the edit procedure
do some testing as follows:

PROCEDURE EDIT T-SAMPLE-LEN1
   BEGIN
   LET T-DEL-IND = INDEX ( T-SAMPLE-LEN1, '.' )

   IF T-DEL-IND = 0
      THEN LET T-SAMPLE-LEN = NCONVERT ( T-SAMPLE-LEN1 + '0000' )
      ELSE BEGIN
      LET T-DEC-PART = T-SAMPLE-LEN1 [ ( T-DEL-IND + 1 ): 8 ] + '0000'

      LET T-SAMPLE-LEN = &
          NCONVERT ( T-SAMPLE-LEN1 [ 1: ( T-DEL-IND - 1 ) ] + &
                     T-DEC-PART [1:4] )
      END
   LET T-SAMPLE-LEN1 = ASCII (T-SAMPLE-LEN,5)
   DISPLAY T-SAMPLE-LEN1
   IF T-SAMPLE-LEN < 10000 OR T-SAMPLE-LEN > 36000
      THEN ERROR 'INVALID SAMPLE LENGTH MUST BE BETWEEN 1.0000" AND
36.0000"'
   END

Thanks again for your help.
Abraham Z.

----- Original Message -----
From: Pickering, John (NORBORD) <PICKERIJ@norbord.com>
To: 'Abraham Zwygart' <azwygart@anodizing.com>; Cognos User Group
<powerh-l@lists.swau.edu>
Sent: Thursday, November 04, 1999 10:06 AM
Subject: RE: How do I allow '.' in a numeric field in a quick screen ?


>
> >I am on a HP3000 ver 5.5, Quick ver 8.19c1
> >I have a quick screen that I need to allow the user to input the decimal,
> >example:
> >    5      results 5.0000 not 0.0005 or
> >    5.1    results 5.1000 or
> >    5.245  results 5.2450
> >
> >The field is defined as a num*8 pic '^^.^^^^'
> >
> >The users do not want to put in the trailing zero(s) to makeup the 4
> decimal
> >place.
>
> Add 'input scale 4' to the field statement in the screen or to the element
> statement in the dictionary.
>
> John Pickering
> Toronto
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
=
> Subscribe: "subscribe powerh-l" in message body to
majordomo@lists.swau.edu
> Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
> This list is closed, thus to post to the list, you must be a subscriber.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.