Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us