Merge Stage Problem - deleting temporary file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Merge Stage Problem - deleting temporary file

Post by Amos.Rosmarin »

Hi,

I have a simple job that merge 2 files into a sequential file (multiple instance). The merge process is OK in all invocations but the job always aborts because of :

mergeHoz.1.Merge_Hoz: Error occurred while deleting temporary file

I checked and there is no permissions problem (everybody has full control).


Does anyone has an idea ??

Amos
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

At a guess I'd say two instances of your job are trying to use the same temporary file name. I believe the merge stage creates a file behind the scenes that contains your merged data. It needs to remove this file when the job finishes. I don't have access to the eservices knowledge base however it could be a known defect.

Have you tried merging your files via an external script? In Unix you could merge two files with a before job command such as "cat file1 >> file2". This would run a lot faster than the merge stage but the files do need to be in the same format.
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Vincent ,

Each instances creates it's own temp directory so I think there is no conflict, nevertheless even when I run it as a single instances job the same error happens.

I do not need to concatenate files, I need a real join based on common keys. The merge stage is the best way to do.

Amos
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you end up wanting to further explore the Unix side of this answer, besides 'catting' the two files there are also the 'merge' and 'sort -u' that can be looked into. The 'merge' option should be very similar to what you are trying to accomplish in the job. Plus, 'sort unique' is another option if all you are trying to do is remove duplicate rows between the two files.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

I want to know if anyone had seen this problem of 'Error occurred while deleting temporary file ' in a merge or sort stages ??

The 'pure inner join' i'm looking for can not be done by command line and anyway I do not have unix.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Doesn't seem like it so far. :(

Have you opened up a ticket with support? Could be something specific with the 7.0 release...
-craig

"You can never have too many knives" -- Logan Nine Fingers
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Merge Stage Problem - deleting temporary file

Post by elavenil »

Hi,

Make sure the both sequential files have records. I encountered the same problem if any one of the file does not have any records.

Hope this could help you.

Regards
Saravanan
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Saravanan ,

Both my files exist and has records.

My job contained a merge stage --> transformer --> a shatred continer that does FTP. I changed the shared container to a local one - the temp folders stay after the job but I do not get the abort message anymore.

I'll report this to Ascential support next week.

Cheers,
Amos
raviyn
Participant
Posts: 57
Joined: Mon Dec 16, 2002 6:03 am

Post by raviyn »

Did you get any response from Ascential about it. I am on DS v6.0.1 and I am also getting the same error. :(
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Hi,

I got no answer from Ascential support but I found an answer,

My job looked like this:

merge --> transformer --> seq file stage with sort filter command.

Ray was right - there was a timing problem, both the merge and the sort tried to use the same file. The funny thing is that even when I removed the sort command the job got corrupted and kept trying to do it ( i could see the sort process in the task manager and the output file was sorted).

The solution was to delete the job, recreate it and do the sort somewhere else.


Hope it helps you ,
Amos
bapajju
Participant
Posts: 82
Joined: Wed Nov 19, 2003 11:58 pm

Re: Merge Stage Problem - deleting temporary file

Post by bapajju »

I agree with you Sarvanan.You are correct.This problem comes when any of the file has no records.I had faced the same issue.If both the files have records then this issue never comes up.




elavenil wrote:Hi,

Make sure the both sequential files have records. I encountered the same problem if any one of the file does not have any records.

Hope this could help you.

Regards
Saravanan
Post Reply