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
 

 

Calculating the File Size in JCL

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

New User


Joined: 21 Aug 2004
Posts: 4
Location: pune

PostPosted: Wed Nov 28, 2007 9:01 am    Post subject: Calculating the File Size in JCL
Reply with quote

I have one requirmement to send the acknowledge file along with the other files to the business servers.

The Acknowledge file should consists of

Code:

Name of file        Size of file             No of Records in File
-------------------------------------------------------------------
 ABC                     1.2MB                    100
 CDE                     4.0MB                    1000
 EFG                     8.5MB                    100000
-------------------------------------------------------------------
Files Transmitted On - "Today's Date"
-------------------------------------------------------------------


I am able to acheive the number of records in the files using SORT card as below:

Code:

  SORT FIELDS=(1,2,CH,A)                                 
  OUTFIL REMOVECC,NODETAIL,                             
    HEADER1=('SOURCE FILE NAME',20:'NUMBER OF RECORDS'),
    TRAILER1=('GCMEM  ',20:COUNT=(EDIT=(IIIIT)))     


It gives me file name and number of records.

But still i am fighting for Today's date and Size of the file in MB's.

Skumar144
Back to top
View user's profile Send private message

kbmk

New User


Joined: 27 Sep 2007
Posts: 24
Location: Chennai

PostPosted: Wed Nov 28, 2007 10:07 am    Post subject:
Reply with quote

Hi Sudhershan,

You can use the current date functions of OUTFIL, such as DATE=(abcd) or DATENS=(abc), to get the current date in various forms. The following snippet is taken from DFSORT material. I don't have much knowledge in the same as I am just learning. I have seen this before so thought of posting it for you:

Suppose you want to produce two output data sets. The first data set should have a single output record with the total count of records in your input data set. The second data set should have a single output record with today’s date in the form ddmmyyyy. The following statements would produce these two output data sets:

Code:

  OPTION COPY
  OUTFIL FNAMES=BRANCHCT,NODETAIL,REMOVECC,
    TRAILER1=(COUNT=(TO=ZD,LENGTH=10))
  OUTFIL FNAMES=CURDT,NODETAIL,REMOVECC,
    HEADER1=(DATENS=(DM4))


If the input data set has 12 records, the single record produced for BRANCHCT with the count in columns 1-10 is:

0000000012

If the job is run on July 15th, 2007, the single record produced for CURDT with the ddmmyyyy date in columns 1-8 is:

15072007

I don't know about file size.

Hope this helps
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Nov 28, 2007 8:21 pm    Post subject:
Reply with quote

Hello,

If you multiply the number of records times lrecl, you will have the size of the file in bytes.
Back to top
View user's profile Send private message
skumar144

New User


Joined: 21 Aug 2004
Posts: 4
Location: pune

PostPosted: Thu Nov 29, 2007 8:15 am    Post subject: Reply to: Calculating the File Size in JCL
Reply with quote

Thanks for the Checking the system dates.
But regarding file Size my customer wants the number of Tracks/Cylinders/Blocks that file is using. after getting these numbers we have to calculate the number of MB's required to store those many of tracks/Cylinders/Blocks.

By calculating the file size by No of Records * LRECL will give us the amount of file size utilised to store that many records, not the full allocated file size at that moment.

For example if my file size is 10 tracks and it holds only 2000 records, it is possible that the last track contains only 2 or 3 records. So while transfering that file to another server that server should have whole 10 tracks available to store this file.

Hope you are understanding my point.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Thu Nov 29, 2007 1:57 pm    Post subject: Reply to: Calculating the File Size in JCL
Reply with quote

Quote:

But regarding file Size my customer wants the number of Tracks/Cylinders/Blocks that file is using. after getting these numbers we have to calculate the number of MB's required to store those many of tracks/Cylinders/Blocks.

By calculating the file size by No of Records * LRECL will give us the amount of file size utilised to store that many records, not the full allocated file size at that moment.

For example if my file size is 10 tracks and it holds only 2000 records, it is possible that the last track contains only 2 or 3 records. So while transfering that file to another server that server should have whole 10 tracks available to store this file.
Hope you are understanding my point.


We understand Your point but not Your clients attitude ( grin )
Allocating a dataset there are many ways of requesting space ...cyl/trks, blocks, records, size..
Will the "thing" target of the file transfer have the same storage architecture and THE SAME DEVICE TYPES

the philosophy of storage management is to get rid of all the references to the HARDWARE architecture and think in terms of the logical entity

The size of the dataset should be more then enough for all the needs
Back to top
View user's profile Send private message
srebba
Warnings : 1

New User


Joined: 26 Apr 2007
Posts: 37
Location: USA

PostPosted: Tue Dec 18, 2007 2:39 am    Post subject:
Reply with quote

Hello,,
I came back..

hey, i have program to calcalute the VSAM file size in MB by using HI-A-RBA and Hi-U-RBA values from listcat..
Please let me know do u need that or you are allset already?

Thank you,,
Sree
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Dec 18, 2007 8:38 am    Post subject:
Reply with quote

Sree,

Quote:
i have program to calcalute the VSAM file size in MB by using HI-A-RBA and Hi-U-RBA values from listcat..

Not sure wheter TS still require this or not.

If the program 'doesn't bend' the forum rules (eg. proprietary material), surely you post it for 'future reference'.
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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