IBM Support

PN67567: FSANF LIBRARY FUNCTION ENTERS INTO A INFINITE LOOP WHEN EOF IS USED AS THE TEST FOR A WHILE LOOP.

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The fsanf function does not set the EOF flag when scanning
    numeric data. If a program codes a conditional call to
    fsanf, and uses the !=EOF as the test, the loop will not end.
    The fsanf logic will only set the EOF flag for numeric data
    if a conversion error is encountered, or an I/O error occurs.
    The fsanf function will not set the EOF flag if that last record
    is reached. If the FEOF is used in the while loop, then the
    loop will end on the last record.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users who use fscanf()/scanf() after eof is  *
    *                 reached or expect fscanf()/scanf() to report *
    *                 when eof is passed.                          *
    ****************************************************************
    * PROBLEM DESCRIPTION: The EOF return code is not returned     *
    *                      when scanf()/fscanf() is called and     *
    *                      position is already at eof.             *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    fscanf()/scanf() returns 0 instead of EOF when called and
    position is already at eof.
    

Problem conclusion

  • The problem has been rectified.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PN67567

  • Reported component name

    LE C LIBRARY

  • Reported component ID

    568819805

  • Reported release

    350

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    1995-02-02

  • Closed date

    1995-04-17

  • Last modified date

    1995-12-16

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

    PN64981

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

    UN76521 UN76522

Modules/Macros

  • EDCGSCAN EDC1$105
    

Fix information

  • Fixed component name

    LE C LIBRARY

  • Fixed component ID

    568819805

Applicable component levels

  • R35N PSY UN76521

       UP95/08/16 P 9508

  • R350 PSY UN76522

       UP95/08/17 P F508

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":"350","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":"350","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":"350","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
16 December 1995