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

Reg file open error, the file is in edit mode


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
poongs
Warnings : 1

New User


Joined: 24 Jan 2007
Posts: 28
Location: pune

PostPosted: Wed May 02, 2007 4:53 pm
Reply with quote

Hi all

I have a doubt in file open..my pgm has a normal input (flat file) and i'm opening tht file in my cobol pgm.i'm handling the error for file open problem also after file opening.But my code is not abending if i try to submit the job after opening the file in edit mode.And also i have given a TIME parameter in my JCL...my job is not abending..but once i come out of the file in edit mode..it is executing fine.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed May 02, 2007 4:59 pm
Reply with quote

That's because you have the file in EDIT mode, i.e. DISP=OLD which stops the batch job from allocating the file until you release it by coming out of edit mode.
Back to top
View user's profile Send private message
poongs
Warnings : 1

New User


Joined: 24 Jan 2007
Posts: 28
Location: pune

PostPosted: Thu May 03, 2007 11:21 am
Reply with quote

Thnx 4 the reply...i tried using DISP=SHR also...and In the Cobol pgm i'm opening in extend mode...but still it is not throwing a n error...and also i wud like to know why the pgm is not abending..since i ahve given a TIME parameter...in the jobcard...
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu May 03, 2007 1:15 pm
Reply with quote

What do you want here, successful execution or abend?
As per my view, you want an abend to happen here..? icon_confused.gif
When the resource is not available, your program is not getting control, it will be in wait state. when you release it it will be through.
TIME param will control execution time. if execution time of program exceeds the TIME parameter then program will abend.
Please see that execution time is different from waiting time..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Thu May 03, 2007 2:49 pm
Reply with quote

DISP=SHR on the job means nothing. You have the file held in EDIT which uses DISP=OLD. It only takes one DISP=OLD to stop ANY OTHER DISP from gaining access.

The time parameter as pointed out by agkshirsagar is for the execution time, and if you job is not executing because of dataset contention, it isn't going to use any time, so will not abend.
Back to top
View user's profile Send private message
poongs
Warnings : 1

New User


Joined: 24 Jan 2007
Posts: 28
Location: pune

PostPosted: Thu May 03, 2007 3:20 pm
Reply with quote

Yea...i can understand ur point ...but i want the pgm to abend here...my question is why the pgm is not abending if i open the file in edit mode & try to submit the job?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Thu May 03, 2007 3:35 pm
Reply with quote

Because the DISP=OLD used by your online session does not permit the batch job to access the file. It can not access the file until your online session has released the file, and when that happens there is no longer any file contention, so your job reads the file, or whatever.

This is a restriction imposed by the operating system. Perhaps you should try running two batch jobs both using DISP=SHR and see what happens.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu May 03, 2007 8:57 pm
Reply with quote

Hello,

Hopefully, this is just an experiment. . . .

If a file might be opened in edit, there should be no batch jobs submitted that would access the dataset. While the operating system will not let the batch job continue, the job will tie up machine resources needlessly. Depenging on the wait time-out set at your location, the job will eventually abend (time our) or be canceled by the operators.

Neither is a proper way to process.
Back to top
View user's profile Send private message
poongs
Warnings : 1

New User


Joined: 24 Jan 2007
Posts: 28
Location: pune

PostPosted: Fri May 04, 2007 2:01 pm
Reply with quote

Thnx everyone for all ur explanations...got some idea on this topic....
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri May 04, 2007 7:46 pm
Reply with quote

You're welcome icon_smile.gif

Something i neglected to mention previously - the TIME= parameter is for cpu time, not device wait time.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Fri May 04, 2007 7:47 pm
Reply with quote

I suppose it would have 522'd eventually - depending on the site definitions for idle timeout.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri May 04, 2007 8:19 pm
Reply with quote

Unless the "edit" session timed out first. . . icon_wink.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Sat May 05, 2007 3:43 am
Reply with quote

Quote:
I suppose it would have 522'd eventually - depending on the site definitions for idle timeout.

Aaaaaaaaaaaaaah, my open reply did not specify which would time out first, the job or the TSO session. Covered all eventualities with only one reply icon_razz.gif
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Sat May 05, 2007 6:14 pm
Reply with quote

Just for information if you edit a dataset in ISPF , ISPF will allocate the dataset with DISP=SHR
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Sat May 05, 2007 10:43 pm
Reply with quote

nevilh

Quote:
Just for information if you edit a dataset in ISPF , ISPF will allocate the dataset with DISP=SHR

I sort of remember this from a previous thread we had together, but somehow recall this was for a PDS rather than a PS.

Any clarification welcome.
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Sun May 06, 2007 12:01 am
Reply with quote

Clarification not required you are right ..... I should read the posts more carefully
Back to top
View user's profile Send private message
girias

New User


Joined: 09 Feb 2007
Posts: 26
Location: Chennai

PostPosted: Mon May 07, 2007 7:34 pm
Reply with quote

Hi, how can we set the device wait time limit for a job?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon May 07, 2007 7:46 pm
Reply with quote

Unless you are a systems programmer, you can not.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts Help on IMS -API URL migrating from P... IMS DB/DC 1
No new posts MF professionals open positions Mainframe Jobs 0
No new posts JES datasets IO Error ABENDS & Debugging 3
No new posts Error to invoke MPP program through B... IMS DB/DC 3
Search our Forums:

Back to Top