IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

File status '49' when opening file in I-O mode


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajendraa

New User


Joined: 22 Dec 2006
Posts: 7
Location: Bangalore

PostPosted: Fri Dec 22, 2006 10:41 am
Reply with quote

Hi,

I am using 2 files in my job.

Code:

//IN    DD    DSN=TD.OQ.TEST(MEMB1),DISP=SHR
//      DD    DSN=TD.OQ.TEST(MEMB2),DISP=SHR


I am opening IN-File in I-O mode in the program.

What the program should do:

If the first charater is '0' in any record of the files it should be updated with '1'.

Problem :
If the records in first file(MEMB1) matches the criteria it is updating with '1'
but if the record in second file(MEMB2) mathches the criteria, i am getting File status 49.


If i change the order of the files in the job, then records in MEMB2 are updated and getting error for record in MEMB1.


Code:

//IN    DD    DSN=TD.OQ.TEST(MEMB2),DISP=SHR
//      DD    DSN=TD.OQ.TEST(MEMB1),DISP=SHR


Any help on this would be appreciated.

Regards,
Raj
Back to top
View user's profile Send private message
prafull

New User


Joined: 08 Dec 2006
Posts: 48

PostPosted: Fri Dec 22, 2006 11:01 am
Reply with quote

Hi rajendraa,
did not get your problem exactly but watever I understood I would suggest,,
merge the files MEMB1 ,MEMB2 into a new file say MEMB3..
Now open MEMB3 in I-O mode..
and apply your logic..
It should work..
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Dec 22, 2006 5:38 pm
Reply with quote

rajendraa wrote:
I am opening IN-File in I-O mode in the program.

If the records in first file(MEMB1) matches the criteria it is updating with '1'
but if the record in second file(MEMB2) mathches the criteria, i am getting File status 49.

If i change the order of the files in the job, then records in MEMB2 are updated and getting error for record in MEMB1.


Since the pds members were concatenated, I would think that the input would be seamless.

File status 49 reads: The execution of a DELETE or REWRITE statement was attempted on a file not open in the I-O mode.

Unless somebody knows why concatenated pds members can't be accessed in I-O mode, sounds a bit like a bug...... icon_eek.gif
Back to top
View user's profile Send private message
rameshbe

New User


Joined: 21 Jul 2006
Posts: 1

PostPosted: Fri Jan 12, 2007 7:43 pm
Reply with quote

hai rajendra,

file status 49 is

The execution of a DELETE or REWRITE
statement was attempted on a file not open
in the I-O mode.

in thsi case fs 49 will come may be u r not opening the second file in i-o mode that may be the reason please check that once ..

i think this may hlps u ..

Regards
Ramesh
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jan 13, 2007 1:29 am
Reply with quote

Hello,

If my memory can be trusted, i recall that trying to open concatenated pds members for i-o has problems. Again, if i recall correctly, the first member "works" but members 2 thru n may not.

A workaround might be to run 2 identical steps that process 1 member each.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts HILITE on Browse mode? TSO/ISPF 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top