- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: UNIX procedure equivalent in OVMS?
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
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
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
тАО12-04-2005 05:46 PM
тАО12-04-2005 05:46 PM
Re: UNIX procedure equivalent in OVMS?
Jpe,
Your method works faster than having to use the f$search and IF-THEN-ELSE statements.
By the way, how do i append my next output when applying the define method?
E.g:
DEFINE SYS$OUTPUT test.log
show time
DEASSIGN SYS$OUTPUT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2005 06:03 PM
тАО12-04-2005 06:03 PM
Re: UNIX procedure equivalent in OVMS?
$ define sys$output time.tmp
$ show time
$ deassign sys$output
$ append time.tmp test.log
%APPEND-W-INCOMPAT, USER_1:[ZESSIN]TIME.TMP;1 (input) and USER_1:[ZESSIN]TEST.LOG;1 (output) have incompatible attributes
$ delete time.tmp;
$ type test.log
abc
___5-DEC-2005 07:55:59
$
Another idea:
$ open /append t_log test.log
$ write t_log " "+f$cvtime(f$time(),"absolute")
$ close t_log
$ type test.log
abc
___5-DEC-2005 07:55:59
__5-DEC-2005 07:59:51.50
$
(I have replaced the leading spaces in the file output with underscores "_" to better illustrate the difference, because ITRC eats spaces :-(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2005 08:05 PM
тАО12-04-2005 08:05 PM
Re: UNIX procedure equivalent in OVMS?
Your method works faster than having to use the f$search and IF-THEN-ELSE statements.
Although it has nothing to do with the original question,
but this statement sounds unjustified.
Writing the output of a command to a file, then reading it is clumpsy as long as there is an equivalent function built into DCL like in this case DIRECTORY/OUTPUT vs. f$search.
And why creating a file,invoking an image, opening and reading a file should be faster than DCL-internal directory search is beyond my imagination.
Could You explain how You measured it being faster ?
Directory output to a file is IMHO only needed, if some /EXCLUDE or other criteria can't be achieved easily inside DCL, or if the file list has to be sorted somehow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2005 09:49 PM
тАО12-04-2005 09:49 PM
Re: UNIX procedure equivalent in OVMS?
I've just compared a simple F$SEARCH loop finding 200 files with a DIR /OUT and reading its output: the DIR solution is faster:
- is uses less CPU and elapsed time and BufIO
- is needs more hard faults and DirIO
Normally I would prefer the DCL F$SEARCH solution, because you are not dependant on the format of the DIR output.
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-04-2005 10:38 PM
тАО12-04-2005 10:38 PM
Re: UNIX procedure equivalent in OVMS?
- is uses less CPU and elapsed time and BufIO
- is needs more hard faults and DirIO
Remove Elapsed Time from these lines, and it means, that the amouts of Elapsed Time are configuration-dependant. Much CPU power and Memory favors the DIR solution, good Caching and fast disk IO favors the F$SEARCH.
-- although whenever possible a personally favor lexical function solutions over output-parsing!
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2005 12:07 AM
тАО12-05-2005 12:07 AM
Re: UNIX procedure equivalent in OVMS?
I made tests with my slowest and fastest CPUs, and it seems that only for short (few hundreds) number of files DIRECT/output wins. In all other cases f$search loops are faster, and gain with the number of files.
Seems that f$search has a bigger 'pedestal' at initialization.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2005 12:28 AM
тАО12-05-2005 12:28 AM
Re: UNIX procedure equivalent in OVMS?
And one additional note on the differences:
DIRECTORY lists ALIAS files/directories,
f$search does not return aliases !
So it may well make a difference wether the list of files is for processing or e.g. for delete/remove.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2005 12:36 AM
тАО12-05-2005 12:36 AM
Re: UNIX procedure equivalent in OVMS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2005 12:45 AM
тАО12-05-2005 12:45 AM
Re: UNIX procedure equivalent in OVMS?
if You explicitely do f$search("[.dir]*.*"), then yes, it returns files wether being aliases of some files in other directories.
But say You have [.a] and [.b] being an alias directory of [.a], then f$search [...]*.* returns the files only once, not the files in [.b].
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-05-2005 12:56 AM
тАО12-05-2005 12:56 AM
Re: UNIX procedure equivalent in OVMS?
Uwe is right, I had by chance exactly as many files to purge as I had aliases resulting in the same difference of number of files between
f$search() and DIRECTORY.
So not the alias behaviour is different, but
f$search("*.*") is not the same as
directory *.*
the directory command defaults to version ";*" if not explicitely version 0 (";" or ";0") is specified, while f$search("*.*") returns only the highest version.