Page 1 of 1

Failed to open file in datastage status=13

Posted: Wed Jun 08, 2016 11:43 am
by thurmy34
Hi gurus
Since a few days we have randomly the following error
failed to open file in datastage status=13
It's happen inside the jobs who wrote and read a file.
The write is ok the read failed.
After the abort we can relaunch the job and it works.
Can you help me ?
Thank you

Posted: Wed Jun 08, 2016 5:07 pm
by ray.wurlod
Check the permissions on the file and its parent folder, and determine under which user ID the jobs run (you may also need to check group membership).

Bonne chance!

Posted: Wed Jun 08, 2016 6:46 pm
by PaulVL
Cluster environment and your job gets sent to a different host that doesn't have the mount?

Posted: Thu Jun 09, 2016 1:29 am
by thurmy34
Hi all
Thank you for your answers.
The weird thing is that we can write the file but not open it right after Inside the the same job.

Posted: Thu Jun 09, 2016 12:46 pm
by Teej
You should not be reading and writing to the same file at the same time. It just does not work well that way due to the locks that we impose while writing to the file.

I would suggest a review of the job design is in order.

Posted: Fri Jun 10, 2016 12:33 am
by ray.wurlod
Actually, Teej, such blocking operations are perfectly possible, feasible and even normal in server jobs.

Put another way, in server jobs a passive stage can have an input link (writing) AND an output link (reading). When the job runs, the output link is not opened until the input link has been closed.

One use case is pre-populating hashed files in the same job in which they're used to deliver reference data.

Check also that the file pathname is EXACTLY the same on the input and the output link - you may be trying to open a non-existent file. That it works sometimes suggests that you may be using a parameter that sometimes has an incorrect value, or it may be a timing issue in the underlying file system (which may be a bit slow to effect the close, because it has to update date/time modified in a large directory and date/time accessed in all parent directories, for example).