Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Most organizations have callable utility date routines. Suggest you talk with your seniors or technical support and learn what is available on your systems. If a module is callable from COBOL, it should be callable from Easytrieve.
Well, i didn't find anysuch thing that could satisfy my requirement in a step ...but found this....
We can do it using the below 2 steps:
1. The first step will pull up the day of the week based on the Local LPAR timing
a. If you would like to do it based on the GMT Timing use &WDAY instead of &LWDAY.
b. This step will return the 3 characters day value e.g. ‘MON’, ‘TUE’, etc.
2. The 2nd step will calculate the last Sunday prior to the current date and based on the current day of the week, pick up the date for the last Sunday.
&DATE1 , will fetch the date in ‘YYYYMMDD’ format, if you want to keep it in any other form you can use the available formats for the DATE function.