IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get File Size with out opening the file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 290
Location: Basel, Switzerland

PostPosted: Tue Apr 11, 2006 3:32 pm
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top