2012-06-02

[java][jt400][as400]as400のシステム時刻を取得する


AS400 as400 = new AS400("system", "id", "pw");

SystemValue systemValue = new SystemValue(as400, "QTIME");
Object odata = systemValue.getValue();
String time = new String();
if (odata instanceof Date) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
System.out.println("as400 : " + dateFormat.format(odata));
}

0 件のコメント:

コメントを投稿