View previous topic :: View next topic
|
Author |
Message |
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
VAR2 * P 7 HEADING('field2') MASK('ZZZZZZZZZZZ9')
What is the code in the A006 error message ? |
|
Back to top |
|
|
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
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 |
|
|
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
if i define ws-variable1 as Alphabatic program runs successfully but the value moved is HEX and not proper. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
VAR1 * B 4 |
|
Back to top |
|
|
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
****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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
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 |
|
|
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
*****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 |
|
|
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
Peter WPIX should be working storage variable?
or it can be directly used.?? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
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 |
|
|
krunalbafna Warnings : 1 Active User
Joined: 18 Jan 2010 Posts: 143 Location: Pune
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I agree with expat but I liked the "*"s coming along with names... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|