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
 

 

How to get File Size with out opening the file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
michaelraj

New User


Joined: 01 Sep 2005
Posts: 43
Location: Bangalore

PostPosted: Tue Apr 11, 2006 11:02 am    Post subject: How to get File Size with out opening the file
Reply with quote

Hi All,

I need a program to find the size of a file with out opening or reading the records. I want to know only the size of a file through cobol program and not the record length. I tried to search in the forum, but I did not get necessary info. So I request you all to please look into it and give some brief idea or else program outline.

Thanks & Regards,
-Mike.
Back to top
View user's profile Send private message

martin9

Active User


Joined: 01 Mar 2006
Posts: 287
Location: Basel, Switzerland

PostPosted: Tue Apr 11, 2006 3:32 pm    Post subject:
Reply with quote

hy michaelraj,

your topic is not that easy to resolve with cobol.
if you have not any utility, which you can invoke
in cobol, you have to get this information from
somewhere else (ie. storage manager, idcams,
or whatsoever is useful) and give it to the cobol
program as an input.

you can also try to include in your cobol program
the appropriate ispf services. check your doku
for the call interface using ispf...

martin9
Back to top
View user's profile Send private message
michaelraj

New User


Joined: 01 Sep 2005
Posts: 43
Location: Bangalore

PostPosted: Sat Apr 15, 2006 10:28 am    Post subject: Re: How to get File Size with out opening the file
Reply with quote

Hi Martin,

Thanks for your information. If it is not possible by cobol, please tell me whether is it possible with Rexx program. Or other wise explain how can we do this with IDCAMS. Waiting for your response,

Thanks & Regards,
-Mike.
Back to top
View user's profile Send private message
bmadhu346

New User


Joined: 05 Jul 2005
Posts: 7
Location: hyderabad

PostPosted: Fri Apr 21, 2006 10:11 pm    Post subject: Re: How to get File Size with out opening the file
Reply with quote

hI

HI
U GOT GOOD QUESTION THAT HOW TO FIND OUT THE NUMBER OF RECORDS WITHOUT OPENING THE FILE
BOSS IF IT IS A GDG (GENERATION NUMBER) IF U HIT PF9 THEN WE WILL GET ALL THE PROPERTIES OF THE FILE .IN TSO ALSO WE CAN FIND OUT THROUGH FILEAID BUT I AM NOT SURE
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Apr 22, 2006 4:17 am    Post subject:
Reply with quote

Hi Mike,

You can't get an exact count with blocked recs. You can for unblocked recs or blocked files that haven't been opend as MOD (EXTEND in COBOL speak). But you can approximate.

Does it have to be an exact count?
Back to top
View user's profile Send private message
bmadhu346

New User


Joined: 05 Jul 2005
Posts: 7
Location: hyderabad

PostPosted: Sat Apr 22, 2006 8:13 pm    Post subject: Re: How to get File Size with out opening the file
Reply with quote

Hi
U got a Good Question
Please find and try this trick in TSO if u do in TSO really u will enjoy
Boss u can able to see the not only the file size .i mean all the attributes of the file charcters u can see
Please folloe the below procedure
1) Go to TSO regoin
2)Give 3.2 I think u know this opting genrally we will use for the data set creation like dataset creation u can see option like VSAM Utilities in 3.2 so give 'V' then below give the DATA SET name
3) Hit Enter
4) Then u will get VSAM utility screen
5)give 3 in process request and give 9 on data type(right side)
6)Hit enter
7)u will get other screen called the 'list catlog information'
8)in that give opting 4 in the catlog data type and give 'all' on right side
hit enter then give exec then u will get all the properties of the file

If u r unable to do let me know
Madhu
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Apr 22, 2006 8:51 pm    Post subject:
Reply with quote

Hi Madhu,

What you suggest will NOT get you the # of recs in the PS file. They can't get that piece of info because of what I noted in my prev post.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Natural ADABAS Opening with CTS enikhilk Mainframe Jobs 0 Wed Nov 30, 2016 5:37 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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