TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Examples
NonStop TS/MP Pathsend and Server Programming Manual–132500
B-27
Pathsend Requester Example
! Verify that the ASSIGNs for msg log file, error log file, and
! trace file are present in our ASSIGN table.
! The msg log file contains each record read from the input file
logical^name ':=' "MESSAGE-LOG-FILE ";
IF NOT (@assign^ := get^assign (logical^name, 16))
 THEN ! user forgot assign
 BEGIN
 sp ':=' "MISSING ASSIGN 'MESSAGE-LOG-FILE' " ->@st;
 CALL WRITE (term^fnum, buf, @st '-' @sp);
 IF <
 THEN ! print an error msg and abend
 CALL IO^error (term^fnum);
 CALL ABEND;
 END;
! The logical ASSIGN name is in assign.logicalunit.filename and the
! physical file name is in internal format in assign.tandemfilename.
! When a user adds an ASSIGN and omits the $VOL and/or SUBVOL, these
! fields are also omitted from the ASSIGN STRUCT.
! By collapsing the file name to it's external format
! ($VOL.SUBVOL.FN) and then expanding it to it's internal format
! ("\246ANCHORSUBVOL FILE "), we let the GUARDIAN 90 PROCs do
! the work of adding default values.
CALL FNAMECOLLAPSE (assign^.tandemfilename.volume, msg^log^file);
CALL FNAMEEXPAND (msg^log^file, msg^log^file, startup^msg.default);
! The error log file is used to log errors generated by BREQ
logical^name ':=' "ERROR-LOG-FILE ";
IF NOT (@assign^ := get^assign (logical^name, 14))
 THEN ! user forgot assign
 BEGIN
 sp ':=' "MISSING ASSIGN 'ERROR-LOG-FILE' " ->@st;
 CALL WRITE (term^fnum, buf, @st '-' @sp);
 IF <
 THEN ! print an error msg and abend
 CALL IO^error (term^fnum);
 CALL ABEND;
 END;
CALL FNAMECOLLAPSE (assign^.tandemfilename.volume, error^log^file);
CALL FNAMEEXPAND (error^log^file, error^log^file, startup^msg.default);










