Page 1 of 1

Unable to open file status=13

Posted: Tue Jan 28, 2014 6:19 am
by roy
Hi All,
I'm experiencing a weird behavior:
If I have a job that writes to a sequential file and upon completion reads from that same file in the same job it fails saying:
unable to open file <fname> status=13

Code: Select all

all in 1 job:
DB > Xfm > SF > Xfm > DB 
This fails

2 separate jobs:
job1:
DB > Xfm > SF
job2:
SF > Xfm > DB
This works
If I take that job and split it into 2 different jobs where job 1 writes to the file and job2 reads from it, then it works fine.

Anyone came across this and has a solution?
(other then splitting the job as I mentioned)

Thanks,

Posted: Tue Jan 28, 2014 8:39 am
by chulett
I certainly haven't. The Sequential File stage is a 'blocking' stage so it finishes all of the writes before it open the file on the reading side. I've done exactly that many times in the past without issue.

FWIW, that 13 means "Invalid data". :?

Posted: Tue Jan 28, 2014 1:45 pm
by ray.wurlod
Are the metadata (file name, format as well as columns) absolutely identical both sides of the Sequential File stage?

Posted: Wed Feb 12, 2014 9:28 am
by roy
I've done this many a time before with no issues.
Yes Rays they are the same, using save and load.
after the file is created I can view the data from either links.

Just seems like a weird File System issue of some sort.

Posted: Wed Feb 12, 2014 2:11 pm
by asorrell
I believe it is a buffering problem. The write part of the stage may say "I've done all my writes", but if the UNIX buffers haven't finished dumping to disk then the read still shows the file is open pending updates.

I'm not aware of an easy fix, I usually break it into two jobs to avoid this issue.