Here is a pair of small COBOL programs using NetIPC intrinsics to implement a very simple client-server communication over a TCP/IP connection. The server program waits for an incoming connection, reads a request (just 6-character word here), sends a response, closes the connection and terminates. The client connects to the server, sends its request, receives the response and exits. Nothing fancy, but at least enough to get started with NetIPC intrinsics. Notice that the client program has target hostname (NS nodename) hardcoded and that both, client and server program have the TCP port number hardcoded as well. :listf ipc@ ,2 ACCOUNT= APPS GROUP= LARS FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE---- SIZE TYP EOF LIMIT R/B SECTORS #X MX IPCCLTS 80B FA 156 156 3 64 1 4 IPCSRVS 80B FA 145 145 3 48 1 4 :cob85xlk ipcsrvs, ipcsrvp, $null PAGE 0001 COBOL II/iX HP31500A.04.19 [85] Copyright Hewlett-Packard CO. 1987 0 ERROR(s), 0 QUESTIONABLE, 0 WARNING(s) DATA AREA IS 80 BYTES. CPU TIME = 0:00:00. WALL TIME = 0:00:04. END OF PROGRAM END OF COMPILE HP Link Editor/iX (HP30315A.06.14) Copyright Hewlett-Packard Co 1986 LinkEd> link ;to=ipcsrvp END OF LINK :editor HP32201A.09.00 EDIT/3000 SUN, APR 30, 2000, 7:39 PM (C) HEWLETT-PACKARD CO. 1993 /t ipcclts FILE UNNUMBERED /f "target-host" in all 10 01 target-host pic x(50) value "HP918.XYZ.HPCOM". 35 target-host, 15, 2 LINES FOUND /m 10,35 MODIFY 10 01 target-host pic x(50) value "HP918.XYZ.HPCOM". dddddiLPATCH 01 target-host pic x(50) value "MY3000.GRC.HPCOM". MODIFY 35 target-host, 15, 6 target-host, 16, /k IPCCLTS,UNN IPCCLTS ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW PURGE OLD?y /e END OF SUBSYSTEM :cob85xlk ipcclts, ipccltp, $null PAGE 0001 COBOL II/iX HP31500A.04.19 [85] Copyright Hewlett-Packard CO. 1987 0 ERROR(s), 0 QUESTIONABLE, 0 WARNING(s) DATA AREA IS A8 BYTES. CPU TIME = 0:00:00. WALL TIME = 0:00:00. END OF PROGRAM END OF COMPILE HP Link Editor/iX (HP30315A.06.14) Copyright Hewlett-Packard Co 1986 LinkEd> link ;to=ipccltp END OF LINK :stream >!job sockserv, lars.apps >!run ipcsrvp >!eoj #J2239 >: :showproc job=#j2239 QPRI CPUTIME STATE JOBNUM PIN (PROGRAM) STEP D202 0:00.180 WAIT J2239 149 :RUN ipcsrvp D202 0:00.014 WAIT J2239 155 (IPCSRVP.LARS.APPS) :run ipccltp calling ipcdest... result = +000000000 calling ipcconnect... result = +000000000 calling ipcrecv for conn... result = +000000000 calling ipcshutdown for dest... result = +000000000 client request is Client calling ipcsend for data... result = +000000000 calling ipcrecv for data... want = +000000006 have = +000000000 result = +000000000 server response is Server calling ipcshutdown for conn... result = +000000068 END OF PROGRAM :showvar hplast@ HPLASTJOB = #J2239 HPLASTSPID = O3934 :print o3934.out.hpspool JOB SOCKSERV,LARS.APPS,LARS. Priority = DS; Inpri = 8; Time = UNLIMITED seconds. Job number = #j2239. SUN, APR 30, 2000, 7:40 PM. HP3000 Release: C.55.00 User Version: C.55.07 MPE/iX HP31900 C.05.08 Copyright Hewlett-Packard 1987. All rights reserved. STREAMED BY LARS.APPS (#S692) ON LDEV# 4 STREAM DATE: SUN, APR 30, 2000, 7:40 PM :run ipcsrvp calling ipccreate... result = +000000000 calling ipcrecvcn... result = +000000000 calling ipcshutdown for lstn... result = +000000000 calling ipcrecv for data... want = +000000006 have = +000000000 result = +000000000 client request is Client server response is Server calling ipcsend for data... result = +000000000 calling ipcshutdown for conn... result = +000000000 END OF PROGRAM :eoj CPU sec. = 1. elapsed min. = 1. SUN, APR 30, 2000, 7:40 PM. :bye