Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

zoned decimal in Easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: zoned decimal in Easytrieve
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: 8593
Location: Back in jolly old England

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

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Thu Mar 01, 2012 8:38 pm    Post subject: Re: zoned decimal in Easytrieve
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: 110
Location: Puerto Rico

PostPosted: Fri Mar 02, 2012 3:26 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Fri Mar 02, 2012 4:36 am    Post subject: Reply to: zoned decimal in Easytrieve
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: 110
Location: Puerto Rico

PostPosted: Fri Mar 02, 2012 9:46 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Fri Mar 02, 2012 9:50 pm    Post subject: Reply to: zoned decimal in Easytrieve
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: 110
Location: Puerto Rico

PostPosted: Fri Mar 02, 2012 10:12 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us