New file creation for Each time the job runs

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
sudharma
Participant
Posts: 55
Joined: Wed Jan 24, 2007 10:28 am

New file creation for Each time the job runs

Post by sudharma »

Hi Everyone,


i have a job which writes data into a Sequencial file. My requirement is , i have to create a file (abc.txt). but each and everytime the job runs , i have to create a abc.txt along with a time stamp when data is written into the file abc.txt.


can anyone hint me on how should i approach .

Thank you all
sudharma
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Re-name the file after each run in after job sub-routine "ExecSh".

Code: Select all

mv /fully/qualified/path/of/abc.txt /fully/qualified/path/of/abc`date +"%Y-%m-%d-%H.%M.%S"`.txt 
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Do you mean use the current timestamp on the filename? Search the forum, we discuss using job parameters or the start timestamp macro.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
sudharma
Participant
Posts: 55
Joined: Wed Jan 24, 2007 10:28 am

Post by sudharma »

Guru,

Thanks a lot for your help. I will try that

Sudharma
Post Reply