A fix is available
APAR status
Closed as program error.
Error description
For an RECFM=U dataset, which is empty, the very first fread gets EOF from OSREAD and moreover '0' bytes read. But, if before the first fread, an fgetpos is done, the RECFM=U case returns the blksize value (8192 in this case) instead of 0 in that first fread. The rp84 read peg, never calls OSREAD the first time. It explicitly returns the blksize value due to a 'readdeferred' setting.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: Users of RECFM=U data sets opened for * * read and using Record I/O (type=record). * **************************************************************** * PROBLEM DESCRIPTION: When the RECFM=U data set is empty, * * an fread() correctly returns 0 bytes * * read and feof() is true. However, if * * a call to fgetpos() is inserted * * before the fread(), then fread() * * incorrectly returns 'blksize' bytes, * * as if a block had been read. * **************************************************************** * RECOMMENDATION: * **************************************************************** See problem description.
Problem conclusion
The code that handles RECFM=U Record I/O is corrected to properly handle the case when the data set is empty and opened for read. The first fread, whether or not preceded by a call to fgetpos, fseek (that does not change the position), or rewind will return 0 bytes.
Temporary fix
Comments
APAR Information
APAR number
PM81270
Reported component name
LE C LIBRARY
Reported component ID
568819805
Reported release
770
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-01-23
Closed date
2013-02-07
Last modified date
2013-03-04
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK91487 UK91489
Modules/Macros
CELHP084 CELQP084 EDC40052
Fix information
Fixed component name
LE C LIBRARY
Fixed component ID
568819805
Applicable component levels
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.
Rate this page:
Average rating
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.