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 Profile Log in to check your private messages Log in
 
Delay a single step for n mins

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Delay a single step for n mins
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: 3158
Location: Tucson AZ

PostPosted: Fri Feb 02, 2007 7:59 pm    Post subject:
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    Post subject: Re: Delay a single step for n mins
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    Post subject: Re: Delay a single step for n mins
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: 3158
Location: Tucson AZ

PostPosted: Fri Feb 02, 2007 10:08 pm    Post subject:
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

Site Director


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

PostPosted: Fri Feb 02, 2007 11:19 pm    Post subject:
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    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 More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm

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