Hi,
I am new to the mainframe. Does anyone know how to write a JCL which can check the presence of a specific file at a specific time?
I need to run this check 3 times everyday and shoot a mail/start another process accordingly.
Thanks in advance.
File Watcher in Mainframe
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: File Watcher in Mainframe
Hello and welcome to the forum,
First - JCL cannot do this. JCL can only execute "things".
You need to talk with your scheduling to define when this process should be submitted/run.
Do you merely want to check for the presence of the file or determine if it is empty?
You don't "shoot" e-mails. Sending the email should just be part of the job that looks at the file.
First - JCL cannot do this. JCL can only execute "things".
You need to talk with your scheduling to define when this process should be submitted/run.
Do you merely want to check for the presence of the file or determine if it is empty?
You don't "shoot" e-mails. Sending the email should just be part of the job that looks at the file.
Hope this helps,
d.sch.
d.sch.
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: File Watcher in Mainframe
This cannot be done -- period. JCL does only one thing - execute programs. You can write code and then write JCL to execute that code, if desired.how to write a JCL which can check the presence of a specific file at a specific time
Furthermore, what you want to do is generally accomplished by the site scheduling software; most of them can identify when a new file is allocated on the system and start up a job based on the presence of that job. This also removes human intervention from the process, allowing you (or whomever) to take a vacation every now and then.
-
- Posts: 341
- Joined: Thu Feb 24, 2011 12:05 am
- Skillset: 30 years on IBM mainframes
- Referer: Searched for Frank Yeager
Re: File Watcher in Mainframe
saketsd, if your background is Linux, then the mainframe equivalent to CRON is the scheduling software. In my shop, we use BMC's Control-M. Last place was something different. your place is probably something different still.
Most of those products have something built in that can watch for files to be cataloged and then start a task, run a job, or send a message.
Most of those products have something built in that can watch for files to be cataloged and then start a task, run a job, or send a message.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
transferring file from pc to mainframe pds member
by valeca » Wed Sep 28, 2022 3:42 am » in TSO & ISPF - 5
- 3348
-
by Pedro
View the latest post
Thu Sep 29, 2022 12:11 am
-
-
- 8
- 5115
-
by enrico-sorichetti
View the latest post
Fri Mar 12, 2021 4:09 pm
-
- 1
- 2884
-
by Robert Sample
View the latest post
Sun Feb 20, 2022 8:04 pm
-
- 1
- 3614
-
by jibanes
View the latest post
Sun Dec 06, 2020 1:41 am
-
- 2
- 2477
-
by brown7
View the latest post
Sun Nov 07, 2021 1:11 pm