A fix is available
APAR status
Closed as program error.
Error description
#include <stdio.h> #include <time.h> The following small C program compiled in Enhanced ASCII mode produces output that immediately follows the program source:- ----- #include <unistd.h> int main( void ) { int I; time_t clock; if ( 1 ) { if ( setvbuf( stdout, NULL, _IOLBF, 36 ) ) perror( "stdout"); if ( setvbuf( stderr, NULL, _IOLBF, 36 ) ) perror( "stderr"); } for ( I = 0; I<5; I++ ) { fprintf( stdout, "Record %2d to stdout \t%s\n", I, ctime( ( time( &clock ), &clock ) ) ); sleep( 1 ); fprintf( stderr, "Record %2d to stderr \t%s\n", I, ctime( ( time( &clock ), &clock ) ) ); sleep( 1 ); } return( 0 ); } --- Record 0 to stderr Mon Aug 19 12:20:51 2013 Record 1 to stderr Mon Aug 19 12:20:53 2013 Record 2 to stderr Mon Aug 19 12:20:55 2013 Record 3 to stderr Mon Aug 19 12:20:57 2013 Record 4 to stderr Mon Aug 19 12:20:59 2013 Record 0 to stdout Mon Aug 19 12:20:50 2013 Record 1 to stdout Mon Aug 19 12:20:52 2013 Record 2 to stdout Mon Aug 19 12:20:54 2013 Record 3 to stdout Mon Aug 19 12:20:56 2013 The above indicates the buffer is not being flushed at each newline. The program works correctly in EBCDIC mode and inorder to obtain comparable output for the ASCII program, the \n in the source needed to be changed to \025
Local fix
use fflush() as a bypass
Problem summary
**************************************************************** * USERS AFFECTED: Users of z/OS C/C++ Enhanced ASCII I/O * * applications that also use any of the * * printf family of functions as well as line * * buffering mode. * **************************************************************** * PROBLEM DESCRIPTION: For Enhanced ASCII applications that * * also use line buffering mode (__IOLBF), * * the new-line character in a printf() * * may not cause the I/O buffer to be * * flushed properly. * **************************************************************** * RECOMMENDATION: * **************************************************************** See problem description.
Problem conclusion
The code was corrected to fix the problem.
Temporary fix
Comments
APAR Information
APAR number
PM98899
Reported component name
LE C LIBRARY
Reported component ID
568819805
Reported release
780
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2013-10-11
Closed date
2014-01-10
Last modified date
2014-02-05
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI14146 UI14147 UI14148
Modules/Macros
CELHBFMT CELHDFMA CELHDFME CELHDFMT CELHDFM2 CELHFPRT CELHPRTA CELHPRTF CELHSPRT CELHSPTA CELHVFPR CELHVPRT CELHVPR2 CELHVSPR CELHXFMT CELJDFME CELJDFMT CELJDFM2 CELJFPRT CELJPRTF CELJSPRT CELJVFPR CELJVPRT CELJVPR2 CELJVSPR CELJXFMT CELQDFME CELQDFMT CELQDFM2 CELQFPRT CELQPRTF CELQSPRT CELQVFPR CELQVPRT CELQVPR2 CELQVSPR CELQXFMT CELZDFME CELZDFMT CELZDFM2 CELZFPRT CELZPRTF CELZSPRT CELZVFPR CELZVPRT CELZVPR2 CELZVSPR CELZXFMT EDC4001B EDC40096 EDC401A5 EDC401A6 EDC401A7 EDC4014F EDC40173 EDC403BF EDC403C0 EDC4045D EDC4045E EDC40473 EDC40474 EDC40475 EDC40476
Fix information
Fixed component name
LE C LIBRARY
Fixed component ID
568819805
Applicable component levels
R770 PSY UI14146
UP14/01/22 P F401
R780 PSY UI14147
UP14/01/22 P F401
R790 PSY UI14148
UP14/01/22 P F401
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":"780","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":"780","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":"780","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
05 February 2014