Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
4895 Posts
ACCEPTED ANSWER

Pinned topic SQLRPGLE op code UPDATE does not update date type field but SQL does

‏2012-11-09T22:07:38Z |
I am trying to understand why this did not work (well sporadically works for lm_LOANSTSCDT:

Chain Prevno SQLORILMST;

lm_DISBURSEDT = %Date(Postdte:*iso);
lm_SRVTRNFDT = %Date(Postdte:*iso);
lm_LOANSTSCDT = %Date(Postdte:*iso);

Update SQLORILMST %Fields (lm_DISBURSEDT : lm_SRVTRNFDT : lm_LOANSTSCDT);
This did work using SQL:

Exec Sql
Update DETORILMST set DISBURSEDT = :lm_DISBURSEDT,
SRVTRNFDT = :lm_SRVTRNFDT,
LOANSTSCDT = :lm_LOANSTSCDT
Where ACCTNO = :Prevno;
We are on v7r1

Any help understanding this would be appreciated.

Here is the results using the RPG operations code: (these date fields are null capable and default is null)
Position to line . . . . .
........1........2........3........
DISBURSEMENT_DT SRVTRNFDT LOANSTSCDT
- - -
- - -
- - -
- - 2012-08-05
- - 2012-08-05
- - 2012-08-05
- - 2012-08-05
- - 2012-08-05
- - 2012-08-05
- - -
- - -
- - -
- - 2012-08-05
- - -
- - -
- - 2012-08-05
- - -
- - -
- - -