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

Delay a single step for n mins


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

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Fri Feb 02, 2007 7:54 pm
Reply with quote

My requirement is, when my cobol program tries to open the input file, I have to throw an error message through the
cobol program.

What I tried was, I kept the dataset open, and submitted the JCL. The job went on HOLD, and started waiting for resources.

When I come out of the Input file and then release the job, the job completes, before i could go back and open the file.

Now is there a way I put some delay inside the program, which would give me time to open the input file, after the program
starts running ?

Cheers.
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 Feb 02, 2007 7:59 pm
Reply with quote

I should think that just as your program waited for the resource you were holding, you will end up waiting when your program is holding it....
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Fri Feb 02, 2007 8:13 pm
Reply with quote

Why do you want to do this?

Maybe someone can offer an alternative method to achieve your requirement.
Back to top
View user's profile Send private message
murali922

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Fri Feb 02, 2007 8:31 pm
Reply with quote

The job normally waits for the resource, and executes the program when the resource is freed.

But the program normally would not hold if the same resource is used by some thing else...

So I want to create a scnario where the resource should be free when the job is about to execute the program, but as soon as the program starts, the corresponding resource should be allocated to something else..

E.G "A" is the resource. I have a JCL which executes Program XYZ.

When the job is submitted, "A" should be free. But as soon as the control goes into the program, "A" should be used by some other resource (like I will keep the file open ).

I want to introduce a delay in the program (which would be used only during my testing), so that before resource "A" is used, I have enough time to think and use the same in some way....
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 Feb 02, 2007 10:08 pm
Reply with quote

Do an ACCEPT from the console, that will take care of everything....
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: Fri Feb 02, 2007 11:19 pm
Reply with quote

Hello,

Quote:
But the program normally would not hold if the same resource is used by some thing else...

YES, it would. Two users/processes should NOT use the same qsam file (see below).

If you want time to think before the program runs, think and then run the program.

Quote:
When the job is submitted, "A" should be free. But as soon as the control goes into the program, "A" should be used by some other resource (like I will keep the file open ).


This is the same question you posted recently in a different topic thread. The answer is still the same - one user at a time on the qsam file - especially when it is going to be output which is what you posted previously.
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 Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Limiting delay with GETMSG CLIST & REXX 11
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
Search our Forums:

Back to Top