- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: how to define a symbol from a search result ?
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
01-20-2006 11:44 PM
01-20-2006 11:44 PM
i have a command: $sear 1.txt "111"
and there is a output like "111 test"
i wanna assign this output into a symbol. which command i can use?
i tried:
$pipe sear 1.txt "111" | a = sys$output
but didnot work...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2006 01:46 AM
01-21-2006 01:46 AM
SolutionThis question has been asked and answered a number of times, for example:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=779260
Google for: +vms +search +pipe +site:itrc.hp.com
I prefer using perl:
For example:
$ create tmp.tmp
aap
noot
111 test
mies
$
$ perl -ne "$ENV{a} = $_ if /111/" tmp.tmp
$
$ show log a
"A" = "111 test." (LNM$PROCESS_TABLE)
hth.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2006 01:47 AM
01-21-2006 01:47 AM
Re: how to define a symbol from a search result ?
This question has been asked and answered a number of times, for example:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=779260
Google for: +vms +search +pipe +site:itrc.hp.com
I prefer using perl:
For example:
$ create tmp.tmp
aap
noot
111 test
mies
$
$ perl -ne "$ENV{a} = $_ if /111/" tmp.tmp
$
$ show log a
"A" = "111 test." (LNM$PROCESS_TABLE)
There are also other tools you may want to check like (VAXman's ) SYMBOL and maybe 'extract'
hth.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2006 03:51 AM
01-21-2006 03:51 AM
Re: how to define a symbol from a search result ?
i'm asking for a symbol...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2006 05:01 AM
01-21-2006 05:01 AM
Re: how to define a symbol from a search result ?
Hmm, once it is in a logical, how hard is it to get it into a symbol?
$a = f$trnlnm...
Also, I mentioned "SYMBOL" and google.
Just google +symbol +vms +vaxman "I feel lucky"
Or google for: +vms +symbol +perl
Hein.
"http://kobesearch.cpan.org/htdocs/perl/VMS/DCLsym.html
http://kobesearch.cpan.org/htdocs/perl/VMS/DCLsym.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2006 02:58 PM
01-21-2006 02:58 PM
Re: how to define a symbol from a search result ?
but your method still cannot make it in ONE sentence :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 02:45 PM
01-22-2006 02:45 PM
Re: how to define a symbol from a search result ?
Technically true, but anywhere you would use the symbol, you could use:
'F$TRNLNM("name")'
so there's very little difference, apart from a few extra characters.
The issue is that pipe segments are independent processes, so they don't share a symbol table with the parent process. The JOB logical name table is shared, so it can be used to return values from subprocesses to parent processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 03:04 PM
01-22-2006 03:04 PM
Re: how to define a symbol from a search result ?
i think the f$trnlnm is a good way to use :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2006 10:44 PM
01-22-2006 10:44 PM
Re: how to define a symbol from a search result ?
As John writes, any PIPE solution to this problem involves an extra process which may become a problem with high repeat counts.
The PERL solution I suggested is only a single image activation, much like SEARCH itself. Furthermore, once you get the hang of perl a little it will be trivial to parse the target line for exactly the desired data, or perhaps do what the next dcl steps would have done with the selected data.
This request is common enough that it would be nice if SEARCH had a switch to toss its output into a symbol (and why stop at search? Well maybe because most other tools output is many records).
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2006 09:25 AM
01-24-2006 09:25 AM
Re: how to define a symbol from a search result ?
I happened to sit in a meeting with Guy yesterday and he indicated he would consider an option for search output to go into a symbol.
In OpenVMS 8.3 SEARCH/STAT will already define local symbols like: SEARCH$RECORDS_MATCHED
fyi,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2006 11:40 AM
01-24-2006 11:40 AM
Re: how to define a symbol from a search result ?
that will be a great help for me :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2006 01:18 AM
01-25-2006 01:18 AM
Re: how to define a symbol from a search result ?
http://www.hpuseradvocacy.org
and if it receives enough votes then it will be put forward to hp for consideration.
User requests help towards getting engineering time to add features to VMS.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2006 01:49 AM
01-25-2006 01:49 AM
Re: how to define a symbol from a search result ?
btw, i try to submit a issue and reply other issue, but cannot see my reply message quickly.
does that mean my reply is waiting for approval before it is pasted onto the website?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2006 02:24 AM
01-25-2006 02:24 AM
Re: how to define a symbol from a search result ?
Check again tomorrow.
Purely Personal Opinion