Thanks for the input, Tom. I agree with everything you say. A somewhat ironic thing is it technically isn't "bad data". Rather, it's good data but only under certain circumstances. That is, there is a redefines (several, actually), and the condition should have been evaluated only in cases where another field had a certain value. The code has, of course, no been fixed to check the other field before treating the field in question as numeric.
If only COBOL had "tagged redefines" (see also "tagged unions", "sum types", "variant types" and many other names for the same idea). Frank ________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Tom Ross <[email protected]> Sent: Friday, March 12, 2021 9:44 AM To: [email protected] <[email protected]> Subject: COBOL V6.2 possible change in behavior with recent patch level >We recently applied patches up through September 2020 to our Enterprise COB= >OL V6.2 compiler. Prior to this we had patches through September 2019. Th= >is appears to have changed how some code is generate, even though the compi= >ler options have not changed. Frank, this is unfortunate, but I have to say, we do not recommend running COBOL programs with invalid data, and we do not recommend using ZONEDATA with other than (PFD) as the sub option. We keep finding new ways that older COBOL behaved differently than new COBOL with invalid data, and in the case you mention we had a customer complaining that the example you posted ABENDed with COBOL V4 but not COBOL V6 with ZONEDATA(MIG), so we changed the code. The intention of ZONEDATA(other than PFD) is to mimic COBOL V4, and this is a little bit of an ongoing process. We, of course, NEVER used to test with invalid data (data that does not match the PICTURE and USAGE) so this is a challenging job! The best way to go is to correct your programs and data to follow the rules. For example, we had a customer recompile all programs in an application with COBOL V6.1, but they did NOT folow our 2-compile 2-test migration process to find and clean up invalid data. The results o their regression tests were OK, so they went into production! All was well until they moved to COBOL V6.2 to compile with ARCH(12) and exploit z14. At that point they discovered they had some invalid data processing that started causing new ABENDs with Vector Packed Decimal instructions. I recommend cleaning things up before declaring migration to COBOL V6 complete! Cheers, TomR >> COBOL is the Language of the Future! << ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
