title: How do I go about making this work with a #include? It works fine when dropped straight into the code
body: <p>I have a block of code that I want to #include in my z/OS Metal C program, it works fine when it's just part of the program, but when I put it into a .h file and #include it, the code won't compile.</p>
  
  <p>I have successfully gotten this code to work without #include.  I'm sure I'm overlooking something having to do with #include...</p>
  
  <p>This code works:</p>
  
  <pre><code>    #pragma margins(2,72)                                                  
      *#if 0!=0                                                              
      Test     DSECT                                                         
      Test@    DS A                                                          
      TestINT  DS F                                                          
      TestChar DS C                                                          
       .ago end                                                              
      *#endif                                                                
      *struct Test {                                                         
      *  void *Test1;                                                        
      *  int TestInt;                                                        
      *  char TestChar;                                                      
      *};                                                                    
      *#if 0!=0                                                              
      .end                                                                   
       MEND                                                                  
      *#endif                                                                
       #pragma nomargins
  </code></pre>
  
  <p>Giving compiler output that looks like this:</p>
  
  <pre><code>      207       |#pragma margins(2,72)                                            
        207       +                                                                 
        208       |#if 0!=0                                                         
        214       |#endif                                                           
        215       |struct Test {                                                    
        216       |  void *Test1;                                                   
      5650ZOS V2.1.1 z/OS XL C                          'SSAF.METALC.C(CKKTHING)'   
  
  
                                                * * * * *   S O U R C E   * * * * * 
  
       LINE  STMT                                                                   
                   *...+....1....+....2....+....3....+....4....+....5....+....6....+
        217       |  int TestInt;                                                   
        218       |  char TestChar;                                                 
        219       |};                                                               
        220       |#if 0!=0                                                         
        223       |#endif                                                           
        224       |#pragma nomargins                                                                                                    
  </code></pre>
  
  <p>But, when I put the code into an #include file like this:</p>
  
  <pre><code>    EDIT       SSAF.METALC.H(CKKTEST)
      Command ===&gt;                     
      ****** **************************
      000001 *#if 0!=0                 
      000002 Test     DSECT            
      000003 Test@    DS A             
      000004 TestINT  DS F             
      000005 TestChar DS C             
      000006  .ago end                 
      000007 *#endif                   
      000008 *struct Test {            
      000009 *  void *Test1;           
      000010 *  int TestInt;           
      000011 *  char TestChar;         
      000012 *};                       
      000013 *#if 0!=0                 
      000014 .end                      
      000015  MEND                     
      000016 *#endif                   
      ****** **************************
  </code></pre>
  
  <p>and include it in my Metal C program:  </p>
  
  <pre><code>    EDIT       SSAF.METALC.C(CKLTHING) - 01.00
      Command ===&gt;                              
      000205 #include"ckkprolg.h"               
      000206                                    
      000207 #pragma margins(2,72)              
      000208  #include"ckktest.h"               
      000209  #pragma nomargins                   
  </code></pre>
  
  <p>I get a bunch of error messages:</p>
  
  <pre><code>      205       |#include"ckkprolg.h"               /* Include assembler macros needed                        
        206       |                                      for Metal C prolog and epilog  */                      
        207       |#pragma margins(2,72)                                                                        
        207       +                                                                                             
        208       |#include"ckktest.h"                                                                          
      *=ERROR===========&gt;     CCN3275 Unexpected text 'struct' encountered.                                     
      *=ERROR===========&gt;     CCN3166 Definition of function Test requires parentheses.                         
      *=ERROR===========&gt;     CCN3275 Unexpected text 'void' encountered.                                       
      5650ZOS V2.1.1 z/OS XL C                          'SSAF.METALC.C(CKLTHING)'                    10/04/2019 
  
  
                                                * * * * *   S O U R C E   * * * * *                             
  
       LINE  STMT                                                                                               
                   *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9...
      *=ERROR===========&gt;     CCN3045 Undeclared identifier Test1.                                              
      *=ERROR===========&gt;     CCN3275 Unexpected text 'int' encountered.                                        
      *=ERROR===========&gt;     CCN3045 Undeclared identifier TestInt.                                            
      *=ERROR===========&gt;     CCN3275 Unexpected text 'char' encountered.                                       
      *=ERROR===========&gt;     CCN3045 Undeclared identifier TestChar.                                           
      *=ERROR===========&gt;     CCN3046 Syntax error.                                                             
      *=ERROR===========&gt;     CCN3273 Missing type in declaration of theESTAEXStatic.                           
        209       |#pragma nomargins                                                                            
  </code></pre>
  
  <p></p>