moving a alpha numeric field to a numeric field 
Author Message
 moving a alpha numeric field to a numeric field

Quote:

>if i moved a field with of 3 alphanumerics to a 2 digit numeric field
>what happens and why?

Please do your own homework

DD



Mon, 01 Apr 2002 03:00:00 GMT  
 moving a alpha numeric field to a numeric field
if i moved a field with of 3 alphanumerics to a 2 digit numeric field
what happens and why?


Mon, 01 Apr 2002 03:00:00 GMT  
 moving a alpha numeric field to a numeric field

Quote:

>if i moved a field with of 3 alphanumerics to a 2 digit numeric field
>what happens and why?

You could have simply tried it and learned the answer faster than you
can post a message and wait for a response. ;-)
--

Sun Valley Systems    http://personal.bhm.bellsouth.net/~judmc
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."


Mon, 01 Apr 2002 03:00:00 GMT  
 moving a alpha numeric field to a numeric field

Quote:


>>if i moved a field with of 3 alphanumerics to a 2 digit numeric field
>>what happens and why?

>You could have simply tried it and learned the answer faster than you
>can post a message and wait for a response. ;-)

A move to a numeric field is right-justified (or decimal aligned, if
appropriate), and truncated or zero-filled to the left, as applicable.
A move to an alpha (PIC A) or alphanumeric (PIC X) field is left-
justified and space filled or truncated to the right as applicable.

In answer to your question:
  1. The contents of the sending field must be numeric (only 0-9).
  2. The data will be right-justified in the 2 digit numeric field,
     and the leftmost position will be truncated to 2 digits.
--

Sun Valley Systems    http://personal.bhm.bellsouth.net/~judmc
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."



Mon, 01 Apr 2002 03:00:00 GMT  
 moving a alpha numeric field to a numeric field

Quote:


> >>if i moved a field with of 3 alphanumerics to a 2 digit numeric field
> >>what happens and why?

> A move to a numeric field is right-justified (or decimal aligned, if
> appropriate), and truncated or zero-filled to the left, as applicable.
> A move to an alpha (PIC A) or alphanumeric (PIC X) field is left-
> justified and space filled or truncated to the right as applicable.

> --


Judson,
  I think (but haven't checked it out) that a MOVE from a PIC A (not PIC X)
field to a PIC 9 field is "illegal".  It's results are certainly UNDEFINED -
because the former can't include 0-9 and the latter must.

--
Bill Klein
    wmklein <at> ix dot netcom dot com



Mon, 01 Apr 2002 03:00:00 GMT  
 moving a alpha numeric field to a numeric field

Quote:




>> >>if i moved a field with of 3 alphanumerics to a 2 digit numeric field
>> >>what happens and why?

>> A move to a numeric field is right-justified (or decimal aligned, if
>> appropriate), and truncated or zero-filled to the left, as applicable.
>> A move to an alpha (PIC A) or alphanumeric (PIC X) field is left-
>> justified and space filled or truncated to the right as applicable.

>Judson,
>  I think (but haven't checked it out) that a MOVE from a PIC A (not PIC X)
>field to a PIC 9 field is "illegal".  It's results are certainly UNDEFINED -
>because the former can't include 0-9 and the latter must.

You are correct.  I was simply making a general statement about PIC A
being left justified, not that it could be used in this example. :-)
--

Sun Valley Systems    http://personal.bhm.bellsouth.net/~judmc
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."


Mon, 01 Apr 2002 03:00:00 GMT  
 moving a alpha numeric field to a numeric field



Quote:




> > >>if i moved a field with of 3 alphanumerics to a 2 digit numeric field
> > >>what happens and why?

> > A move to a numeric field is right-justified (or decimal aligned, if
> > appropriate), and truncated or zero-filled to the left, as applicable.
> > A move to an alpha (PIC A) or alphanumeric (PIC X) field is left-
> > justified and space filled or truncated to the right as applicable.

> > --

> Judson,
>   I think (but haven't checked it out) that a MOVE from a PIC A (not PIC
X)
> field to a PIC 9 field is "illegal".  It's results are certainly
UNDEFINED -
> because the former can't include 0-9 and the latter must.

> --
> Bill Klein
>     wmklein <at> ix dot netcom dot com

and the computer police will surround the computer...


Mon, 01 Apr 2002 03:00:00 GMT  
 moving a alpha numeric field to a numeric field

Quote:





>> >>if i moved a field with of 3 alphanumerics to a 2 digit numeric field
>> >>what happens and why?

>> A move to a numeric field is right-justified (or decimal aligned, if
>> appropriate), and truncated or zero-filled to the left, as applicable.
>> A move to an alpha (PIC A) or alphanumeric (PIC X) field is left-
>> justified and space filled or truncated to the right as applicable.

>> --

>Judson,
>  I think (but haven't checked it out) that a MOVE from a PIC A (not PIC X)
>field to a PIC 9 field is "illegal".  It's results are certainly
UNDEFINED -
>because the former can't include 0-9 and the latter must.

picky, picky.


Mon, 01 Apr 2002 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Covert COBOL Computational Field To Numeric Field In FoxPro

2. Numlocks on numeric fields

3. Cobol File Conversions - Numeric Fields

4. Limit characters in numeric field

5. HELP needed to paste to numeric field

6. immediate entry field numeric

7. xBase numeric fields

8. DBFNSX - Index on Numeric Field length 7 ERROR ?

9. '-' numeric keyboard in locator field

10. determining numeric field

11. autoincrement numeric field

12. Incrementing a numeric field within a GET

 

 
Powered by phpBB® Forum Software