APAR status
Closed as program error.
Error description
The java.io.File.length() method returns the length of the file denoted by the File class instance. The return type for this API method is "long" which is a 64bit value in the Java language. The length method (via the UnixFileSystem.getLength method) makes a call to the underlying OS's "stat" function which is not 64bit aware when compiled in 31bit mode. This APAR will address the use of the _LARGE_FILES FTM on 31bit z/OS builds to ensure that java.io.File functions return the correct 64bit values according to the Java specification. See Also: APAR IZ34802 for FileChannel KEYWORDS: File Overflow length size HFS zFS VERIFICATION STEPS: If a file exists in the file system with a size of 2GB or greater, the following code snippet will report and incorrect value. The number will be negative for sizes 2GB to 4GB. It will be an incorrect positive value for 4GB and above. The value being returned is an "int" instead of a "long"
Local fix
Use a 64bit version of the Java Virtual Machine to deal with File Sizes in their correct 64bit representations.
Problem summary
File.length() uses stat() to get the the file size which is defined as 31 bit in stat structure and can handle only 2GB size in 31 bit addressing zOS system.
Problem conclusion
This defect will be fixed in: 5.0.0 SR10 . In 31 bit addressing zOS, this problem can be resolved using a Feature Test Macro _LARGE_FILES. This feature test macro enables certain functions to operate on HFS files that are larger than 2 gigabytes in size. When this feature test macro is selected it must be used in conjunction with the compiler option, LANGLVL(LONGLONG) to activate the long long data type. This function will be activated to operate on HFS files of all sizes by expanding appropriate offset and file size values to a 64 bit value. . To obtain the fix: Install build 20090516 or later
Temporary fix
Comments
APAR Information
APAR number
PK82150
Reported component name
JAVA 5 Z/OS 31
Reported component ID
620500105
Reported release
500
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-03-09
Closed date
2009-05-15
Last modified date
2009-05-15
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
JAVA 5 Z/OS 31
Fixed component ID
620500105
Applicable component levels
R500 PSN
UP
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"5.0","Edition":"","Line of Business":{"code":"LOB16","label":"Mainframe HW"}}]
Document Information
Modified date:
09 August 2022