Does CA 2E have a provision to change the cut-off date to determine the century? What is the new max cut off date? Does CA 2E have any other option for this use case? Currently using a 7 digit date and naming a specific max date as the cut off date
Example: Naming the cut off date as 12/31/39. Any dates before that is considered 21st century (up to Dec 31, 2039) and anything after is 20th century, starting on Jan 1, 1940. Need to express later dates, ie: Jan 1, 2040
CA 2E 8.7 and above
New functionality introduced in 8.7.3.
There are two options one may consider:
Option 1:
Increase value in YCUTOFF model value. i.e changing the data area Y2CTOFF data area to 1970 (Assuming in production data the lowest 20th century year is 1970) year instead of 1940. So that CA 2E will take <70 as 21st century and >70 as 20th century. Such that we can use till 2069. We can adjust this value in window of 100 years. To change this value, you will need to examine the production database setting related to 20th century date definition. Depend on that value you could then can adjust the Y2CTOFF data area value.
If this approach were to be used, there is no need to regenerate the functions. We would need to review the production data and determine the lowest date that is in the files that contain the date and place that year in the Y2CTOFF data area. We can then adjust the Y2CTOFF data area value in a window of 100 years, from 1900 to 1999. Let us suppose if we change the data area value to 1970, then we can use the max date as 2069. Y2CTOFF is the run-time data area. That is, while running the 2E-generated program based on the Y2CTOFF value, 2E decides which century to take. As it is run-time decision-making based on the Y2CTOFF value, we DO NOT need to regenerate functions.
Option 2:
A new feature was introduced a new feature in 2E 8.7.3 which involves controlling the EDTCDE value of screen-based date fields, depending on a new model value (YDATCDE)/new function option (EDTCDE ctrl for DATE FLDs). These changes will make the date fields capable of taking 8 digit dates, thereby extending the maximum date that can be used in CA 2E up to 2199, instead of the 100-year YCUTOFF window limitation.
The idea of the feature came from the fact that already 2E will work until 2199 if we change the screens' DT#, DTE, and D8# fields input and output edit codes to '/ (because on the screen the date field length will be 8, i.e., MMDDYYYY). So to reduce the manual effort for the customer to change each date field in the screen from the default edit code of 'Y' to '/', we introduced a new usability feature in 8.7.3.
So with this feature, if we change the YDATCDE to *NEW, then all the new screen function date fields that are created have the EDTCDE of '/' so that all the date fields come as 8 in length on the screen.
For the existing functions to change all date fields EDTCDE from 'Y' to '/', we introduced a new function key, F22, on the "EDIT FUNCTION DETAILS" screen (this screen will come if we take option Z on the function).
The option exists to do bulk modification of EDTCDEs from 'Y' to '/' on the function level only. We can not do bulk modification at the model level. Because after doing this bulk modification, all the date fields' length will be changed from length 6 to length 8, so customers need to manually verify the screen design if any design exceeds the limit error or not. If it occurs, then the customer needs to adjust the screen layout manually.
One way to find the screens that contain the date fields is we need to take option 'U' usages on the date fields(DT#,D8#,DTE).
The other way is by using the below query:
SELECT OBJNME, IMPNME FROM YMDLOBJRFP WHERE @@OBJ IN (
SELECT @@MSG FROM YSCRENTRFP WHERE @@FLD in ( SELECT @@FLD FROM
YFLDDTARFP WHERE OBJATR in ( 'DT#' , 'DTE' , 'D8#' ) ) )
For further details, please reference the existing documentation detailing the increased date range option.