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

Eazytrieve defination for Decimal (12,0)


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Fri Feb 26, 2010 11:16 am
Reply with quote

Hi My DB2 has data defination as follows:
Variable-1 Interger
varibale-2 Decimal (12,0)

I am unloding the data into file having following defination:
Varibale-1 PIC S9(9) USAGE COMP
variable-2 PIC S9(12)V USAGE COMP-3

I want to generate report for the following data using eazytrieve. What shld be the defination in the file in eazytrieve for above variables. I need to convert them into numeric for display but i am A006 error.

Any body can provide proper data defination in eazytrieve
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Feb 26, 2010 1:00 pm
Reply with quote

VAR2 * P 7 HEADING('field2') MASK('ZZZZZZZZZZZ9')

What is the code in the A006 error message ?
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Fri Feb 26, 2010 2:22 pm
Reply with quote

Hi i am getting DATA EXCP error..
for file defination i am defining:

Variable-1 04 P 0
variable-2 07 P 0

defined two working storage variable:
ws-variable1 W 10 N VALUE 0
ws-variable2 W 12 N VALUE 0

i getting proper value for moving variable-2 to ws-variable2

but for variable-1 i am getting soc-7 my guess.
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Fri Feb 26, 2010 2:23 pm
Reply with quote

if i define ws-variable1 as Alphabatic program runs successfully but the value moved is HEX and not proper.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Feb 26, 2010 2:27 pm
Reply with quote

read the cobol manual about the difference between COMP and COMP-3
and the relevant manual about the difference between integer and decimal(..)

hint... meditate on the binary/packed numeric formats
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Feb 26, 2010 2:34 pm
Reply with quote

VAR1 * B 4
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Fri Feb 26, 2010 2:39 pm
Reply with quote

****PeterHolland

thanks for ur answer.

I have one table entry in cobol as follows
F216F-LED-BALANCE-30-DAYS OCCURS 30 TIMES
INDEXED BY F216E-IDX
PIC S9(11)V99 COMP-3.

How to define the same in ezt..
require answer very fast
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Feb 26, 2010 2:54 pm
Reply with quote

F216F-LED-BALANCE-30-DAYS * P 7 OCCURS 30 INDEX(WPIX)

The next time your question should be :

Can you please give me a fast answer?
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Fri Feb 26, 2010 2:58 pm
Reply with quote

*****Peter**********

I have used the following answer from you...Will have to verify...

I wrote in following way thinking a normal chat...Next time will consider the words i am using.

Thanks for your feedback.
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Fri Feb 26, 2010 3:00 pm
Reply with quote

Peter WPIX should be working storage variable?
or it can be directly used.??
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Feb 26, 2010 3:03 pm
Reply with quote

krunalbafna wrote:
require answer very fast

Please note the use of the phrase above, and do not use it again.

Any urgency to resolve YOUR problem is solely YOUR urgency.

The members of this forum give their time free of charge. If you are in need of a fast response to your problem then you must be prepared to pay the going rate for "on demand support services".
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Feb 26, 2010 3:13 pm
Reply with quote

Its all in the Easytrev Reference Guide. So this will be my last input.
From now on you have to consult that manual.


[INDEX (field-name-4 ...)]
The INDEX option establishes indexes for field-name-1. Field-name-4 provides
the name for the index. You can specify multiple indexes by coding a list of index
names enclosed in parentheses.
CA-Easytrieve/Plus automatically allocates a four-byte field for each index. Any
references you make to a field with the INDEX option cause that field's location
to be adjusted by the index amount. See Chapter 13, “Table and Array
Processing” for more information about indexing.
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Fri Feb 26, 2010 3:35 pm
Reply with quote

I have to display all coloum values for duplicate rows using sql query..

Ex: Select CustomerName,cust_cde,Cust_no from cust_tabl

here cust_no can repeat....
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Fri Feb 26, 2010 3:51 pm
Reply with quote

I agree with expat but I liked the "*"s coming along with names... icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Feb 26, 2010 8:12 pm
Reply with quote

Hello,

Quote:
I have to display all coloum values for duplicate rows using sql query..

Ex: Select CustomerName,cust_cde,Cust_no from cust_tabl

here cust_no can repeat....
How does this have anything to do with the topic about numeric data? You need to start a new topic for this unrelated questoin.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Help required to reset decimal points... DFSORT/ICETOOL 8
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts small int to zoned decimal conversion DFSORT/ICETOOL 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
Search our Forums:

Back to Top