no errors, no warnings, but logic doesnot works
Moderators: chulett, rschirm, roy
no errors, no warnings, but logic doesnot works
Hi all,
I am using stage variables, to get the updated fields alone , i.e,
I am having 3 fields of which one field is primary key
Inlink.Field1, Inlink.Field2, Inlink.Field3
Mar 08 465155 'akjdfkjfd'
Jun 08 645553 'djkfdkafj'
Feb 08 464885 'hdahdgfd'
Outlink.Field1, Outlink.Field2, Outlink.Field3
Feb 08 464885 'hdahdgfd'
Mar 08 465155 'akjdfkjfd'
these are the records already in Oracle table, now I want to pass updated record, i.e
Outlink.Field1, Outlink.Field2, Outlink.Field3
Feb 08 464885 'hdahdgfd'
Mar 08 465155 'akjdfkjfd'
Jun 08 645553 'djkfdkafj'
to get this i am using the stage variables, like
DSLink30.Field1 -------> RefCmon
DATE.TAG(Iconv(Lnk_Src_Trf.Field,'D MY[A3,2]'))---->InCmon
If InCMon > RefCMon Then '1' Else '0' ------>AllowCMon
I don't get any any errors, but no rows were written to output
0000000 Lkup
0000000 |
0000000 |
ODBC--->TRF -------->ODBC
i am using the constraint, Dslink20.field1 from Lkup(hash file) it has the value '2008-03-01' (only this record) and the constraint used is
AllowCmon='Y'
Field1 is the primarykey
No rows were written to the output ODBC,
LkUp is done on the transformer. I had checked the conditions and logs no errors or warnings are found.
plz any one suggest some ideas
thanks in advance
I am using stage variables, to get the updated fields alone , i.e,
I am having 3 fields of which one field is primary key
Inlink.Field1, Inlink.Field2, Inlink.Field3
Mar 08 465155 'akjdfkjfd'
Jun 08 645553 'djkfdkafj'
Feb 08 464885 'hdahdgfd'
Outlink.Field1, Outlink.Field2, Outlink.Field3
Feb 08 464885 'hdahdgfd'
Mar 08 465155 'akjdfkjfd'
these are the records already in Oracle table, now I want to pass updated record, i.e
Outlink.Field1, Outlink.Field2, Outlink.Field3
Feb 08 464885 'hdahdgfd'
Mar 08 465155 'akjdfkjfd'
Jun 08 645553 'djkfdkafj'
to get this i am using the stage variables, like
DSLink30.Field1 -------> RefCmon
DATE.TAG(Iconv(Lnk_Src_Trf.Field,'D MY[A3,2]'))---->InCmon
If InCMon > RefCMon Then '1' Else '0' ------>AllowCMon
I don't get any any errors, but no rows were written to output
0000000 Lkup
0000000 |
0000000 |
ODBC--->TRF -------->ODBC
i am using the constraint, Dslink20.field1 from Lkup(hash file) it has the value '2008-03-01' (only this record) and the constraint used is
AllowCmon='Y'
Field1 is the primarykey
No rows were written to the output ODBC,
LkUp is done on the transformer. I had checked the conditions and logs no errors or warnings are found.
plz any one suggest some ideas
thanks in advance
Hi all,
I used debugger but I could not able to point out where the problem is..
after I tried with different constraints
one of them is
Oconv(Iconv(Inlink.Field1,'D MY[A3,2]'),'D-YMD')= LkUplink.Field1
where Inlink.Field1 has 'Mar 08' i am converting it to 2008-03-01
and LkUplink.Field1 has 2008-03-01
Inlink.Field1 is mapped to Outlink.Field1, while executing no rows were written to Outlink.Field1... also no warnings, or no errors
how to find where I am wrong.
any suggestions will help me to resolve this issue
thanks in advance
whether anywhere i am wrong
I used debugger but I could not able to point out where the problem is..
after I tried with different constraints
one of them is
Oconv(Iconv(Inlink.Field1,'D MY[A3,2]'),'D-YMD')= LkUplink.Field1
where Inlink.Field1 has 'Mar 08' i am converting it to 2008-03-01
and LkUplink.Field1 has 2008-03-01
Inlink.Field1 is mapped to Outlink.Field1, while executing no rows were written to Outlink.Field1... also no warnings, or no errors
how to find where I am wrong.
any suggestions will help me to resolve this issue
thanks in advance
whether anywhere i am wrong
Put your expression in a 'test harness' (a small routine) then test to ensure you are getting what you think you are getting from it:
Code: Select all
Ans=Oconv(Iconv(Arg1,'D MY[A3,2]'),'D-YMD')
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Put your expression in a 'test harness' (a small routine) then test to ensure you are getting what you think you are getting from it, as Craig suggested. This is how you find out whether it will work or not.
The Routine editor has its own, inbuilt, test utility.
The Routine editor has its own, inbuilt, test utility.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
or my doubt is whether DATE field can be equated or not, if yes
how can get the rows greater than the particular date
eg: Inlink.Field1 Inlink.Field2 Inlink.Field3
2008-03-01 hafjkdhk djflsdkf
2008-02-01 gijdjgdkl kkdfds
2008-05-01 adfklsdf kfdslfds
In look up hash file, I am getting the date in Lkuplink.Field1 as 2008-03-01 alone
I want to insert into the ouput link only the last row since the first two rows are there, Field1 and Field2 are key columns
I am using the constraint like
Inlink.Field1 = Lkuplink.field1
but no rows are inserted into the target
Outlink.Field1 Outlink.Field2 Outlink.Field3
2008-03-01 hafjkdhk djflsdkf
2008-02-01 gijdjgdkl kkdfds
I could not able to find by debugger or by implementing the constraint, if i am using other constraint on different field its working.
how can get the rows greater than the particular date
eg: Inlink.Field1 Inlink.Field2 Inlink.Field3
2008-03-01 hafjkdhk djflsdkf
2008-02-01 gijdjgdkl kkdfds
2008-05-01 adfklsdf kfdslfds
In look up hash file, I am getting the date in Lkuplink.Field1 as 2008-03-01 alone
I want to insert into the ouput link only the last row since the first two rows are there, Field1 and Field2 are key columns
I am using the constraint like
Inlink.Field1 = Lkuplink.field1
but no rows are inserted into the target
Outlink.Field1 Outlink.Field2 Outlink.Field3
2008-03-01 hafjkdhk djflsdkf
2008-02-01 gijdjgdkl kkdfds
I could not able to find by debugger or by implementing the constraint, if i am using other constraint on different field its working.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The "dates", which are actually strings, can be compared. What dates exist in the hashed file? Are the dates on both inputs identically trimmed and formatted?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I have checked the above expression, it's working fine. Its giving output as expected i.e 2008-03-01chulett wrote:Put your expression in a 'test harness' (a small routine) then test to ensure you are getting what you think you are getting from it:
Code: Select all
Ans=Oconv(Iconv(Arg1,'D MY[A3,2]'),'D-YMD')
I am also getting this in hash file as it is, i.e 2008-03-01
and then I use this hashfiel as a lookup and trying to get all the rows having the greater value than Lkuplink.Field1
but no rows were written, I am wondering why this happens, no errors, or warnings..
yep,
its been identical. even i modified the query to get only the month. i.e like
Oconv(Iconv(Inlink.Field1,'D MY[A3,2]'),'D M[2]')
its output came as
03
02
05
and same modification in lookup also
Oconv(Iconv(Lkuplink.Field1,'D MY[A3,2]'),'D M[2]')
output as
03
even then the comparision doesnot work
its been identical. even i modified the query to get only the month. i.e like
Oconv(Iconv(Inlink.Field1,'D MY[A3,2]'),'D M[2]')
its output came as
03
02
05
and same modification in lookup also
Oconv(Iconv(Lkuplink.Field1,'D MY[A3,2]'),'D M[2]')
output as
03
even then the comparision doesnot work
If I am comparing the dates as it is, i.e 'Mar 08' , its returning the values like alphabetical order comparision.
i.e., for the logic Inlink.Field1< Lkuplink.Field1
where Inlink.Field1 has values like('Jan 08','Feb 08','Mar 08','Apr 08','May 08','Jun 08')
and Lkuplink.Field1 has 'Mar 08'
but the rows were written, whose Inlink.Field1 having ('Jan 08','Feb 08','Mar 08','Apr 08','Jun 08')
only 'May 08' records are omited
but it should not be the output expected...
expected output for the above condition should have 'Jan 08','Feb 08' records alone.
i.e., for the logic Inlink.Field1< Lkuplink.Field1
where Inlink.Field1 has values like('Jan 08','Feb 08','Mar 08','Apr 08','May 08','Jun 08')
and Lkuplink.Field1 has 'Mar 08'
but the rows were written, whose Inlink.Field1 having ('Jan 08','Feb 08','Mar 08','Apr 08','Jun 08')
only 'May 08' records are omited
but it should not be the output expected...
expected output for the above condition should have 'Jan 08','Feb 08' records alone.