IBM Support

PK02819: TELLP() GIVES ZEROS WHEN USING Z/OS C++ VERSION 1.2.0 OR NEWER.

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • tellp() gives zeros when using z/OS C++ version 1.2.0 or newer
    when compiling the following testcase:
    
    Testcase:
    --------
    // tellp_ut.cpp
    
    #if (__COMPILER_VER__ < 0x41020000)
    #  include <fstream.h>
    #  include <iostream.h>
    #  define std
    #else
    #  include <fstream>
    #  include <iostream>
    #endif
    
    int main(int argc, char argv[])
    {
      std::ofstream fs("foo.out");
      fs << "Anyone here";
      long p = fs.tellp();
      std::cout << "p:  " << p << std::endl;
      fs << " remember Vera Lynn?";
      p = fs.tellp();
      std::cout << "p:  " << p << std::endl;
    }
    
    Actual Output:
    -------------
    p:  0
    p:  0
    
    Expected Output:
    ---------------
    p:  11
    p:  32
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of C++ Standard Library Streams on zOS *
    ****************************************************************
    * PROBLEM DESCRIPTION: std::basic_ostream::tellp() returns     *
    *                      incorrect value.                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • The underlying std::fpos type currently
    does not convert correctly to a std::streamoff.
    This conversion will be corrected.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK02819

  • Reported component name

    ANSI C++ CLASS

  • Reported component ID

    568819807

  • Reported release

    708

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2005-03-21

  • Closed date

    2005-08-18

  • Last modified date

    2005-11-30

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

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

    PK16026

Modules/Macros

  • CRTD001  CRTD002  CRTEC128 CRTE128N CRTHB005
    CRTHB009 CRTHB041 CRTHH006 CRTIB005 CRTIB009 CRTIB041 CRTIH006
    

Fix information

  • Fixed component name

    ANSI C++ CLASS

  • Fixed component ID

    568819807

Applicable component levels

  • R708 PSY UK02717

       UP05/09/30 P F509

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":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0.8","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSTLTF","label":"z\/OS XL C\/C++"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0.8","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
30 November 2005