NetIPC 3000/XL Programmer's Reference Manual (5958-8600)
Table Of Contents
- 1 NetIPC Fundamentals
- 2 Cross-System NetIPC
- 3 NetIPC Intrinsics
- 4 NetIPC Examples
- A IPC Interpreter (IPCINT)
- B Cause and Diagnostic Codes
- C ErrorMessages
- D Migration From PTOP to NetIPC and RPM
- E C Program Language Considerations

150 Chapter4
NetIPC Examples
Example 3
{*****************************************************************}
{ }
{ SOURCE : CHECK }
{ }
{ DESCRIPTION : }
{ Simplified version. }
{ This program checks that connections to remote nodes or even }
{ to local node can be actually achieved. It also allows to }
{ estimate the performances of the network. It communicates with }
{ program X25SERV that runs on remote nodes. }
{ X25CHECK sends 10 times a message to the remote server which }
{ echoes them back. }
{ It checks for both connection and communication errors. }
{ This version of X25CHECK is not compatible with the version of }
{ the product (doesn't work with the official server). }
{ Compile in compatibility mode. }
{*****************************************************************}
$GLOBAL$
PROGRAM x25chk (input,output);
$include 'decl'$
FUNCTION ask_y_n : boolean;
var
c : string [1];
begin {ask_y_n}
repeat
writeln;
prompt ('Do you want to run the test once again?(y/n) >> ');
readln (c);
until (c='y') or (c='Y') or (c='n') or (c='N') or (c='');
if (c='y') or (c='Y') then ask_y_n := true else ask_y_n := false;
end; {ask_y_n}
PROCEDURE check (result : integer;
event : event_type);
var
msg : string [80];
len : integer;
r : integer;
begin {check}
IPCErrmsg (result,msg,len,r);
setstrlen (msg,len);
if r <> 0 then
begin
writeln ('Can''t get the error message ...');
QUIT (123);
end
else
begin
writeln ('An error occurred during ',c_event_msg [event]);
writeln ('with the following identification : ');
writeln (msg);
p_retry := ask_y_n;
end;