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
 

 

Utility To Find out Fileis Empty or Not.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Vineet

New User


Joined: 14 Sep 2005
Posts: 18

PostPosted: Wed Jul 12, 2006 11:39 am    Post subject: Utility To Find out Fileis Empty or Not.
Reply with quote

Hi All,

Want to know, is there any Utility which can tell that specific File (NON VSAM / VSAM) is EMPTY. I dont want to write any COBOL Pgm. I am looking for Utility.

Thanx
Rgds

Vinit A.
Back to top
View user's profile Send private message

Mfprogrammer

New User


Joined: 24 May 2006
Posts: 6

PostPosted: Wed Jul 12, 2006 12:07 pm    Post subject: Re: Utility To Find out Fileis Empty or Not.
Reply with quote

Hi Vineet,
You can use IDCAMS for the same.
In your SYSIN card, if you give
PRINT INFILE(ddname) CHARACTER COUNT(1)
it will return 4 if file is empty, else it will return 0.

Hope it helps.
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Wed Jul 12, 2006 12:13 pm    Post subject: Hi
Reply with quote

Vineet,

You can try ICETOOL with EMPTY option for VSAM ; as given below..


//STEP1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...
//TOOLIN DD *
COUNT FROM(IN) EMPTY
/*
//DEC IF STEP1.RC = 0 THEN
//STEP2 EXEC ...
...
//DECE ENDIF


Here if the file is EMPTY RC would be 12 .By checking this you can decide wthether the subsequent steps needs to be executed or not.STEP2 above excuted only if the file have some data in it.


-Han.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jul 12, 2006 8:24 pm    Post subject:
Reply with quote

For more information on using DFSORT's ICETOOL for this kind of thing, see:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html#t10
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts HLIST Utility In Batch Virendra Shambharkar TSO/ISPF 4 Fri Apr 07, 2017 3:38 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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