IBM Support

PN30641: INCORRECT RESULTS ARE RECEIVED ON A FILE OPENED AS TEXT WITH A LARGE BLOCK SIZE WHEN FTELL AND FSEEK ARE USED.

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The ftell function fails to return the correct file position
    on an input file. This occurs when the file is opened as a
    text record and the file has a large block size. This error will
    then cause fseek and fwrite to write the wrong data to the out
    out file. The result is missing information in the out put file.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users that invoke ftell() using text files   *
    *                 that are fixed blocked.                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: ftell() function fails to record the    *
    *                      encoded file position for text files,   *
    *                      when blocksize of the file plus number  *
    *                      of new line characters is greater than  *
    *                      32K-1.                                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When running under MVS environment,  the maximum allowed
    blocksize is 32K.  The ftell function can encode file
    positions that are less than 131072 blocks.  However,  if
    you open a file in text stream mode and record format (recfm) is
    fixed blocked (FB) and the blocksize of the file plus the
    number of new-line characters is greater than 32K-1, then
    ftell function can only encode file positions that are less
    than 65536 blocks.
    
    When running under VM/CMS environment, for record size less
    than 32K, ftell function can encode file positions that are
    less than 131072 physical records.  However, for record sizes
    between 32K and 64K, the ftell function can only encode file
    positions that are less than 65536 physical records.
    If you attempt to use the ftell function for file position
    that are greater than the above specified limits, then ftell
    will fail.
    

Problem conclusion

  • The problem has been corrected, however, ftell function can only
    encode file positions that are less than 65536 blocks, if you
    meet the conditions described in problem summary section.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PN30641

  • Reported component name

    LE C LIBRARY

  • Reported component ID

    568819805

  • Reported release

    151

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    1992-11-03

  • Closed date

    1992-12-03

  • Last modified date

    1993-06-11

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

    PN27386

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

Modules/Macros

  • EDCFOPEN EDCFOPOS EDCFOPST EDCINFO  FCB
    SYSIO
    

Fix information

  • Fixed component name

    LE C LIBRARY

  • Fixed component ID

    568819805

Applicable component levels

  • R15M PSY UN32306

       UP93/02/11 P 9303

  • R150 PSY

       UP

  • R151 PSY UN32307

       UP93/02/12 P F302

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.

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVSBD","label":"Runtime"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"151","Edition":"","Line of Business":{"code":"","label":""}},{"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":"151","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":null,"label":null},"Product":{"code":"SG19O","label":"APARs - MVS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"151","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
11 June 1993