View previous topic :: View next topic
|
Author |
Message |
Ragav86
New User
Joined: 27 Jan 2010 Posts: 37 Location: chennai
|
|
|
|
Hi,
How to declare sined zoned decimal in easytrive..
eg: +00000200.66
this value is coming from file |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What does it say in the manual ? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Ragav86 wrote: |
Hi,
How to declare sined zoned decimal in easytrive..
eg: +00000200.66
this value is coming from file |
This is not z Zoned Decimal. This is an Edited Numeric. You have to define it as "13 A" and redefine it for the bits you need (sign, integer part, decimal poiint and decimal part). Check that sign and decimal point are valid. Check the other parts are numeric. Look back through other topics in this forum. |
|
Back to top |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
Good day to all!
You define the numeric field with decimal places and easytrieve takes it as a signed numeric field. EX: amount 1 10 N 2. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Jose,
How can that work? I guessed the wrong number of bytes earlier, but there are 12 bytes. You define 10. Plus, your 10, depending if they are the left-most or right-most, will contain one or two invalid numerics and anything using it, certainly for calculation, is liable to go off POP! (S0C7).
If TS is just showing us the number, and really it is signed-zoned-decimal with two implicit decimal places, then fine, you are right - but I suspect TS wouldn't have a problem defining that, and "this value is coming from file" wouldn't be providing any information. |
|
Back to top |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
Good day, Bill!
I probably misunderstood TS, If the field contains '-00000200.66' then it can not be a numeric field because it contains non-numeric characters in the field. The field would have to be define as alphanumeric then use %alphacon (macro) to converted it into a numeric field. This would take care of your negative sign and the decimal character.
EX; %ALPHACON alphafield numfield |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, Jose, TS has done the usual wandering (though the level of traffic today may indicate some public holiday?) so we still don't know what they really wanted :-)
Is %alphacon CA-supplied, or locally-written at your site? |
|
Back to top |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
Bill,
%ALPHACON is a CA-supplied macro and could be found in CA-Easytrieve(R) Plus Toolkit 2.0 Macro Reference Guide. I also forgot one more thing, TS needs to include the Easytrieve macro library in the compiling JCL. |
|
Back to top |
|
|
|