A fix is available
APAR status
Closed as program error.
Error description
INTEGER-OF-FORMATTED-DATE gives incorrect results
Local fix
None. Apply PTF
Problem summary
**************************************************************** * USERS AFFECTED: Users of Enterprise COBOL V6.3 and later * * releases running programs using the * * INTEGER-OF-FORMATTED-DATE intrinsic * * function to display dates in * * integer-week-day format. * **************************************************************** * PROBLEM DESCRIPTION: The INTEGER-OF-FORMATTED-DATE intrinsic * * function returns an incorrect value if * * January 4th of the given year is not * * a Monday and accepts week 00 as * * valid. As per the ISO 8601 standard, * * the first week of the year is week 01 * * and includes January 4th of that year. * * When January 4th of given year lands on * * Tuesday, Wednesday, or Thursday and * * the INTEGER-OF-FORMATTED-DATE is used * * to convert a date in integer-week-day * * format into an integer date, the * * result is 7 days higher * * than the correct value. Additionally, * * when January 4th of given year lands * * on Sunday, Saturday, or Friday then * * the result was 365 days lower than the * * correct value. * * * * Example: For year 2022, January 4th is * * on Tuesday. Therefore, * * INTEGER-OF-FORMATTED-DATE * * ('YYYY-Www-D', '2022-W02-6') resulted * * in 0153789, which is incorrect and * * should be 0153782 instead. * **************************************************************** * RECOMMENDATION: Install provided PTF. * **************************************************************** There was a logic error in the runtime routine for INTEGER-OF-FORMATTED-DATE intrinsic function when converting to integer-week-day format. COB0603T/K
Problem conclusion
The logic in the runtime routine for INTEGER-OF-FORMATTED-DATE intrinsic function has been corrected to return the correct integer date value.
Temporary fix
Comments
APAR Information
APAR number
PH41259
Reported component name
LE ENT COBOL LI
Reported component ID
568819812
Reported release
7D0
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2021-10-12
Closed date
2021-10-27
Last modified date
2021-11-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
IGZCER4 IGZCEV4 IGZCMGEN IGZCMGUE IGZLLIBV IGZXAPI IGZXCA31 IGZXCDA IGZXD24 IGZXDMR IGZXJNI2 IGZXLPIO IGZXLPKA IGZXLPKB IGZXLPKC IGZXLPKD IGZXLPKE IGZXLPKF IGZXLPKG IGZXPK2
Fix information
Fixed component name
LE ENT COBOL LI
Fixed component ID
568819812
Applicable component levels
R7B0 PSY UI77778
UP21/10/30 P F110
R7C0 PSY UI77779
UP21/10/30 P F110
R7D0 PSY UI77780
UP21/10/30 P F110
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Line of Business":{"code":"LOB35","label":"Mainframe SW"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SS6SG3","label":"Enterprise COBOL for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7D0"}]
Document Information
Modified date:
02 November 2021