- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Using hint values from rms to get filesize
Operating System - OpenVMS
1752812
Members
5660
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2011 11:22 AM
тАО02-08-2011 11:22 AM
Using hint values from rms to get filesize
Hi all,
I was wondering, how do i use the hint values provided by VMS for FIX and VFC files.
The data part is said to be with out any extra paddings ...
So how can we get the file size?
record_count + data_count or as every record is terminated with CRLF, shouldn't it be appropriate to use (2*record_count + data_count) for getting file size ... but then will it hold good for all the cases?
I was wondering, how do i use the hint values provided by VMS for FIX and VFC files.
The data part is said to be with out any extra paddings ...
So how can we get the file size?
record_count + data_count or as every record is terminated with CRLF, shouldn't it be appropriate to use (2*record_count + data_count) for getting file size ... but then will it hold good for all the cases?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2011 12:15 PM
тАО02-08-2011 12:15 PM
Re: Using hint values from rms to get filesize
> [...] the hint values [...]
The what?
> [...] said to be [...]
Who says what, exactly?
> So how can we get the file size?
Define "file size". VMS normally keeps track
of the disk space occupied by a file, but
whether that can be translated into a useful
byte count can depend on what's in the file.
To see what's really in a file:
HELP DUMP
Don't expect to see actual CR or LF
characters in a non-stream record format
file.
Is there some actual problem which you are
trying to solve?
The what?
> [...] said to be [...]
Who says what, exactly?
> So how can we get the file size?
Define "file size". VMS normally keeps track
of the disk space occupied by a file, but
whether that can be translated into a useful
byte count can depend on what's in the file.
To see what's really in a file:
HELP DUMP
Don't expect to see actual CR or LF
characters in a non-stream record format
file.
Is there some actual problem which you are
trying to solve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2011 01:24 PM
тАО02-08-2011 01:24 PM
Re: Using hint values from rms to get filesize
Tom,
Depends on what you mean by "filesize"
From DCL, F$FILE_ATTRIBUTES ALQ will give you the allocated disk space, some of which will probably be unused.
> (2*record_count + data_count) for getting
>file size ... but then will it hold good
>for all the cases?
No. Metadata size depends on the record format, and record lengths as odd lengths are padded.
For sequential files, EOF and FFB can be used to find the space in use (including both data and metadata).
If positive, FILE_LENGTH_HINT should be accurate to give you the data size, but if it's negative (invalid) you'll need to count.
Depends on what you mean by "filesize"
From DCL, F$FILE_ATTRIBUTES ALQ will give you the allocated disk space, some of which will probably be unused.
> (2*record_count + data_count) for getting
>file size ... but then will it hold good
>for all the cases?
No. Metadata size depends on the record format, and record lengths as odd lengths are padded.
For sequential files, EOF and FFB can be used to find the space in use (including both data and metadata).
If positive, FILE_LENGTH_HINT should be accurate to give you the data size, but if it's negative (invalid) you'll need to count.
A crucible of informative mistakes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2011 04:34 PM
тАО02-08-2011 04:34 PM
Re: Using hint values from rms to get filesize
Like this?
$ filesize = F$FILE_ATTRIBUTES("LOGIN.COM","EOF") * 512 + F$FILE_ATTRIBUTES("LOGIN.COM","FFB") - 1
$ SHOW SYMBOL filesize
FILESIZE = 2019 Hex = 000007E3
This gives you the used space of a file with file organization = SEQ (=sequential).
You didn't tell which file organization nor did you tell whether this is needed in a program or a command procedure. And then you didn't tell what you need that number for at all.
I would give you 3 lemons for a poorly asked question. ;-)
/Guenther
$ filesize = F$FILE_ATTRIBUTES("LOGIN.COM","EOF") * 512 + F$FILE_ATTRIBUTES("LOGIN.COM","FFB") - 1
$ SHOW SYMBOL filesize
FILESIZE = 2019 Hex = 000007E3
This gives you the used space of a file with file organization = SEQ (=sequential).
You didn't tell which file organization nor did you tell whether this is needed in a program or a command procedure. And then you didn't tell what you need that number for at all.
I would give you 3 lemons for a poorly asked question. ;-)
/Guenther
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP