Every Run date and time should change
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 92
- Joined: Wed Mar 05, 2008 4:09 am
- Location: chennai
- Contact:
Every Run date and time should change
i have developed parallel job for the replace load where one of the output Archeive filename must have prefix Date and time how to acheieve.So for every run Date and time must change and it must overwrite(For eg:<Path><date&timefilename.dat>) and frequency of load is daily.
pradeep.v
Re: Every Run date and time should change
In UNIX:pradeep_nov18 wrote:i have developed parallel job for the replace load where one of the output Archeive filename must have prefix Date and time how to acheieve.So for every run Date and time must change and it must overwrite(For eg:<Path><date&timefilename.dat>) and frequency of load is daily.
if you are triggering Job through UNIX, then Add parameter which will have a value as
Var=Path/Time&DateFileName.Dat
Var=/home/Test/`date "+%Y%m%d&%H%M%S"`abc.dat
or
Just Add a Date parameter in UNIX
or
Have a routine and then pass a parameter through it
Equate RoutineName to DateTimeToTimestamp
Ans= oconv(@DATE, "DYMD[4,2,2]":@VM:"MCN"):"_" : oconv(@TIME, "MTS":@VM:"MCN")
Return(Ans)
Hope this will help you.
Syed
---------
Wait and Watch
---------
Wait and Watch
-
- Participant
- Posts: 92
- Joined: Wed Mar 05, 2008 4:09 am
- Location: chennai
- Contact:
Re: Every Run date and time should change
hi Syed,
Thanks for the reply got some idea.
my file name is in ETL server that that is local/data1/edw/temp folder, even i have parameterized this path accordling to my understanding.I have to prefix the date function with file name in that right,I am using parallel job so oconv and iconv is not there please suggest how to do within datastage if possible.
Thanks for the reply got some idea.
my file name is in ETL server that that is local/data1/edw/temp folder, even i have parameterized this path accordling to my understanding.I have to prefix the date function with file name in that right,I am using parallel job so oconv and iconv is not there please suggest how to do within datastage if possible.
pradeep.v
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you have MKS Toolkit or some other UNIX emulator installed you can also use an mv command to rename the file in an after-job subroutine ExecSH, using backquotes to capture the result of the date command.
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.