View previous topic :: View next topic
|
Author |
Message |
lagneshp
New User
Joined: 15 Aug 2009 Posts: 29 Location: Chennai
|
|
|
|
Hi,
Can anyone say me that High values or low values can be moved into variable which has numeric Data type.
Ex: ABC PIC 9(3)
Is it possibleto code : move low-values into ABC or move high-values into ABC. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
What do you mean by (sic) "numeric Data type"? Zoned decimal? Packed decimal? Binary? Floating point? All are valid numeric data types in COBOL.
What results did you get when you attempted this yourself? |
|
Back to top |
|
|
lagneshp
New User
Joined: 15 Aug 2009 Posts: 29 Location: Chennai
|
|
|
|
Hi Robert,
I Read that High-values and Low-values are alpha numeric where High-values have x(FF) and Low-values have x(00).
consider it as a display datatype ( As in my example i didnt mentioned any numeric Data type, Zoned decimal, Packed decimal, Binary, Floating point).
Now Can u tell me that High values or low values can be moved into variable which has numeric Data type(Display). |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hint (for what Robert has asked): It is important to note that HIGH-VALUES and LOW-VALUES are ALPHANUMERIC in type, so you can't set numerically defined variables to this type (you would have to implicitly redefine the variable first). This is an annoying quirk of COBOL. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
so you can't set numerically defined variables to this type (you would have to implicitly redefine the variable first). |
And if you redefine a numeric field as pic x and move high-value to it, you may cause an abend. . .
Do not move high or low value to anything numeric . . . Saves grief later. |
|
Back to top |
|
|
lagneshp
New User
Joined: 15 Aug 2009 Posts: 29 Location: Chennai
|
|
|
|
Thanks for your answers. |
|
Back to top |
|
|
|