Unable to open file status=13

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
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Unable to open file status=13

Post 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,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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". :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are the metadata (file name, format as well as columns) absolutely identical both sides of the Sequential File stage?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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.
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post 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.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply