1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# VMS::stdio - VMS extensions to Perl's stdio calls
#
# Author: Charles Bailey bailey@genetics.upenn.edu
# Version: 1.0
# Revised: 29-Nov-1994
#
# Revision History:
# 1.0 29-Nov-1994 Charles Bailey bailey@genetics.upenn.edu
# original version
# 1.1 09-Mar-1995 Charles Bailey bailey@genetics.upenn.edu
# changed calling sequence to return FH/undef - like POSIX::open
# added fgetname and tmpnam
=head1 NAME
VMS::stdio
=head1 SYNOPSIS
use VMS::stdio;
$name = fgetname(FH);
$uniquename = &tmpnam;
$fh = vmsfopen("my.file","rfm=var","alq=100",...) or die $!;
=head1 DESCRIPTION
This package gives Perl scripts access to VMS extensions to the
C stdio routines, such as optional arguments to C<fopen()>.
The specific routines are described below.
=head2 fgetname
The C<fgetname> function returns the file specification associated
with a Perl FileHandle. If an error occurs, it returns C<undef>.
=head2 tmpnam
The C<tmpnam> function returns a unique string which can be used
as a filename when creating temporary files. If, for some
reason, it is unable to generate a name, it returns C<undef>.
=head2 vmsfopen
The C<vmsfopen> function provides access to the VMS CRTL
C<fopen()> function. It is similar to the built-in Perl C<open>
function (see L<perlfunc> for a complete description), but will
only open normal files; it cannot open pipes or duplicate
existing FileHandles. Up to 8 optional arguments may follow the
file name. These arguments should be strings which specify
optional file characteristics as allowed by the CRTL C<fopen()>
routine. (See the CRTL reference manual for details.)
You can use the FileHandle returned by C<vmsfopen> just as you
would any other Perl FileHandle.
C<vmsfopen> is a temporary solution to problems which arise in
handling VMS-specific file formats; in the long term, we hope to
provide more transparent access to VMS file I/O through routines
which replace standard Perl C<open> function, or through tied
FileHandles. When this becomes possible, C<vmsfopen> may be
replaced.
=head1 REVISION
This document was last revised on 09-Mar-1995, for Perl 5.001.
=cut
package VMS::stdio;
require DynaLoader;
require Exporter;
@ISA = qw( Exporter DynaLoader);
@EXPORT = qw( &fgetname &tmpfile &tmpnam &vmsfopen );
bootstrap VMS::stdio;
1;
|