- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Bug in OPENVMS?
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-10-2005 02:05 AM
тАО02-10-2005 02:05 AM
Bug in OPENVMS?
Occasionally, even though such a file is found, it does not rename it and no error messages appear. If I run the command over, then it works.
$ sts1 = f$file_attributes("dwh$stats:ssub130c1.dat;-''countc1'","alq")
$ sts2 = f$file_attributes("dwh$stats:ssub130c1.dat;-''countc1'","eof")
$ if sts2 .eq. "0" .and. sts1 .eq. "0" then rename/log dwh$stats:ssub130c1.dat; .bad
Any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 02:21 AM
тАО02-10-2005 02:21 AM
Re: Bug in OPENVMS?
See if that makes any difference.
Cheers,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 02:21 AM
тАО02-10-2005 02:21 AM
Re: Bug in OPENVMS?
How do you know that the file is found but the rename fails?
If you did
$ if sts2 .eq. "0" .and. sts1 .eq. "0"
$ then
$ write sys$outout "renaming file"
$ rename/log dwh$stats:ssub130c1.dat;
$ endif
then you would know the if statement was true and the rename attempted.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 02:26 AM
тАО02-10-2005 02:26 AM
Re: Bug in OPENVMS?
However .eq. operator works only with number and you could remove quotes from zero.
Again, after rename, store status: you can understand why rename doesn't work.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 02:26 AM
тАО02-10-2005 02:26 AM
Re: Bug in OPENVMS?
Can we look at
$ sh sym sts1
$ sh sym sts2
thanks
Mobeen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 02:33 AM
тАО02-10-2005 02:33 AM
Re: Bug in OPENVMS?
Welcome to the VMS forum!
two things:
You are trying to rename another file than the one you are checking!
(unless there is only one version, and "countc1" equals 0 (zero).
if you are trying to run this sequence in an environment where versions of this file are regularly created
then you _MAY_ even be checking "alq" & "EOF" for different files!
I would suggest to first "lock on to" a specific file by using f$search into a symbol, say "fil"
Now, execute both checks, and the conditional rename, on "fil"
.. and if you want some debug to go with it,
make the if .. rename into an if .. then .. else
and catch $status.
(I frequently define a symbol DEBUG, with default value "!" and start a debug (display?) line with it.
Depending on a start param, in debug mode you let DEBUG be a space.)
Hope this helps.
Proost.
Have one on me.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 02:33 AM
тАО02-10-2005 02:33 AM
Re: Bug in OPENVMS?
I know the rename fails as this procedure runs in batch, produces a log and scans over 200 files. I can see where it looked at the zero block file but did not rename it. If the file was locked, an error message would have appeared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 02:47 AM
тАО02-10-2005 02:47 AM
Re: Bug in OPENVMS?
$ test_file = f$search("dwh$stats:ssub130c1.dat;-''countc1'")
$ sts1 = f$file_attributes(test_file,"alq")
$ sts2 = f$file_attributes(test_file,"eof")
$ if sts2 .eq. 0 .and. sts1 .eq. 0 then -
$ rename/log 'test_file' .bad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 02:55 AM
тАО02-10-2005 02:55 AM
Re: Bug in OPENVMS?
I agree with Jan: The most likely reason for failure is that you are testng two different files.
Let's say you start with file ;2, ;3, ;4 and countc1 = "1"
So on the ALQ test you test file ;3
Now imagine file ;5 is created after the ALQ test and the EOF test.
In that case the EOF test will act upon ;4 !
Solution:
1) - just test ALQ, the EOF adds no value
2) Establish the file name firmly:
$file = f$search("dwh$stats:ssub130c1.dat;-''countc1'")
$if file.ne.""
$then
$if f$file(file,"alq") + f$file(file,"eof") .eq. 0 then rename/log 'file .bad
:
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 03:11 AM
тАО02-10-2005 03:11 AM