IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

zoned decimal in Easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ragav86

New User


Joined: 27 Jan 2010
Posts: 37
Location: chennai

PostPosted: Thu Mar 01, 2012 6:48 pm
Reply with quote

Hi,

How to declare sined zoned decimal in easytrive..

eg: +00000200.66
this value is coming from file
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 01, 2012 7:13 pm
Reply with quote

What does it say in the manual ?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Mar 01, 2012 8:38 pm
Reply with quote

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
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Fri Mar 02, 2012 3:26 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 02, 2012 4:36 am
Reply with quote

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
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Fri Mar 02, 2012 9:46 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 02, 2012 9:50 pm
Reply with quote

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
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Fri Mar 02, 2012 10:12 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Count the number of characters in a f... CA Products 1
No new posts Select a DB2 value in a specific deci... DB2 4
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
Search our Forums:

Back to Top