


Following are sample client and server programs: "prog1.cbl", "prog2.cbl", and "asynch.cbl". These programs are included in the /sample directory on your AcuConnect installation disk or CD-ROM.
"prog1.cbl" is a client program that performs a synchronous CALL. Notice the CALL statement in the PROCEDURE DIVISION section of this program. This CALL invokes "prog2" on the server, and displays the result on the client workstation. Remember that the client configuration file ("client.cfg", for example) defines the location of the server. In this case, it also defines the CODE_SUFFIX, ".acu".
"asynch.cbl" is a client program that performs an asynchronous CALL. Notice that in the PROCEDURE DIVISION section of this program, a CALL is made to the C$ASYNCRUN library routine using "prog2" and some parameters. This tells AcuConnect to allow processing on the client to continue. Notice also that this program later CALLs the C$ASYNCPOLL routine to check the status of "prog2".
Both "prog1.cbl" and "asynch.cbl" start "prog2" on the server using the same "client.cfg" file.
After you have prepared your server and client as described in Chapters 3 and 4, you can try running "prog1.acu" and/or "asynch.acu" on the client to test your AcuConnect connection. For instructions, refer to section 5.5 Running the Sample Programs.