Hi,
my current requirment is that, i have to populate a calender of 1 yr where input is the single date,that is the start date of the year----
e.g-
Startyear---2005-01-01(input)
Output would be-----This year calender
Can this prob be handled using hash file?Can I use the samehash file as source,lookup and output?
Thanks in advance,
Rumu
Want to populate a calender with a single day input
Moderators: chulett, rschirm, roy
Hi and welcome aboard
,
I think this was covered so use search.
In any case your most easy to implement solution would be using a transformer to manufacture 365 rows (or perhaps 366) performing manipulation on the givven parameter date and using Iconv()/Oconve() to manipulate dates generating the 1 year you need to what ever output you need.
IHTH,
![Smile :)](./images/smilies/icon_smile.gif)
I think this was covered so use search.
In any case your most easy to implement solution would be using a transformer to manufacture 365 rows (or perhaps 366) performing manipulation on the givven parameter date and using Iconv()/Oconve() to manipulate dates generating the 1 year you need to what ever output you need.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard! :D
As Roy mentioned, you could search the forum and find one or more solutions.
Internal format dates in DataStage are integers, so all you need to do is to convert your start date to internal format, identify your stop rule, and go for it.
An easy solution involves a Transformer stage and stage variables, with an output link constraint to stop the process.
Another approach is a before/after subroutine.
You can use the same hashed file as source, lookup and output (though you don't need either source or lookup for this particular task). If you ever use hashed file as lookup and target, make sure you set the "lock for update" property.
As Roy mentioned, you could search the forum and find one or more solutions.
Internal format dates in DataStage are integers, so all you need to do is to convert your start date to internal format, identify your stop rule, and go for it.
An easy solution involves a Transformer stage and stage variables, with an output link constraint to stop the process.
Another approach is a before/after subroutine.
You can use the same hashed file as source, lookup and output (though you don't need either source or lookup for this particular task). If you ever use hashed file as lookup and target, make sure you set the "lock for update" property.
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.
-
- Charter Member
- Posts: 199
- Joined: Tue Jan 18, 2005 2:50 am
- Location: India