View previous topic :: View next topic
|
Author |
Message |
Abhijeet Naik
New User
Joined: 13 Jun 2006 Posts: 2
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
Abhijeet Naik
New User
Joined: 13 Jun 2006 Posts: 2
|
|
|
|
Thanks Priyesh |
|
Back to top |
|
|
|