HP3000-L Archives

July 2001, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Mon, 30 Jul 2001 08:43:53 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
Ken Hirsch wrote:
> You should be able to call them from COBOL, with some difficulty.
>
> The program below worked, but I had to link it with /lib/libc.a, which I
> don't think you will have on your system.  I linked it with this command
>   link from=./TESTOBJ;to=./TESTX;rl=/lib/libc.a;posix
>
> So that would work if you had /lib/libc.a.

The NMRL library /lib/libc.a is a part of FOS and everybody should have it.

> Since you don't, you should be able to, instead, replace the calls
>           call "stat" using file-name, stat-buffer giving retval
>           call "chmod" using file-name, \perm-mode\ giving retval
> with
>           call "_px_stat" using file-name, stat-buffer, retval
>           call "_px_chmod" using file-name, \perm-mode\, retval
> respectively and then you don't have to link with any C library, since
> _px_stat and _px_chmod are in XL.PUB.SYS.  This isn't documented anywhere
> but it seems to work on all the systems I've tried it on.

Not only are the _px_xxxx function calls undocumented, they are also
unsupported for direct use, and in the case of the above examples the
parameters are wrong.

For best supported results, try to call the POSIX functions via documented
interfaces.
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2