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

Temporary file copy


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
harish5002

New User


Joined: 21 Jul 2010
Posts: 23
Location: chennai

PostPosted: Sat Mar 28, 2015 1:36 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Mar 28, 2015 2:37 pm
Reply with quote

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
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Sat Mar 28, 2015 8:27 pm
Reply with quote

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
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top