Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reg file open error, the file is in edit mode

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Reg file open error, the file is in edit mode
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 02, 2007 4:59 pm    Post subject:
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    Post subject: Re: Reg file open error, the file is in edit mode
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: 685
Location: Earth

PostPosted: Thu May 03, 2007 1:15 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu May 03, 2007 2:49 pm    Post subject:
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    Post subject: Re: Reg file open error, the file is in edit mode
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: 8593
Location: Back in jolly old England

PostPosted: Thu May 03, 2007 3:35 pm    Post subject:
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

Site Director


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

PostPosted: Thu May 03, 2007 8:57 pm    Post subject:
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    Post subject: Re: Reg file open error, the file is in edit mode
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

Site Director


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

PostPosted: Fri May 04, 2007 7:46 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri May 04, 2007 7:47 pm    Post subject:
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

Site Director


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

PostPosted: Fri May 04, 2007 8:19 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat May 05, 2007 3:43 am    Post subject:
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: 258

PostPosted: Sat May 05, 2007 6:14 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat May 05, 2007 10:43 pm    Post subject:
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: 258

PostPosted: Sun May 06, 2007 12:01 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon May 07, 2007 7:46 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us