View previous topic :: View next topic
|
Author |
Message |
harish5002
New User
Joined: 21 Jul 2010 Posts: 23 Location: chennai
|
|
|
|
Hi Team,
I have got a problem in our company. We have technology called OLAS. Like instream cobol it will build jcl and will execute. Here the problem when that job runs it will create some temporary files and will delete at end but some times it will deleting.
So now my requirement is i need to get email alert when there is a left over file in mainframe. Here the problem is that temporary file is not constant. It will have Job id attached to it. for example:
XP1.SMS.T*.avinash --> Here * indicates job id so this will keep on changing based at job execution. How to verify whether any left over file is present in the system or not thru JCL. Please help me if any once have idea. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Your storage people probably have reports which could easily identify this.
Why don't you look at why the dataset sometimes gets left? "Sometimes" isn't real in computing, it just means you don't know why, yet. |
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
I think, there can be possible reasons for file left overs. If a job abended in the middle and hence datasets could not be deleted (because the delete step is at the end of the job). Even if the job was restarted it will have a different Job ID. So, the datasets with the prior Job ID are left over.
Coming back to the original question:
Why don't you try this:
Code: |
//STEP0001 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES('XP1.SMS.T*.avinash')
/* |
If the Return Code is 0 then there are files left over. If Return code is 4 then there are No files present.
P.S.: I got this by searching in this forum itself. This may help:
ibmmainframes.com/viewtopic.php?t=11350 |
|
Back to top |
|
|
|