PI04785: WRITING TO A RECFM=U DATASET IN BINARY, DATA MAY BE LOST IF 4 OR LESS BYTES IN LENGTH

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When opening a RECFM U dataset for writing with the binary and
    noseek options, there may be data loss if the requested buffer
    to write exceeds the LRECL (or a multiple of the LRECL) by no
    more than 4 bytes.  The excess 1-4 bytes may not be written when
    using fflush() to force the buffer into the output data set.
    
    For example, in a case where the target dataset is U/80/80, and
    an fwrite() request of 82 bytes is issued, with a subsequent
    fflush() - only the first 80 bytes may be written, with the last
    two being lost.
    
    
    Verification Steps:
    1) Verify the target dataset is RECFM U and opened using fopen()
       with options "wb,noseek"
    
    2) Verify the data missing would be within the first 4 bytes of
       a logical record.
    
    3) Verify fflush() is in use following the fwrite().
    

Local fix

  • Don't use the 'noseek' option on the fopen() string, or use a
    different format (such as Fixed or Fixed-Block) data set.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of z/OS C/C++ applications that use    *
    *                 the fflush() function on data sets opened    *
    *                 RECFM=U/UA/UM with binary and noseek         *
    *                 options specified.                           *
    ****************************************************************
    * PROBLEM DESCRIPTION: The fflush() function may not write     *
    *                      out the last 1 to 4 bytes of data.      *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    See problem description.
    

Problem conclusion

  • The code was changed to fix the problem.
    

Temporary fix

  • *********
    * HIPER *
    *********
    The ++APAR is available from L2.
    

Comments

APAR Information

  • APAR number

    PI04785

  • Reported component name

    LE C LIBRARY

  • Reported component ID

    568819805

  • Reported release

    790

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-10-25

  • Closed date

    2013-12-05

  • Last modified date

    2014-03-18

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    UI13240

Modules/Macros

  •    CELHP039 CELQP039 EDC40045
    

Fix information

  • Fixed component name

    LE C LIBRARY

  • Fixed component ID

    568819805

Applicable component levels

  • R790 PSY UI13240

       UP13/12/18 P F312

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:

(0 users)Average rating

Document information


More support for:

z/OS XL C/C++
Runtime

Software version:

790

Operating system(s):

MVS, z/OS

Reference #:

PI04785

Modified date:

2014-03-18

Translate my page

Machine Translation

Content navigation