MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Check for Empty file in JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
arunarao
Beginner


Joined: 27 Dec 2005
Posts: 4
Topics: 2
Location: India

PostPosted: Wed May 17, 2006 12:05 am    Post subject: Check for Empty file in JCL Reply with quote

Hi,

I need to check if a file is empty or not in the JCL.
The only thing I could come up with was :

//DEL EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//FILEIN DD DSN=<file>,DISP=SHR
//SYSIN DD *
PRINT INFILE(FILEIN) CHARACTER COUNT(1)

This step gives a RC=4 if the file is empty. Else it will print the first record and give a RC=0.
But this seems to be a crude way of doing it. Is there anything else that can be used?


Thanks...
Back to top
View user's profile Send private message
Jaya
Beginner


Joined: 02 Sep 2005
Posts: 77
Topics: 10
Location: Cincinnati

PostPosted: Wed May 17, 2006 12:48 am    Post subject: Reply with quote

Arunarao,

Please search before posting...

http://www.mvsforums.com/helpboards/viewtopic.php?t=5319


Thanks,
Jaya.
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
arunarao
Beginner


Joined: 27 Dec 2005
Posts: 4
Topics: 2
Location: India

PostPosted: Wed May 17, 2006 1:30 am    Post subject: Reply with quote

Oops.. Sorry and thanks Jaya

Cheers,
Aruna
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group