- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- OPENVMS SORT problem
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
Forums
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
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
11-09-2009 07:34 AM
11-09-2009 07:34 AM
OPENVMS SORT problem
We are finding that the SORT is not generating the results expected. Records we expect to be removed as a duplicate remain in the file and the record we wanted to remain in the final file has been removed.
Does someone know that there is other 3rd party SORT utility I can use on OpenVMS? Or any suggestion for this data sorting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2009 07:49 AM
11-09-2009 07:49 AM
Re: OPENVMS SORT problem
Posting the DCL SORT command, whether or not you're using HyperSort, and a small reproducer data file matching the command would go a very long way toward describing what is happening here and what you expect to have happen within the example.
SORT is good at handling duplicates (with and without /STABLE), but it has no innate knowledge of which record is locally considered the duplicate, either.
It's likely feasible to custom-create tools for this task, but (beyond tools such as SORT) there are few generic tools toward this goal; the RMS file and record formats all tend to be local.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2009 08:06 AM
11-09-2009 08:06 AM
Re: OPENVMS SORT problem
SORT /DUPLICATES Full_Description
By default, Sort/Merge retains records with equal keys. The /NODUPLICATES qualifier eliminates all but one record with equal keys. The retained records may not appear in the same order as they appeared in the input file. If you want to specify which duplicate record to keep, invoke Sort at the program level and specify an equal-key routine.
The /STABLE and the /NODUPLICATES qualifiers are mutually exclusive.
-----------------------------
One could hope that /STABLE would perhaps make sort keep the first occurance but as per aboce, that
Using /STABLE could of course prepare an output file which could subsequently easily be filtered for dups.
Maybe you should ask yourself exactly how you decided which records, duplicated by key, is the right one to keep. Perhaps there is a way to express that in a 'specification file'?
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2009 08:13 AM
11-09-2009 08:13 AM
Re: OPENVMS SORT problem
Can you create a small file (10 records should be big enough to reproduce) and show us what you are doing, and what results you are seeing that you didn't expect?
Is there a single key? Evidently you are making multiple sort passes. You don't specify that you are using /STABLE. That may be a requirement. See help sort /stable
You description is not detailed enough for me to understand the problem, so I (and probably others) can't offer any useful suggestion, only guesses.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2009 08:42 AM
11-09-2009 08:42 AM
Re: OPENVMS SORT problem
Once the file is sorted, it isn't hard to write a program that will write the first occurance of each record with a /key value, but it would be nice if a utility like the following existed:
$ UNIQUE /KEY=(...) INFILE OUTFILE ! does not exist
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2009 09:11 AM
11-09-2009 09:11 AM
Re: OPENVMS SORT problem
SORT using Specification Files can do more than just sort the file, it can /INCLUDE or /OMIT records based test /CONDITIONS on /FIELDS in the record (including binary data).
$ help sort spec spec
SORT
Specification_File_Qualifiers
Specification_File_Example