Manchmal ist auch der umgekehrte Weg notwendig :
(PC-Zeit mit AS/400-Zeit synchronisieren)

BAT-Programm (PC-SEITE)
-------------------------
@echo off
:: Check Parameter
if "%1"=="?" goto HELP
if "%1"=="/?" goto HELP
if "%1"=="help" goto HELP
if "%1"=="/help" goto HELP

rmtcmd %1 call pcdattim >~temp.xxx
if errorlevel 20 goto SYSTEM

type ~temp.xxx |find "DATE" >~temp.bat
type ~temp.xxx |find "TIME" >>~temp.bat
call ~temp.bat
date /t
time /t
echo Die lokalen Werte Datum/Zeit wurden mit dem fernen System synchronisiert.
type ~temp.xxx|find "Name des fernen Systems ist"
del ~temp.bat
del ~temp.xxx
goto END

:SYSTEM
echo Sytemname falsch oder Verbindungsfehler !
echo.
del ~temp.xxx

:HELP
echo Verwendung: DATTIM (//RemoteSystemName)
echo In Klammern angegebene Programmoption ist wahlfrei.
goto END

:END
---------------------------

CLP-Programm AS/400
---------------------------
/************************************************** **************/
/* Programm :PCDATTIM */
/************************************************** **************/
/* DESCRIPTION: SEND SYSTEM TIME AND DATE TO PC */
/************************************************** **************/

PGM

DCL VAR(&TIME) TYPE(*CHAR) LEN(6)
DCL VAR(&DATE) TYPE(*CHAR) LEN(6)

MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ABEND))

RTVSYSVAL SYSVAL(QTIME) RTNVAR(&TIME)
RTVSYSVAL SYSVAL(QDATE) RTNVAR(&DATE)

SNDPGMMSG MSG('TIME ' *CAT %SST(&TIME 1 2) *CAT +
':' *CAT %SST(&TIME 3 2) *CAT +
':' *CAT %SST(&TIME 5 2))
SNDPGMMSG MSG('DATE ' *CAT %SST(&DATE 1 2) *CAT +
'.' *CAT %SST(&DATE 3 2) *CAT '.' +
*CAT %SST(&DATE 5 2))
ABEND: ENDPGM