- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Unable to open file getting -SYSTEM-W-BADIRECT...
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
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
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
03-30-2014 08:23 AM
03-30-2014 08:23 AM
Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
Unable to open file getting error -SYSTEM-W-BADIRECTORY, bad directory file format.
Using sys$qiow for openiing file.
In the same directory other files could be open with sys$qiow.
I didn't find any difference in file properites for file that could be open without any issue and files failed to open.
Please advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2014 11:18 AM
03-30-2014 11:18 AM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2014 11:40 AM
03-30-2014 11:40 AM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
Thanks for the responese.
>Using sys$qiow for openiing file.
>Is that with or without sys$parse and/or sys$search? What, exactly, gets the error? What happens if you use some other p>rogram (like, say, TYPE or EDIT) to open the same file?
>>> not using sys$parse or sys$search. Using sys$qiow to access (i.e. IO$_ACCESS | IO$M_ACCESS,)
> I didn't find any difference in file properites for file that could be open without any issue and files failed to open.
>> The error refers to the properties of a directory, not the properties of a file which is in a directory.
>>> In the same directory other files are accessible, hence I assumed directory properties are not the issue.
> HELP /MESSAGE BADIRECTORY
>See especially "User Action"
User Action: Use the DCL command SET FILE/NODIRECTORY
to delete the corrupt directory file, then use the DCL command
ANALYZE/DISK_STRUCTURE/REPAIR to place the lost files in the
[SYSLOST] directory. The lost files can then be copied to a new directory.
I couldn't suggest this to my customer as this may cause loss of data.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2014 12:19 PM
03-30-2014 12:19 PM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2014 02:13 PM
03-30-2014 02:13 PM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
What does a DCL DIRECTORY command show?
What does any other DCL command which opens your target file do? (without knowing the type and size of file, I don't know which command(s) are appropriate - ANALYZE/RMS maybe?).
If DCL works and your $QIO code doesn't, what do you think that means?
Look at the directory contents with DUMP/DIRECTORY. Does your target entry look OK?
Remember that directories are just lists of pointers to files. They're really only a convenience for humans. The data is safe, pointed to by the "real" directory INDEXF.SYS. If a directory really is corrupt, you can:
1) Try to patch the file yourself (and since you're asking this question, that's not really an option)
2) Do the right thing - Delete the directory and recover the directory entries with ANALYZE/DISK/REPAIR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2014 03:50 AM
04-01-2014 03:50 AM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
>> >>> not using sys$parse or sys$search. Using sys$qiow to access (i.e. IO$_ACCESS | IO$M_ACCESS,)
As per John... Surely a programming error.
If you use DCL OPEN x x.x, or just a DIR/DATE x.x ... does that work?
1) Rename all files from suspect directory to fresh directory
and/or
2) ANALYZ/DISK... deal with results; Blow away the directory; re-ANALYZ/DISK; ... rename SYSLOST to desired directory.
and/or
3) SEARCH/NUM/FORM=NON x.dir x.x ...$DUMP/REC=(STA=n,COU=1) x.dir ; $DUMP/BLO=(STA=m,COU=1) x.dir ; $DUMP/DIR/BLOC=(STA=m,COU=1) x.dir
Good luck,
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2014 06:42 AM
04-01-2014 06:42 AM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2014 07:24 AM
04-01-2014 07:24 AM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
Thanks for all the suggestions.
I will collect all the information and let you know the outcome.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2014 06:12 AM - edited 04-02-2014 06:16 AM
04-02-2014 06:12 AM - edited 04-02-2014 06:16 AM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
Instead of using sys$parse+sys$search using LIB$FIND_FILE.
Will that make any difference ?
Or I need to use only sys$parse+sys$search before calling sys$qiow.
In the existing code calling LIB$FIND_FILE before sys$qiow which is retuning RMS$_NORMAL
and resultant-filespec was passed to sys$qiow.(here the returned resultant-filespec is valid filename and exists on disk.)
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2014 06:44 AM
04-02-2014 06:44 AM
Re: Unable to open file getting -SYSTEM-W-BADIRECTORY, bad directory file format.
>> Instead of using sys$parse+sys$search using LIB$FIND_FILE.
Will that make any difference ?
The main goal of LIB$FIND_FILE is to deliver a file specification string, NOT a NAM block with FID.
To do so it internally uses SYS$PARSE/SYS$SEARCH allocating a FAB and NAM block which you are supposed to give back by calling LIB$FIND_FILE_END.
You can get to the NAM block through the CTX variable.
That works, but is not supported..
By using PARSE+SEARCH you take ownership of the FAB/NAM and can use them as you see fit, notably to get the FID.
>> Or I need to use only sys$parse+sys$search before calling sys$qiow.
Much better IMHO... because you can now open by file-ID which avoids going back through the (cached) directories
>> In the existing code calling LIB$FIND_FILE before sys$qiow which is retuning RMS$_NORMAL
Sure, but WHY? It's double work.
>> and resultant-filespec was passed to sys$qiow.(here the returned resultant-filespec is valid filename and exists on disk.)
Sure, but WHY? It's double work.
In Fact, WHY do you even use SYS$QIO to open the file?
Just use RMS in block mode FAB$V_BIOand SYS$READ / SYS$WRITE as needed?
Hein