- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- How to know the records' number of a file ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
01-28-2015 09:10 AM
01-28-2015 09:10 AM
How to know the records' number of a file ?
Hello,
Is there a way to know how many records a specific RMS file (index or sequential) has ?
It can be via DCL.
Regards /Ofer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 09:38 AM
01-28-2015 09:38 AM
Re: How to know the records' number of a file ?
This sounds a little too generic to be able to answer with any confidence. Also, info about the system is a bit lacking. Can you please update this with at least the OpenVMS version information?
Also, what problem are you trying to solve? Many applications have the ability to report record counts directly without involving either DCL or any external program. Perhaps a description of your environment would be of assistance too.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 10:13 AM
01-28-2015 10:13 AM
Re: How to know the records' number of a file ?
There are lots of ways to do it. One of the classic tricks is to use SEARCH/STATISTICS with an empty string:
$ search/statistics/nooutput sys$manager:systartup_vms.com "" Files searched: 1 Buffered I/O count: 9 Records searched: 467 Direct I/O count: 1 Characters searched: 16697 Page faults: 22 Records matched: 467 Elapsed CPU time: 0 00:00:00.00 Lines printed: 0 Elapsed time: 0 00:00:00.00
The "records searched" tells you how many records you have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 11:16 AM
01-28-2015 11:16 AM
Re: How to know the records' number of a file ?
One possibility:
search /nooutput /statistics <file> ""
show symbol search$*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 03:21 PM
01-28-2015 03:21 PM
Re: How to know the records' number of a file ?
As should be apparent from the previous responses, OpenVMS does not track the number of records in an RMS file as one of the available characteristics of the file; you can't query for the record count. (There are some details you can query for that I'd be skeptical about, too, such as the longest record length.)
In short, open the file, read through until EOF, counting the records. Either with your own file-reading code, or with various available tools. This DCL about 95% of what you are looking for. Or use SEARCH /STATISTICS, as mentioned.
Also FWIW, there are a number of previous discussions of this topic available within the comp.os.vms newsgroup, too — more than a few suggestions, there. (Google itself doesn't seem to include the comp.os.vms newsgroup in its default index or gives awful ranking to the newsgroup pages, so you'll need to search the newsgroup archives from the Google Groups web page.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 09:22 PM
01-28-2015 09:22 PM
Re: How to know the records' number of a file ?
$ search /nooutput /statistics <file> ""
$ show symbol search$*
What the "show symbol search$*" does ?
I tried that, but there is no such symbol.
Regards /Ofer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2015 09:39 PM
01-28-2015 09:39 PM
Re: How to know the records' number of a file ?
> What the "show symbol search$*" does ?
> I tried that, but there is no such symbol.
Around here:
ALP $ search sys$login:login.com "" /nooutput /statistics
Files searched: 1 Buffered I/O count: 8
Records searched: 229 Direct I/O count: 2
Characters searched: 6324 Page faults: 21
Records matched: 229 Elapsed CPU time: 0 00:00:00.00
Lines printed: 0 Elapsed time: 0 00:00:00.02
ALP $ show symbol search$*
SEARCH$CHARACTERS_SEARCHED = "6324"
SEARCH$FILES_SEARCHED = "1"
SEARCH$LINES_PRINTED = "0"
SEARCH$RECORDS_MATCHED = "229"
SEARCH$RECORDS_SEARCHED = "229"
ALP $ tcpip show version
HP TCP/IP Services for OpenVMS Alpha Version V5.6 - ECO 5
on a COMPAQ Professional Workstation XP1000 running OpenVMS V8.3
> [...] Also, info about the system is a bit lacking. Can you please
> update this with at least the OpenVMS version information?
Still wondering. If your SEARCH (VMS) is too old, then it may lack
some features. With my weak psychic powers, I can only guess what will
work on your system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2015 02:24 AM
01-29-2015 02:24 AM
Re: How to know the records' number of a file ?
I have Alpha VMS v6.2-H3 & the "sho sym $search*" is probably old without this feature.
Any way, the "search/statis/noout" is good anough for my needs.
Regards /Ofer