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 find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


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