[comp.os.vms] LIB$COPY or something?

SEKRETAR@CZHETH5A.BITNET (04/27/88)

In a pascal routine, I need to copy a file to another directory.
As the structure of the file is not predefined, the easiest way
to do it would be with a RTL command of the type LIB$COPY_FILE.

Well, the only routines of the kind I found in RTL are LIB$CREATE_DIR,
LIB$DELETE_FILE and LIB$RENAME_FILE. Am I missing something, or
do I have to search somewhere else?

-- Danny

+-----------------------------------------------------------------------+
| Mail   :   Danny Schwendener, ETH Macintosh Support Center            |
|            Swiss Federal Institute of Technology, CH-8092 Zuerich     |
| Bitnet :   macman@czheth5a      UUCP   :   {cernvax,mcvax}ethz!macman |
| Ean    :   macman@ifi.ethz.ch   Voice  :   yodel three times          |
+-----------------------------------------------------------------------+

cfchiesa@bsu-cs.UUCP (Christopher Chiesa) (05/02/88)

In article <8805011544.AA28437@ucbvax.Berkeley.EDU>, SEKRETAR@CZHETH5A.BITNET writes:
> In a pascal routine, I need to copy a file to another directory.

As I recall, there is an example program in either the Pascal User's Guide or
Pascal Reference Manual, which does very close to what you describe.  It is in
the section under "user supplied OPEN procedures," and what it does is to copy
a file to another file, retaining all attributes of the first file.  You may
be able to modify it to your needs.


-- 
UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!cfchiesa 
cfchiesa@bsu-cs.UUCP                                           

dallwitz@rsbs0.anu.oz (05/08/88)

In article <8805011544.AA28437@ucbvax.Berkeley.EDU>, SEKRETAR@CZHETH5A.BITNET 
writes:
> In a pascal routine, I need to copy a file to another directory.
> As the structure of the file is not predefined, the easiest way
> to do it would be with a RTL command of the type LIB$COPY_FILE.
> 
> Well, the only routines of the kind I found in RTL are LIB$CREATE_DIR,
> LIB$DELETE_FILE and LIB$RENAME_FILE. Am I missing something, or
> do I have to search somewhere else?

An easy way to copy files of any arbitrary type from within a Pascal (or any
other language) routine is by use of the callable Convert (CONV) routines.
This is MUCH simpler than messing around with RMS to determine file structure.
Contact me directly by electronic mail if you require an example.

Eric Zurcher                   Email: DALLWITZ@RSBS0.ANU.OZ
VAX System Manager             Phone: 61 62 465029
CSIRO Division of Entomology   Telex: 62309
GPO Box 1700
Canberra, ACT, Australia 2601

"Yes, its true!  The captial of Australia is Canberra, not Sydney!"