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

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: 7311
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

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:
//STEP0001 EXEC PGM=IDCAMS           
//SYSPRINT DD  SYSOUT=*               
//SYSIN    DD  *                     

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:
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 Compare the file record count percent... DFSORT/ICETOOL 2
No new posts compare two file to find position/dat... SYNCSORT 2
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts Record count of RECFM=U tape file DFSORT/ICETOOL 17
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
Search our Forums:

Back to Top