Header information

Enhanced ASCII support requires that all headers required by all Enhanced ASCII functions used in an application be included. Enhanced ASCII support uses headers to dynamically map generic function calls such as printf() to either an ASCII version of printf() or an EBCDIC version of printf() based on how the application was compiled. Additionally, the headers dynamically map explicit ASCII or EBCDIC function calls such as __printf_a() or __printf_e() to ASCII or EBCDIC versions of printf() respectively. For example, the snippet of code in stdio.h regarding the printf() function is as follows:
#ifdef __AE_BIMODAL_F        
   #pragma map (__printf_a,   "\174\174A00118")
   #pragma map (__printf_e,   "PRINTF")
   __new4102(int,__printf_a,(const char *, ...));
   __new4102(int,__printf_e,(const char *, ...));
#endif /* __AE_BIMODAL_F */                
                                     
#ifdef __NATIVE_ASCII_F                    
   #pragma map (printf,    "\174\174A00118")
#endif /* __NATIVE_ASCII_F */

#ifdef _NO_PROTO 
   int      printf ();
#else
   int      printf (const char *, ...); 
#endif /* _NO_PROTO */

The __AE_BIMODAL_F feature test is for ASCII/EBCDIC Bimodal support. The __AE_BIMODAL_F feature is defined in features.h if the application was compiled using the z/OS® V1R2 C/C++ Compiler, the user compiled their code using the XPLINK compile option and _AE_BIMODAL was defined. If the __AE_BIMODAL_F feature test is satisfied, the explicit printf() function calls, __printf_a() and __printf_e() get pragma mapped to the ASCII and EBCDIC versions of printf() respectively. In addition, the prototypes for __printf_a() and __printf_e() are exposed. Similar header logic is also used for ASCII/EBCDIC Mixed Mode versions of macros and structures.