- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Problem with version checking script
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
тАО02-26-2010 05:08 AM
тАО02-26-2010 05:08 AM
I am trying to get a script working that will read a pre-defined list of disks and check for LOG files with a version number in excess of a specified limit. The problem I'm having is that after it encounters its first .LOG file it exits without continuing to check the rest of the disk (or read the next disk in the list).
$ set noon
$ open/read disklist NODESYS:[EMSHELP]isxv06_ems_disk.lis
$ploop:
$ read/end=fini disklist drec
$ device_name = f$extract(0,10,drec)
$ write sys$output ""
$ write sys$output "Reading ''device_name'"
$ write sys$output ""
$l1:
$ tmp = F$Search("''device_name'[*...]*.LOG;")
$ if (tmp.nes."")
$ then
$ vers = F$Parse("''Tmp'",,,"version")-";"
$ endif
$ if (vers .gt. 5000)
$ then
$ write sys$output tmp
$ endif
$fini:
$ close disklist
$ exit
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2010 05:13 AM
тАО02-26-2010 05:13 AM
Re: Problem with version checking script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2010 05:14 AM
тАО02-26-2010 05:14 AM
Re: Problem with version checking script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2010 05:31 AM
тАО02-26-2010 05:31 AM
Re: Problem with version checking script
Thomas fingered your problems.
1. You need some kind of loop back to l1 after every logfile found.
2. When the loop reaches the end of the device, f$search will return "". At that point you probably need to go to Ploop and read the next device.
These two explain why it only goes through the loop once, and why to doesnt go to the next device.
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2010 05:54 AM
тАО02-26-2010 05:54 AM
Re: Problem with version checking script
If I insert a GOTO into the script I get the following result...
Reading $1$DKB201:
$1$DKB201:[EMS_LOGIN_HAG.MIS_USER.EMSSAP]UCX$FTPSERVER.LOG;5815
$1$DKB201:[EMS_LOGIN_HAG.MIS_USER.EMSSAP]UCX$FTPSERVER.LOG;5815
$1$DKB201:[EMS_LOGIN_HAG.MIS_USER.EMSSAP]UCX$FTPSERVER.LOG;5815
$1$DKB201:[EMS_LOGIN_HAG.MIS_USER.EMSSAP]UCX$FTPSERVER.LOG;5815
Ctl/Y Interrupt
$ set noon
$ open/read disklist NODESYS:[EMSHELP]isxv06_ems_disk.lis
$ploop:
$ read/end=fini disklist drec
$ device_name = f$extract(0,10,drec)
$ write sys$output ""
$ write sys$output "Reading ''device_name'"
$ write sys$output ""
$l1:
$ tmp = F$Search("''device_name'[*...]*.LOG;")
$ if (tmp.nes."")
$ then
$ vers = F$Parse("''Tmp'",,,"version")-";"
$ endif
$ if (vers .gt. 5000)
$ then
$ write sys$output tmp
$ endif
$ GOTO L1
$fini:
$ close disklist
$ exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2010 06:00 AM
тАО02-26-2010 06:00 AM
Solution$close/nolog disklist
$ open/read disklist NODESYS:[EMSHELP]isxv06_ems_disk.lis
$ploop:
$ read/end=fini disklist drec
$ device_name = f$extract(0,10,drec)
$ write sys$output ""
$ write sys$output "Reading ''device_name'"
$ write sys$output ""
$l1:
$ tmp = F$Search("''device_name'[*...]*.LOG;")
$ if tmp.eqs."" then goto ploop
$ vers = F$Parse("''Tmp'",,,"version")-";"
$ if (vers .gt. 5000)
$ then
$ write sys$output tmp
$ endif
$ GOTO L1
$fini:
$ close disklist
$ exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2010 06:12 AM
тАО02-26-2010 06:12 AM