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
 
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 Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 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 Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
No new posts How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm

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