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
 

 

Eazytrieve defination for Decimal (12,0)

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: Eazytrieve defination for Decimal (12,0)
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Feb 26, 2010 1:00 pm    Post subject:
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Feb 26, 2010 2:27 pm    Post subject: Reply to: Eazytrieve defination for Decimal (12,0)
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Feb 26, 2010 2:34 pm    Post subject:
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Feb 26, 2010 2:54 pm    Post subject:
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 26, 2010 3:03 pm    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Feb 26, 2010 3:13 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Fri Feb 26, 2010 3:51 pm    Post subject:
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

Site Director


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

PostPosted: Fri Feb 26, 2010 8:12 pm    Post subject:
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.    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Convert Decimal to hexadecimal Steve Ironmonger DFSORT/ICETOOL 5 Fri May 27, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. JCL to convert float decimal into rea... polymathtarun JCL & VSAM 3 Sun May 15, 2016 9:57 pm
No new posts conversion from char to packed decimal Musab Ahmed DFSORT/ICETOOL 7 Fri Apr 08, 2016 1:12 pm
No new posts SIGNED DECIMAL TO COMP-3 using cobol ... ram_vizag COBOL Programming 1 Tue Mar 01, 2016 11:32 pm


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