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

Identify the empty files created in the proc and delete them


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 1448
Location: Chicago, IL

PostPosted: Wed Nov 01, 2006 9:18 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top