- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- search with redefined sys$output => NOSUCHDEV
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
10-18-2006 11:45 PM
10-18-2006 11:45 PM
I've just found a strange problem with the search command.
Running this sample script:
$ on error then goto end
$ open/write out sys$login:out.lis
$ define sys$output out:
$ search sys$login:login.com nothing
$
$ end:
$ close out
$exit
produce the error status:
%SYSTEM-F-NOSUCHDEV, no such device available
This only seem to happen with the “search" command, any other command I'have tried has succeeded
Any advice?
(tested on VMS 7.3-2)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 12:16 AM
10-19-2006 12:16 AM
Re: search with redefined sys$output => NOSUCHDEV
If you define sys$output to "out:" then
VMS tries to open a device called "out:" because
of the colon.
The above "$ open/write out" defines a file
handle, not a logical device.
In short. use "$search/output=sys$login:out.lis"
or "$ define sys$output sys$login:out.lis"
LG
Albert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 12:25 AM
10-19-2006 12:25 AM
Re: search with redefined sys$output => NOSUCHDEV
At first glance (I am running for a meeting), I would agree with Albert's suggestion: remove the ":" from the /OUTPUT qualifier and the logical name definition.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 01:35 AM
10-19-2006 01:35 AM
Re: search with redefined sys$output => NOSUCHDEV
I did'nt try at first because I thought that , in this case, each commands in the script would have opened a new version of the output file, but dcl seem to be smart enough not to behave this way.
But what stills puzzle me is that, when using the original approach, other command than "search" (say "dir" for example) works as expected (output correctly redirected to out.lis)
Note also that this script is a simple example, using /output= is not an option in reality because the actual script execute many commands in sequence and most of them does not support the /output" qualifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 01:43 AM
10-19-2006 01:43 AM
Re: search with redefined sys$output => NOSUCHDEV
$ @tt:/out=file
and then ctrl Z at the end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 01:48 AM
10-19-2006 01:48 AM
Re: search with redefined sys$output => NOSUCHDEV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 02:02 AM
10-19-2006 02:02 AM
Re: search with redefined sys$output => NOSUCHDEV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 02:27 AM
10-19-2006 02:27 AM
Re: search with redefined sys$output => NOSUCHDEV
Giles>> Any advice?
Use DEFINE /USER and all will be well.
Looks like a minor search problem.
Albert>> The above "$ open/write out" defines a file handle, not a logical device.
It creates a process permanent file accesssible through the logical name 'out',
which appear to be exactly what Giles want. He would not want a 'device'.
Albert>> In short. use "$search/output=sys$login:out.lis"
or "$ define sys$output sys$login:out.lis"
No, that give entirely different semantics.
It will create a fresh file every time.
The DCL open allows one to collect output from multiple programs in a consistent way.
At least, that is the intent.
DCL creates a VFC file which theoretically allows for better combining, where the other solutions create simple VAR files, but that difference is rarely needed/appreciated.
Bob>> remove the ":" from the /OUTPUT
Nah.. makes no difference here and the ":" will make it clear the script intents to use a logical name, not a file called out.
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 03:15 AM
10-19-2006 03:15 AM
Re: search with redefined sys$output => NOSUCHDEV
To be more precise the procedure is supposed to run either in batch or in interactive mode.
I woul like this kind of functionality:
if
redirect sys$output to listfile for the rest of the script
fi
remaining stuff here
....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 04:27 AM
10-19-2006 04:27 AM
Re: search with redefined sys$output => NOSUCHDEV
I got back from my meeting, and I see that there has been some back and forth on this topic.
Going back a ways (OpenVMS VAX 6.2, to be precise), the problem you mention is reproduceable there.
Apparently, there something unanticipated happening with SEARCH handling of the /OUTPUT parameter. However, essentially the same construct will work, as follows:
$ OPEN/WRITE OUTPUTFILE X.TMP
$ SEARCH/OUT=OUTPUTFILE filename string
$ CLOSE OUTPUTFILE
Note that OUTPUTFILE is opened as a process permanent file by DCL (the OPEN command) and thus is appended to in sequence until it is closed.
On first glance, I do not see a reason why your original code should not work. Actually, using the /OUTPUT qualifier does not seem to affect the problem. ASSIGNing or DEFINEing the process permanent file to SYS$OUTPUT will also cause the error.
If you have a support contrat, I would suggest submitting this as a bug (unless, of course, someone can volunteer a good explanation of why this behavior is "correct").
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 06:31 AM
10-19-2006 06:31 AM
Re: search with redefined sys$output => NOSUCHDEV
If wants to know the device type so it can highlight the matched text properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2006 07:18 AM
10-19-2006 07:18 AM
Re: search with redefined sys$output => NOSUCHDEV
another point not addressed so far, and maybe of relevance here, is the
/USER
qualifier on the dDEFINE SYS$OUTPUT command/
User_mode definitions are automagically deassigned upon image rundown; and if I understand correctly, that is NOT the desired behavior.
If you leave out the /USER (or substitute it by /SUPER, the default) you get a definition that remains in effect until either redefined or explicitly deassigned.
This means all output in the mean time will go to the file pointed at by the logical.
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2006 01:36 AM
10-20-2006 01:36 AM
Re: search with redefined sys$output => NOSUCHDEV
To amplify on my posting from yesterday:
The file opened by the OPEN command (and assigned to be used for SYS$OUTPUT) is a process-permanent file opened by DCL and accessible to the user program).
Thus, the following should route all output to the "log" file:
$ OPEN/WRITE OUTPUTFILE X.TMP
$ SEARCH/OUT=OUTPUTFILE filename string
$ DIRECTORY/OUTPUT=OUTPUTFILE
...
$ CLOSE OUTPUTFILE
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2006 01:37 AM
10-20-2006 01:37 AM
Re: search with redefined sys$output => NOSUCHDEV
>If you have a support contrat, I would suggest
>submitting this as a bug (unless, of course,
>someone can volunteer a good explanation of
>why this behavior is "correct").
I also consider this behaviour as a bug, but not very serious, just strange:
$ open/write out out.lis
$ define sys$output out:
$ sear login.com nohing
%SYSTEM-F-NOSUCHDEV, no such device available
$ sear login.com/out=out: no ! this one works!!!
$ sear login.com/out=sys$output: no
%SYSTEM-F-NOSUCHDEV, no such device available
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2006 01:40 AM
10-20-2006 01:40 AM
SolutionConcur. I suggest that you file it with HP if you have a support contract). If you want, you can mail them the hyperlink to the ITRC thread.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2006 02:18 AM
10-20-2006 02:18 AM
Re: search with redefined sys$output => NOSUCHDEV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2006 07:35 AM
10-20-2006 07:35 AM
Re: search with redefined sys$output => NOSUCHDEV
This makes it more difficult to use SEARCH as an incremental filter:
$ CREATE NAMES.TXT
Sally FRIEND
Holly ENEMY
$ SEARCH NAMES.TXT FRIEND /OUTPUT=NAMES.TXT
%SEARCH-W-OPENIN, error opening NAMES.TXT;2 as input
-RMS-E-FLK, file currently locked by another user
%SEARCH-I-NOMATCHES, no strings matched
So you have to keep using new file names at each step of a multiple pass SEARCH filter, or use a version number with the input file.
I think it should work the same way that:
$ TYPE NAMES.TXT /OUTPUT=NAMES.TXT !works
Hopefully the engineers will read this thread and fix this too (I have no software support so can't request it).