On the input DD statement put a LRECL lower than the largest actual record?
On Wed, Apr 1, 2015 at 4:37 PM, Frank Swarbrick <[email protected]> wrote: > I am trying to create a test case that gets the '00' when compiled with V4 > and gets the '04' when compiled with V5 and VLR(STANDARD). I can't for the > life of me figure out what this case is. I can get '04' under V4, but I > can't figure out the actual situation that this is addressing. (I'm looking > for examples, not words, as obviously I am failing to understand the words.) > From: Greg Shirey <[email protected]> > To: [email protected] > Sent: Wednesday, April 1, 2015 9:00 AM > Subject: Re: migrating compiler versions > > APAR PI22094 added a new compiler option -- VLR(COMPAT|STANDARD). > > Copied from UI21043: > > VLR(STANDARD) > Programs will get the status value of 04 when READ statements > encounter a record length conflict, or 'wrong length read'. > If your program performs a wrong length read as described > above and your code checks for File Status = 0 after READ of > variable-length record files, your code will take the 'Not > zero' path. You can change your code to test for FS=0, while > FS=4 and other values will all be a failed READ. For FS=4 > you may want to add code to avoid the bad data in data items > or protection exceptions mentioned above. > > VLR(COMPAT) > Programs will get the status value of 00 when READ statements > encounter a record length conflict, or 'wrong length read'. > If your program performs a wrong length read as described > above and your code checks for File Status = 0 after READ of > variable-length record files, your code will take the 'zero' > path, just as it did in previous versions of IBM COBOL > (Enterprise COBOL V4 and V3 and earlier). > > HTH, > Greg Shirey > Ben E. Keith Company > > > > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] On > Behalf Of Ken MacKenzie > Sent: Wednesday, April 01, 2015 4:00 AM > To: [email protected] > Subject: Re: migrating compiler versions > > <snip> > > Whereas in previous versions of ECOBOL a minimum and maximum record length > did not have to be specified when defining a variable file, v5.1 will return > a file status of '04' if any record is less than or greater than the minimum > / maximum specified. > > ---------------------------------------------------------------------- > 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 > -- Mike A Schwab, Springfield IL USA Where do Forest Rangers go to get away from it all? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
