- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Help required for Open VMS Scripting
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
тАО10-18-2011 02:35 AM
тАО10-18-2011 02:35 AM
Help required for Open VMS Scripting
HI,
I am having a very hard time with scripting in OPEN VMS
I have a certain output in a file called test.txt .For example :
[WWEWE@http-lx-as code]$ cat test.txt
** Configuration for file "MULTINET:NETWORK_DEVICES.CONFIGURATION" **
Device Adapter CSR Address Flags/Vector
------ ------- ----------- ------------
se0 (Shared VAX/VMS Ethernet) -NONE- -NONE- -NONE-
s10 (Serial Line IP) -NONE- -NONE- -NONE-
dn0 (IP over DECNet link) -NONE- -NONE- -NONE-
==========================================================================================
I have written a script in Linux which helps to pick up all the information under the device column in this case se0,s10,dn0.
Can we do a similar thing in OPEN VMS
The Linux script is as follows :
SCRIPT :
for i in `cat test.txt 2>/dev/null |egrep '^[a-z]' |grep -v '\*\*' | awk '{print $1}'`
> do
> echo Begin-interface: $i
> done
OUTPUT :
Begin-interface: se0
Begin-interface: s10
Begin-interface: dn0
Let me know if it can be achieved,
Thanking you in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2011 03:31 AM
тАО10-18-2011 03:31 AM
Re: Help required for Open VMS Scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2011 04:10 AM
тАО10-18-2011 04:10 AM
Re: Help required for Open VMS Scripting
Wow Steven this is great :)
Will this work on Multinet systems as well and if instead of a file we have to take the output from a command.
For example for the "SHOW System" command if we have to get all the list of PIDs then will doing some modifications in the first line of your mentioned script be helpful.
This is awesome stuff thanks a lot..I will try my hands on it and let you know whether I could get it to work as I want to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-18-2011 04:31 AM
тАО10-18-2011 04:31 AM
Re: Help required for Open VMS Scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-23-2011 08:22 PM
тАО10-23-2011 08:22 PM
Re: Help required for Open VMS Scripting
If you want to get details of your system configuration (including multinet) for use elsewhere
you can use the VMS_Check tool - see this page for how to get and install it.
http://h71000.www7.hp.com/openvms/journal/v7/vms_check_tool.html
If you have a more specific requirement for your script
you could also look at the command procedures in this tool for clues as to how to proceed.
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2011 06:14 AM
тАО10-25-2011 06:14 AM
Re: Help required for Open VMS Scripting
A little late...
Heed gthe advise given. Many tasks you are about to do poorly (judging by the unix code example) have been done before and have been done better. Hunt for good examples!
You can install GAWK and/or GNV+AWK on OpenVMS. Thus you can solve the original question with:
$! Look for a number, followed by spaces and an open parenthesis to identify interface line.
$ gawk /comm="/[0-9] *\(/ {print ""Begin-interface:"",$1}" tmp.tmp
In a similar fashion the list of pids can be obtained using
$ pipe show system | gawk/comm="NR > 2 {print NR,$1}" sys$pipe
or
$ pipe show system | perl -lane "print $F[0] if $. > 2"
or sorted, using eskimo kiss to seperate loop from end section...
$ pipe show system | perl -lane "push @pids,$F[0] if $. > 2 } { print for (sort @pids) "
fwiw,
Hein
- Tags:
- gawk