ISOSNTPR4 -- sample SNTP client written in ILE RPG.

SNTP is the "Simple Network Time Protocol" and is used to synchronize your
system's clock with that of a time server.  

This program works by getting the time from a time server, and then setting 
system clock using the CHGSYSVAL command for the QDATE and QTIME system 
values.

WARNING: Due to the way that time is handled in V5R3, it's not recommended that
         you use this program.  Instead, use the CHGNTPA command to configure
         the NTP software that's built-in to the operating system.

To compile:
    First upload the 4 source members (isosntpr4, socket_h, sockutil_h and
    sockutilr4) to a QRPGLESRC file on your iSeries.  then type the following 
    commands:

    Note: xxx = library where your QRPGLESRC file is

    CHGCURLIB CURLIB(xxx)
    CRTRPGMOD SOCKUTILR4 SRCFILE(xxx/QRPGLESRC) DBGVIEW(*LIST)
    CRTRPGMOD ISOSNTPR4 SRCFILE(xxx/QRPGLESRC) DBGVIEW(*LIST)
    CRTPGM PGM(ISOSNTPR4) MODULE(SOCKUTILR4 ISOSNTPR4) ACTGRP(*CALLER)

To run:
    CALL ISOSNTPR4 PARM('time-server-name')

    Replace "time-server-name" with the name of a valid time server. If you
    don't have your own internal time servers, there's a list of publicly
    available internet servers at the following link:
     http://ntp.isc.org/bin/view/Servers/WebHome

    For example:

        CALL PGM(ISOSNTPR4) PARM('pool.ntp.org')

    You might consider running this from your job scheduler (WRKJOBSCDE) if
    you'd like to synchronize on a regular basis.
