![getting day of week in a cl program](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTL3nZXaeCASScbHlR9eKCqGOQyAc53BYRvZuTN9rCHRzcmjBxtL4ab2VOnM0IPqALiXdoDaeT7B5RgrTULTZu4IeAqBCDSL8WPVX6ZcLXoTQywTSzbits1_WJuwbXo6CkN7ZNRt0tjSXe/s200/cl.png)
The germ for this post came from a Facebook post I saw. The question was posed: Is it possible to retrieve the day of the week in a CL program? Multiple people suggested using a CEE API. Then came a reply that really interested me. This person said he had built a SQL View for this purpose.
It struck me as a creative approach to this scenario. SQL has a global variable CURRENT_DATE which contains, as the name suggests, the current date:
SELECT CURRENT_DATE FROM SYSIBM.SYSDUMMY1 00001 ---------- 2020-10-28 |
What kind of information would I want to know about today's date?