Programmatic Network File Transfer

Two calls are provided to copy files programmatically: DscopyBuild and Dscopy. The DscopyBuild call creates a copy descriptor that can be used by the Dscopy call to copy the file or files specified.

DSCOPY

Copies a file or files.

DSCOPY(builtdescriptor,result)

builtdescriptor

Character array (FORTRAN); String (PASCAL). A

 

buffer of variable length that contains a copy descriptor or a

 

DSCOPY command. The builtdescriptor parameter may

 

be created programmatically by calling DscopyBuild.

 

(DscopyBuild is described later in this section.)

result

Array of 16-bit integers. A fiveword array returned

 

by Dscopy. The first word contains the number of errors that

 

occurred while the file, or files, were being copied. The second

 

word returns the error code, if any; zero is returned if the file or

 

files are copied successfully. (If multiple files are copied, the

 

error code is the result of the last attempted file copy.) The last

 

three words of this parameter are reserved for future use. The

 

DSCOPY error codes are described in the NS/1000 Error

 

Message and Recovery Manual.

 

 

 

Note

If your program is written in Pascal/1000, Version 2, you must set

 

the FIXED_STRING option before declaring Dscopy. In

 

addition, the routines SetStrLen and StrMax must be used to

 

initialize the builtdescriptor string. FIXED_STRING,

 

SetStrLen and StrMax are described in the Pascal/1000

 

Reference Manual. If your program is written in Pascal/1000,

 

Version 1, you must use the routine StrDsc to convert the

 

builtdescriptor string to a format that can be processed by

 

both the calling program and DSCOPY. This routine is

 

described in the RTEA Programmer's Reference Manual.

 

 

 

Network File Transfer 57