Print date in particular range in Datastage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
shivam5483
Participant
Posts: 3
Joined: Sat Jun 22, 2019 10:50 am
Location: Pune

Print date in particular range in Datastage

Post by shivam5483 »

I want the output of dates from particular range in a specific format

date1: 2019-06-18(from Table) date2: 2019-06-22(systemDate)

Output will be:

2019-06-19,2019-06-20|2019-06-20,2019-06-21

Date 1 will be fetched from the table. Once we get the dates, I need to use this date in processing stage and will compare it with date2 i.e current system date. After comparision ,I need the o/p as above. I am having trouble to get the o/p in that format 2019-06-19,2019-06-20|2019-06-20,2019-06-21( in same column if possible, otherwise I will combine the column to one).

i was trying to Use while loop in Transformer stage.
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

transformer loops are really for splitting 1 record into multiples.

what I think you might want here would be a row-generator, and a stage variable. The stage variable would increment the date each time, and the row generator would be your loop counter of sorts...
Post Reply