Using NS3000/iX Network Services (36920-90008)

Chapter 5 105
Network File Transfer
Programmatic NFT Examples
Pascal: Multiple Transfer
In this application, the opt parameter is set to two (2). All transfers will
be attempted. Primary output is disabled. The command file spec for
multiple transfers is enabled. The spec parameter contains the
COPYFILE” name terminated by an ASCII null character. The
COPYFILE” must exist prior to execution of the program.
$standard_level 'hp3000', uslinit$
program pcopy2 (copyfile);
type
small_int = -32768..32767;
const
null = chr(0); {ASCII null char}
var
copyfile : text;
opt : small_int;
fnum : small_int;
r : small_int;
spec : string [11];
result : array [1..2] of small_int;
procedure DSCOPY; intrinsic;
@COMPUTERTXT = procedure DSCOPYMSG; intrinsic;
begin {program pcopy2}
opt := 2; {output disabled; attempt all transfers; command file enabled}
fnum := 0;
spec := '(copyfile)' + null;
rewrite (copyfile);
writeln (copyfile, '+ ; :SOMENODE [NSUSER.NSACCT]'); {global spec}
writeln (copyfile, 'SOURCE1 TO TARGET1');
writeln (copyfile, 'SOURCE2 TO TARGET2');
writeln (copyfile, 'SOURCE3 TO TARGET3');
close (copyfile);
DSCOPY (opt, spec, result);
if result[1] >> 0 then DSCOPYMSG (result, fnum, r)
end.