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 

Size of the file.

 
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
Martin
Beginner


Joined: 20 Mar 2006
Posts: 133
Topics: 58

PostPosted: Wed Feb 21, 2007 12:54 pm    Post subject: Size of the file. Reply with quote

Hi,

A nightly job creates a file . I need to find out the size of the file and based on the size I need to make a decision of whether to FTP the file or not.

Is batch way to find out the size of the file ? (KB,MB... )

-Mt
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Feb 21, 2007 1:55 pm    Post subject: Reply with quote

I'd use SORT to create a record count, then decide based on the number of records.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Feb 21, 2007 1:58 pm    Post subject: Reply with quote

Martin,

you can have a rough estimate of total bytes by this formula
Code:

total bytes = Lrecl * Record count


So if your lrecl is 80 and you 620 records then total bytes = 80 * 620 = 49,600

1 KB = 1024 bytes

1 MB = 1024 * 1024 bytes.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Thu Feb 22, 2007 1:14 am    Post subject: Reply with quote

You cam add a step with REXX, and set a return code based on the size.

O.
________
Mercedes-Benz W460 history


Last edited by ofer71 on Sat Feb 05, 2011 11:57 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Thu Feb 22, 2007 10:27 pm    Post subject: Reply with quote

Martin,

Why not put a rec ctr in the pgm that creates the file, then use Kolusu's equation to calc the file size. Set a RC for the ftp step based on the calc..
_________________
Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
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