Want to populate a calender with a single day input

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rumu
Participant
Posts: 286
Joined: Mon Jun 06, 2005 4:07 am

Want to populate a calender with a single day input

Post by rumu »

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
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by 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,
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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
talk2shaanc
Charter Member
Charter Member
Posts: 199
Joined: Tue Jan 18, 2005 2:50 am
Location: India

Post by talk2shaanc »

Find the solution in the below post:
viewtopic.php?t=92940&highlight=
Shantanu Choudhary
Post Reply