Hi All,
I have one problem, I am using a unix .text file as a one of the source file for a parallel Job, after look up and funnel stage one out put file(.txt) will come from the job which one should have same name (with the same path) as a source file.
How Can I handle this situation , one solution I have that is, we can give the another name to out put file and from unix overwrite this new file to old one.
but my question is how can i do this from Data Satge Parallel
Thanks,
Shamim
How to write in same file which is also a source file ?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 48
- Joined: Wed Jun 01, 2005 7:10 am
-
- Premium Member
- Posts: 210
- Joined: Wed Feb 16, 2005 7:17 am
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Re: How to write in same file which is also a source file ?
Regardless of Px job or Server job, you can create the output file with a temporary name (Ex: temp.txt). Now in job properties afterjob ExecSh specify on successfull completion (Mind this condition) of the job, rename the temp file name to source file name
mv temp.txt sourcefile.txt
This will overwrite sourcefile.txt with temp.txt and temp.txt will be removed also.
mv temp.txt sourcefile.txt
This will overwrite sourcefile.txt with temp.txt and temp.txt will be removed also.
sid19 wrote:One solution I have that is, we can give the another name to out put file and from unix overwrite this new file to old one. but my question is how can i do this from Data Satge Parallel
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Hi Akash
Hi Akash,aakashahuja wrote:Read the source file in to another file / dataset for intermediate staging before doing any of your processing....
Can u please give some detail about dataset file so that I can use it in my job
Sid