File Watcher in Mainframe



Ask queries about other IBM Tools like Tivoli, COBTEST, Fault Analyzer, z/OS File Manager, Workload Simulator, APA, SCLM, Merge & Migration Tools etc...

File Watcher in Mainframe

Postby saketsd » Tue Dec 11, 2012 8:42 pm

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.
saketsd
 
Posts: 1
Joined: Tue Dec 11, 2012 8:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: File Watcher in Mainframe

Postby dick scherrer » Tue Dec 11, 2012 9:06 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: File Watcher in Mainframe

Postby Robert Sample » Tue Dec 11, 2012 9:09 pm

how to write a JCL which can check the presence of a specific file at a specific time
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.

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: File Watcher in Mainframe

Postby Ed Goodman » Tue Dec 11, 2012 9:20 pm

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.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times


Return to Other IBM Tools

 


  • Related topics
    Replies
    Views
    Last post