Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi,
i am new to this...i need to find a method to extract or display only certain fields
for eg: show network gives the fields like product, node and address....
how can i get only the address??
thx

As noticed in my earlier reply, I'm using lexical functions to get the information needed.
A lexical function is no a command, it is a subprogram that you can use.
$ HELP LEXICALS
STR = "This is just a textstring"
I can look at the string "str" as a textstring or as a list of words separated by a space.
A = f$extract(8,4,str)
I extract 4 characters starting at character 8 from the string represented by the symbol "str".
A = "just"
orA = f$element(2," ",str)
I get the second element in the list (str) with delimiter " ".
There are a lot of examples in the HELP-utility. Let the lexicals be your best friends.
regards,
Hakan Zanderau
HA-solutions

isint this complicated to extract fields from output which are all across the screen....is there a easier way to extract the fields like the cut or awk we use in unix

I'm not a frequent UNIX-user so I don't know how "awk" or "cut" work..........
Please explain more about your problem.
regards,
Hakan Zanderau
HA-solutions

Gawk and Perl for OpenVMS are listed on the official freeware page. Go to www.hp.com/go/openvms and look for the "OpenVMS Resources column".
Hakan makes an important point about learning the lexical functions. In OpenVMS, parsing a command output for information is usually a last-ditch approach. I always look for logical name or a lexical function that gives the information I want. (That said, I haven't found a good one for DECnet address!)

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |