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
 

 

Identify the empty files created in the proc and delete them

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Abhijeet Naik

New User


Joined: 13 Jun 2006
Posts: 2

PostPosted: Wed Nov 01, 2006 8:57 am    Post subject: Identify the empty files created in the proc and delete them
Reply with quote

I have a procedure in which 6 files are getting created.This proc is executed thru a job.Now from this six files some files are empty.Now can anyone give me a logic such that I can identify the empty files in the proc and delete them.This should be done without making use of ICETOOL.

Title edited from "jcl" to "Identify the empty files created in the proc and delete them" : Priyesh.
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Nov 01, 2006 9:18 am    Post subject: Re: jcl
Reply with quote

Quote:
This should be done without making use of ICETOOL.

okie... IDCAMS works ???

Code:
//*************************************************
//*  STEP RETURNS RC=4, IF FILE IS EMPTY
//*************************************************
//STEP010 EXEC PGM=IDCAMS
//IN DD DSN=DATASET.EMPTY.CHECK,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DATA
PRINT INFILE(IN) COUNT(1)
/*
//************************************************
//*  STEP DELETES THE FILE, IF RC=4 FROM LAST STEP
//************************************************
//STEPIF# IF STEP010.RC = 4
//STEP020 EXEC PGM=IEFBR14
//DELDATAS DD DISP=(OLD,DELETE,DELETE),
DSN=DATASET.EMPTY.CHECK
//ENDSTEPIF# END-IF


And would you please consider following points before postings.
Back to top
View user's profile Send private message
Abhijeet Naik

New User


Joined: 13 Jun 2006
Posts: 2

PostPosted: Thu Nov 02, 2006 12:16 pm    Post subject: Re: Identify the empty files created in the proc and delete
Reply with quote

Thanks Priyesh
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


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