I'm trying to figure out if I have a fundamental misunderstanding of
compiling an entire directory of C++ programs.

I compile all of a directory. I link one particular load module comprised of
object from that compile. I get behavior "x" from the load module.

I compile one of the C++ programs using the same options - the same OPTFILE
in fact. I run the same link and the same test. I get behavior "y" from the
load module.

Should one compile affect another when compiling an entire directory? For
example, do #pragmas carry over from one compile to the next? These two ways
of doing things has been working for me for years so it is not some gross
typo -- it is something very subtle, or a misunderstanding on my part of how
a directory compile should work.

Here's my "all" JCL:

//PROCLIB JCLLIB ORDER=CBC.SCCNPRC                       
//*                                                      
//* Everything                                           
//*                                                      
//COMPALL  EXEC CBCC,CPARM='OPTF(DD:SYSOPTF)',COND=(4,LT)
//SYSIN   DD PATH='/u/aaa/Source/'                    
//SYSLIB  DD PATH='/u/aaa/Source'                     
//SYSLIN  DD PATH='/u/aaa/Object/'                    
//SYSOPTF DD DISP=SHR,DSN=AAA.XXX.CNTL(CCOPTF)   
//*                                                      
//* Use BPXbatch to build an archive of object code      
//*                                                      
//BPXARCH  EXEC PGM=BPXBATCH,COND=(4,LT),                
//    PARM='SH cd Object;ar -rvc Xxx.a *.o'         
//STDIN    DD   DUMMY                                    
//STDOUT   DD   SYSOUT=*                                 
//STDERR   DD   SYSOUT=*     

Here's my "one source file" JCL (where my submit script makes #MEMBER# into
the name:

//PROCLIB JCLLIB ORDER=CBC.SCCNPRC                          
//CC       EXEC CBCC,                                       
//  CPARM='OPTF(DD:SYSOPTF)'                                
//SYSIN   DD PATH='/u/aaa/Source/#MEMBER#.C'             
//SYSLIN  DD PATH='/u/aaa/Object/#MEMBER#.o',            
//  PATHOPTS=(OWRONLY,OCREAT),PATHMODE=SIRWXU               
//SYSLIB  DD PATH='/u/aaa/Source'                        
//SYSOPTF DD DISP=SHR,DSN=AAA.XXX.CNTL(CCOPTF)      
//*                                                         
//* USE BPXBATCH TO ARCHIVE OBJECT CODE                     
//*                                                         
//BPXARCH  EXEC PGM=BPXBATCH,COND=(4,LT),                   
// PARM='SH cd Object;ar -rvc Xxx.a #MEMBER#.o'        
//STDIN    DD   DUMMY                                       
//STDOUT   DD   SYSOUT=*                                    
//STDERR   DD   SYSOUT=*


Charles 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to