SNAX Connection Manager (SNAX/CM) Manual
User Process Procedures
SNAX/CM Sample Server
C–12 097842 Tandem Computers Incorporated
STRUCT .newp^smsg;
begin
INT msg^code; ! word 0, should be -1
struct default;
begin
INT volume [0:3]; ! word 1 default volume and subvolume.
INT subvol [0:3];
end;
struct infile;
begin
INT volume [0:3]; ! word 9 default input file.
INT subvol [0:3];
INT fname [0:3];
end;
struct outfile;
begin
INT volume [0:3]; ! word 21 default output file.
INT subvol [0:3];
INT fname [0:3];
end;
STRING parms[0:300]; -- buffer for parms
end;
INT error;
INT .EXT connect^buf( connected^buffer^template );
STRING .sptr1;
file^name ':=' proc^buf.file1 FOR 12 WORDS;
CALL createprocessname( proc^name );
-- Start the User's Process
CALL newprocess ( file^name
,pri
,mem^size
,!processor^nu!
,proc^id
,error
,proc^name
,luexpname
,inspect^flags);
IF error > 1 THEN ! 0, 1 are OK
BEGIN -- NEWPROCESS failed
errmsg ':=' "NEWPROCESS failed for LU: " -> @sptr1;
@sptr1 := @sptr1 + fnamecollapse( luexpname, sptr1 );
CALL writeterm_( @sptr1 '-' @errmsg );
errmsg ':=' "NEWPROCESS Error: " -> @sptr1;
CALL numout(sptr1, error, 10, 5 );
@sptr1 := @sptr1 + 5;
CALL writeterm_( @sptr1 '-' @errmsg );
END -- NEWPROCESS failed
ELSE
BEGIN -- NEWPROCESS successful
-- OPEN the application
CALL OPEN( proc^name , procfn );
IF <> THEN