sequential file issue while appending to the same file

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
mouni
Charter Member
Charter Member
Posts: 49
Joined: Tue Jul 11, 2006 11:30 pm

sequential file issue while appending to the same file

Post by mouni »

Hi

i have 3 seq file stage and all of them are in the append mode writing to the SAME file.

So , when i see the director for logs

For Seq 1 : it has x records exported
For Seq_2 : it has y records exported
For Seq 3 : It has z records exported

But the count of records in the seq file is less than x+y+z.
What could be the issue ? Can i not keep them in Append mode ?

Any ways to prevent this loss of records ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: sequential file issue while appending to the same file

Post by chulett »

mouni wrote:i have 3 seq file stage and all of them are in the append mode writing to the SAME file.
Your problem, in caps, above.

Sequential files, anywhere on any platform or tool, are by their very nature sequential media and that name was not chosen lightly. While they can support multiple reader processes they can only support one writer process. Period.

Write to three different files. Combine them appropriately in another step, which could be as simple as cat'ing them together after job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mouni
Charter Member
Charter Member
Posts: 49
Joined: Tue Jul 11, 2006 11:30 pm

Re: sequential file issue while appending to the same file

Post by mouni »

Thanks , i had used the same cating in the after job ExecSH option but wanted to know if there are any other options with the combinability modes available or any other properties with the stage itself.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

While you may very well be able to merge the three streams (but don't cross them!) in the job before writing out a single link, there are no properties in the Sequential stage that will allow what you are doing otherwise to work.
-craig

"You can never have too many knives" -- Logan Nine Fingers
nsm
Premium Member
Premium Member
Posts: 139
Joined: Mon Feb 09, 2004 8:58 am

Post by nsm »

Hello all.

I am having the same issue with sequential file as mouni.
If I use Dataset will it be ok?

I am thinking its ok but let me know if I need to take anything in to consideration like locks or wait time for locks?

Thanks
nsm.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

concurrent writing in append mode to a dataset works.
Post Reply