Its very urgent!!Please reply
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 19
- Joined: Thu Jun 15, 2006 6:25 am
Its very urgent!!Please reply
Hi , I am quite new to datastage and i have a problem regarding transformation which is quite urgent to be resolved
1) Is there any function for calculating whether the given date is last day of month? like last_day in sql???
2) How to generate a no. of rows depending upon a difference in transformer stage? like what i want to do is depending upon difference of two date values i have to generate that much records except if that day is saturday, or sunday or the last day of month?
plz anyone help
a bunch of thanks in advance plz
1) Is there any function for calculating whether the given date is last day of month? like last_day in sql???
2) How to generate a no. of rows depending upon a difference in transformer stage? like what i want to do is depending upon difference of two date values i have to generate that much records except if that day is saturday, or sunday or the last day of month?
plz anyone help
a bunch of thanks in advance plz
-
- Participant
- Posts: 19
- Joined: Thu Jun 15, 2006 6:25 am
-
- Participant
- Posts: 19
- Joined: Thu Jun 15, 2006 6:25 am
You really shouldn't set your topic to "urgent" cuz everyone's issue is urgent in their own eyes. Your topic should be set to a brief discription of your problem. Saying that your problem is "urgent" will not make the users answer your questions any sooner. Please realize that most users do not get paid to support. They are just doing it out of the goodness of their heart. If you need quick responses, you are better off contacting your vendor as they are paid to support the software.
Please also be aware that a lot of the users are in the US and it is their sleepytime right now.
Regarding your issue, you could make a custom stage that would take in the start and end date. In your code for the "buildop" stage you can generate any number of records based on the days in between, weekends, and last day of the month.
Please refer to page 54-1 in the Parallel Job Developer's Guide on how to make custom stages.
Please also be aware that a lot of the users are in the US and it is their sleepytime right now.
Regarding your issue, you could make a custom stage that would take in the start and end date. In your code for the "buildop" stage you can generate any number of records based on the days in between, weekends, and last day of the month.
Please refer to page 54-1 in the Parallel Job Developer's Guide on how to make custom stages.
-
- Participant
- Posts: 19
- Joined: Thu Jun 15, 2006 6:25 am
bchau wrote:You really shouldn't set your topic to "urgent" cuz everyone's issue is urgent in their own eyes. Your topic should be set to a brief discription of your problem. Saying that your problem is "urgent" will not make the users answer your questions any sooner. Please realize that most users do not get paid to support. They are just doing it out of the goodness of their heart. If you need quick responses, you are better off contacting your vendor as they are paid to support the software.
Please also be aware that a lot of the users are in the US and it is their sleepytime right now.
Regarding your issue, you could make a custom stage that would take in the start and end date. In your code for the "buildop" stage you can generate any number of records based on the days in between, weekends, and last day of the month.
Please refer to page 54-1 in the Parallel Job Developer's Guide on how to make custom stages.
Thanks for your reply and suggestions too.. i ll follow them afterwards....client has said not to use any custom stages so any other option?
I make it a point to avoid answering any posts that are urgent apart from a short admonition, but in this case I'll at least give a direction to look further
1) If you add a day to a date and compare the month to see if it is unequal to the original date's month then you have found the last day of the month.
2) It was urgent enough for you to post your question but obviously not urgent enough for you to use the SEARCH facility to find out that this question has been asked (and answered) several times before.
1) If you add a day to a date and compare the month to see if it is unequal to the original date's month then you have found the last day of the month.
2) It was urgent enough for you to post your question but obviously not urgent enough for you to use the SEARCH facility to find out that this question has been asked (and answered) several times before.
-
- Participant
- Posts: 19
- Joined: Thu Jun 15, 2006 6:25 am
-
- Participant
- Posts: 19
- Joined: Thu Jun 15, 2006 6:25 am
-
- Participant
- Posts: 19
- Joined: Thu Jun 15, 2006 6:25 am
If your maximum number of days difference is some manageable amount (i.e. about one month), then you can have a transform or switch stage and use the value you calculate for days to specify output rows, then later on in the job collect those rows back to a single stream. This is the simplest way of doing this kind of thing if your maximum number is known.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Add 31 days to the date (DateFromDaysSince() function). Extract the month and year components of that date (MonthFromDate() and YearFromDate() functions). Assemble the date of the first of that month (by using 1 as the day number with the derived year and month), assembled as a string. Subtract 1 from that date (DateFromDaysSince() function with -1 as the Days argument. Voila!
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.