- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- lib$find_file on Pascal
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
Forums
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
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
08-19-2008 06:12 AM
08-19-2008 06:12 AM
lib$find_file on Pascal
The outfile is always recovered correct but sometimes dummy has an strange name (find_binary_file:Dummy = 121123ORT123dRz0 {%␋♦
so the task fails.
Any help or any place I can find information related to this error?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 07:32 AM
08-19-2008 07:32 AM
Re: lib$find_file on Pascal
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 07:41 AM
08-19-2008 07:41 AM
Re: lib$find_file on Pascal
Over there I answerred:
> We are porting a Pascal app from a 32 bit VAX to a new Integrity Itanium Box.
:.
> We are using lib$find_file ( outfile, dummy, context, 'DATAFILE.' );
> The outfile is always recovered correct but sometimes dummy has an
> strange name
I guess that worked on VAX, so it should be OK, but those names
selected are certainly 'odd'
The first argument to find_file is in fact an INPUT specification...
called outfile?
The second argument is the output and typically the most important
part, but called dummy?
- Is the find_file return status being checked before using dummy?
You can only look into 'dummy' on succes.
- How is the descriptor for 'dummy' set up?
- Is LIB$FIND_FILE_END used, like it should be?
It might be a 'tricky' memory corruption problem which was always
there, but never seen.
For example, the 'context' roughly corresponds with an RMS FAB.
If you manager to accidently flip the 'low' bit in the fap options
longword, then RMS will be told to work asynchroneously givign
surprise results... sometimes it 'seems' to works. Sometimes not.
This problem may require profession porting expertise.
Regards,
Hein van den Heuvel
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 11:10 PM
08-19-2008 11:10 PM
Re: lib$find_file on Pascal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2008 10:18 AM
08-20-2008 10:18 AM
Re: lib$find_file on Pascal
You also didn't say where you got the prototype of LIB$FIND_FILE from? SYS$LIBRARY:PAS$LIB_ROUTINES? Your private version?
Here's an example that works:
[inherit('sys$library:starlet',
'sys$library:pascal$lib_routines')]
program find_file(input,output);
var
file_spec : varying [132] of char;
result_spec : varying [132] of char;
context : unsigned;
ret_stat : unsigned;
begin
context := 0;
write('Enter filespec to parse: ');
while not eof do
begin
{ Read the filespec from the user }
readln(file_spec);
{ Loop and parse the file spec }
repeat
{ Parse it... }
ret_stat := lib$find_file(
file_spec,
%descr result_spec, { Use %DESCR to get CLASS_VS }
context);
if (not odd(ret_stat)) and
(ret_stat <> RMS$_NMF) and
(ret_stat <> RMS$_FNF)
then
lib$stop(ret_stat);
if (ret_stat <> RMS$_NMF) and
(ret_stat <> RMS$_FNF)
then
writeln(result_spec);
until (ret_stat = RMS$_NMF) or (ret_stat = RMS$_FNF);
{ Clear LIB$FIND_FILE context }
lib$find_file_end(context);
{ Get another file spec }
write('Enter filespec to parse: ');
end;
end.
Note the explicit use of %DESCR on the output argument for LIB$FIND_FILE.
John