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 Usergroups Profile Log in to check your private messages Log in
 

 

Temporary file copy

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Temporary file copy
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Sat Mar 28, 2015 2:37 pm    Post subject: Reply to: Temporary file copy
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: 331
Location: USA

PostPosted: Sat Mar 28, 2015 8:27 pm    Post subject: Reply to: Temporary file copy
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:
http://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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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