Current date in RPGLE

83 views
Skip to first unread message

Sharad Khare

unread,
Jan 9, 2023, 1:24:55 AMJan 9
to
Hi All,

I'm trying to get current date using *date in RPGLE but when program called via job it takes job date some time jobs is not restarted same day it shows old date not the current date.

Can you please suggest how to get current date from Job and integrative program run

Thanks!
Sharad

John McCann

unread,
Jan 9, 2023, 5:12:04 AMJan 9
to
Hi Sharad

Can you use %DATE instead of *DATE.

DTODAY S D
C EVAL TODAY = %DATE()

Jon Paris

unread,
Jan 9, 2023, 5:41:24 PMJan 9
to
You are probably using *DATE which is the wrong choice if you want to be certain of getting the current date. *DATE retrieves the _JOB_ date (i.e. the date the job entered the system). What you probably need is to use the BIF %Date() which will retrieve the current date.

Sharad Khare

unread,
Jan 10, 2023, 11:33:58 AMJan 10
to
Thank You!!
Reply all
Reply to author
Forward
0 new messages