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

Appendix D 221
Migration From PTOP to NetIPC and RPM
Example: Client-Server Application
begin
filename := 'DATAFILE ';
reset( datafile, filename );
found := false;
while not found and not eof(datafile) do
begin
readln( datafile, name, info );
if name = reqname then
found := true
end;
end; {FIND_NAME}
begin
{-------------------------------------------------------------}
{ Each pass of this loop GETs one master request and ACCEPTs }
{ or REJECTs the request, based on the type of request. The }
{ loop continues until the master issues its PCLOSE to }
{ terminate the slave. }
{-------------------------------------------------------------}
repeat
func := GET;
case func of
0:{error}
ERROR( 'Bad GET in server', PCHECK(0) );
1:{POPEN}
begin
ACCEPT;
if ccode <> cce then
ERROR( 'ACCEPT for POPEN failed', PCHECK(0) );
end;
2:{PREAD}
begin
{----------------------------------------------------}
{ Look up name from previous PWRITE. If the name }
{ is found, ACCEPT the PREAD with the name info. }
{ If the name is not found, REJECT the PREAD. }
{----------------------------------------------------}
FIND_NAME( name, info, found );
if found then
begin
ACCEPT( , info, -infolength );
if ccode <> cce then
ERROR( 'ACCEPT for PREAD failed', PCHECK(0) );
end
else
begin
REJECT;
if ccode <> cce then
ERROR( 'REJECT for PREAD failed', PCHECK(0) );
end;
end;
3:{PWRITE}