View previous topic :: View next topic
|
Author |
Message |
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
Hi i have a select query which goes like this...
SELECT ICN,SCCF_NUMBER,PLAN_RECEIPT_DATE,DATE_PAID,
INPUT_MEDIUM,FIN_CYCLE_DT,CHECK_NUMBER,
DISPOSITION_CODE,MONTH,
FROM DSNV.DWS_ITS_CLAIMS_H
WHERE PLAN_RECEIPT_DATE >= '2001-01-01' AND
HOME_HOST_IND = 'HOST'
ORDER BY ICN
WITH UR;
when i ran this i got some records.... the same query i with same fields i have retrieved thru focus program for the same table i got some records.......
when i saw the nubmber of records the records retrieved are same.
i wanted to check whther the fields are also same till ICN and SCCF_NUMBER i tried to compare the files in file aid .. i got differences.....
Differece was the order for SCCF_NUMBER where there are duplicate values the order is different for focus and the retrieval from IKJEFT01 Tool. when i checked for that particular ICN number in QMF the order was same as focus....
i am not able to decide what is wrong with the retrieval by using IKJEFT01 tool
can any one suggest me .... |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Post your FOCUS command ? |
|
Back to top |
|
|
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
SUM SCCF_NUMBER
FST.PLAN_RECEIVED_DT
LST.PAID_DATE
FST.FIN_CYCLE_DT
CHECK_NUMBER
DISPOSITION_CODE
MONTH
WHERE PLAN_RECEIPT_DT GE '2001-01-01'
WHERE HOME_HOST_IND EQ 'HOST'
BY ICN
its like this.....here fst lst concept i am not including in the select query .... i am doing in sort...... but with out adding first last in focus data and retrieving the data using the IKJEFT tool i am getting difference only for the duplicate data...
:-( |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Might a SUM and a SELECT return different results. . .?
Quote: |
i am not able to decide what is wrong with the retrieval by using IKJEFT01 tool |
Why do you believe there is anything wrong with this execution?
I do not recall a case where a query returned invalid results when executed via IKJEFT01 (which is only tso (the terminal monitor program) in batch). |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Please try to pick a more meaningful Topic in the future. It helps when people are searching. |
|
Back to top |
|
|
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
For comparing my data with focus and cobol i have removed sum and replaced print and also the fst and lst in focus.... i compared my data with focus retrieval and cobol retrieval in file aid for particular length i m getting differences....
I dont think my topic is not meaningful.... |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
How about "IKJEFT01 and Focus yield different results"? Having the word Focus in the topic would have been more meaningful than "db2 query". |
|
Back to top |
|
|
bnveena
New User
Joined: 29 May 2007 Posts: 50 Location: hyderabad
|
|
|
|
It was a problem with IFJEFT01 so i kept like that...i checked with order of retrieval from QMF and IKJEFT... when there are duplicates the order is changing....using IKJEFT |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is the issue now that qmf and ikjeft01 give different results?
It is quite likely that the order of the retrieved rows is different because there are duplicates in the data and the system was not told how to order these duplicates. If you only ORDER BY ic, the sequence of the duplicates is unpredictable.
Has FOCUS gone away as part of the question?
Quote: |
I dont think my topic is not meaningful.... |
Yes, unfortunately it is quite unmeaningful to the forum as nearly every topic posted in this part of the forum is some kind of "db2 query". . .
Quote: |
It was a problem with IFJEFT01 so i kept like that...i checked with order of retrieval from QMF and IKJEFT |
If the queries are presented to the system with the same lack of attention to detail as this last reply, there might be one or more typo's causing the differences in addition to the lack of qualification of the ORDER BY. . . |
|
Back to top |
|
|
|