****************************************
      * Program name: gettime.cbl
      * This program demonstrate how to use
      * the GETTIMEFROMSERVER command.
      * In order to use the GETTIMEFROMSERVER
      * command, a Time Server must be running
      * on the target host.
      *
      * Copyright 2000 Deskware, Inc.
      ****************************************                                                             
      * Syntax: GETTIMEFROMSERVER USING   .
      *                                                               
      * Include the TCP/IP variable copybook.
       COPY `tcpip.cpy`.

       1 host_name        PIC X(30).
       1 server_time      PIC X(255).

       MOVE `purdue.edu` TO host_name.
       DISPLAY `Going to server ` & host_name & ` to get the time`.
       GETTIMEFROMSERVER USING  host_name server_time.
       DISPLAY `server_time: ` & server_time.