Using NS3000/iX Network Services (36920-90008)

104 Chapter 5
Network File Transfer
Programmatic NFT Examples
Pascal: Single Transfer
In this application, the opt parameter is set to four (4). All transfers will
be attempted. Primary output is enabled. The command file spec for
multiple transfers cannot be used. The spec parameter contains the full
text of the transfer specification, including all parameters and options,
and is terminated by an ASCII null character.
$standard_level 'hp3000', uslinit$
program pcopy (input,output);
type
small_int = -32768..32767;
const
null = chr(0); {ASCII null char}
@COMPUTERTXT = var
opt : small_int;
fnum : small_int;
r : small_int;
spec : string [80];
result : array [1..2] of small_int;
procedure DSCOPY; intrinsic;
procedure DSCOPYMSG; intrinsic;
begin {program pcopy}
opt := 4; All transfers attempted, output enabled, command file disabled}
fnum := 0;
{copy local file NFTTEST to file NFTTARG on node SOMENODE}
spec := 'NFTTEST TO NFTTARG:SOMENODE[NSUSER.NSACCT]' + null; {string terminated
by ASCII null char}
DSCOPY (opt, spec, result);
if result[1] > 0 then DSCOPYMSG (result, fnum, r)
end.