Endevor

 View Only
  • 1.  C++ Compile Processor

    Posted Nov 17, 2023 07:24 AM

    I'm converting from another SCM and need to create a C++ compile processor. I've looked at Community Thread 730331 but unfortunately it's missing an initial step to expand #include statements in the C++ source, which is required (a) because it includes EXEC SQL statements and (b) the include(s) needs converting from codepage 273 to codepage 1047 (which it does in the next step, using EDCICONV, on the consolidated source).

    So, two questions:

    1. Is there a BroadCom utility which expands #include statements in C++ source (in a way that I can use MONITOR=COMPONENTS)
    2. Does anyone have a generate processor which does the C++ compile using the DB2 and CICS co-processors, rather than having separate DB2 and CICS pre-compile steps beforehand? And which ideally does inbuilt codepage translation as well?

    Any help or pointers gratefully received!

    Thanks

    Charles Gaskell



  • 2.  RE: C++ Compile Processor

    Posted Nov 17, 2023 10:40 AM
    Edited by Mathew Goldstein Nov 18, 2023 09:35 AM

    We use the SQL and CICS coprocessors. We first execute the compiler to create expanded source using ARCH and PP (preprocessor only) options. Various other options may be relevant/needed when creating the expanded source code. I do not know for sure which options are relevant for the preprocessing. Does anyone know of any documentation that answers this question? Then the expanded source code is compiled in subsequent step.

    We define a particular substring of processor group name as the name of the CONPARMX elements that are placed in ENDEVOR and read to obtain the compiler options (including any coprocessor options) which are then passed the compiler step. For example:

    CMPLRCPP = 'LOCALE,SQL("APOSTSQL")'

    A Processor Group naming standard is useful for coding the processors. We designate one of characters of the processor group name to indicate if it is DB2 and another to indicate if it is CICS and can conditionally allocate the STEPLIB, DBRMLIB, etc., DD. and execute the DB2 bind (after the compile) and/or the CICS Phase-in (after the bind) accordingly. A particular processor group name character indicates the SQL co-processor is needed even though no DBRMLIB is created and therefore no DB2 bind is needed, ditto for when the CICS coprocessor is needed but there is no CICS Phase-in. 



  • 3.  RE: C++ Compile Processor

    Posted Nov 20, 2023 08:59 AM

    Hello, I cannot give you our processor but I can show you the basic DD statements for Db2/CICS/C++ processor. 

    //XXXCOBJ   PROC @CPP='N',           IS IT C++(Y) OR C(N)
    //             CCOMP=CBC,            CBC OS390 ,CCN POST ZOS  - notice 2 possible pgm prefix for the //COMPILE step
    //             CICOPN='SP,NOSOURCE',     CICS OPTION FOR C
    //             CICOPT='&CICOP&@CPP',
    //             CPARM='&CPAR&@CPP',
    //             CPARMT='&C&CCOMP',
    //             CPARM1='&ARCH OPT(2)',
    //             CPARM2=,
    //             CPARM3='OPTF(DD:SEARCH)',
    //             CRUN=,                     COMPILER RUNTIME OPTS
    //             DB2OPT='VERSION(AUTO),HOST(&HOST),NOSOURCE',
    //INIT      EXEC PGM=BC1PDSIN,MAXRC=0
    //WRITE     EXEC PGM=CONWRITE,PARM='EXPINCL(N)'
    //DB2       EXEC PGM=DSNHPC,PARM='&DB2OPT',MAXRC=4,
    //CICS      EXEC PGM=DFHEDP1$,PARM='&CICOPT',MAXRC=4,
    //COMPILE   EXEC PGM=&CCOMP.DRVR,MAXRC=8,
    //            PARM=('&CRUN/&CPARM &CPARM1 &CPARM2 &CPARMT &CPARM3')
    //STEPLIB   DD   DSN=SYS1.SCEERUN2,DISP=SHR
    //          DD   DSN=&SYS1..S&CCOMP.CMP,DISP=SHR
    //          DD   DSN=SYS1.SCEERUN,DISP=SHR
    //SYSLIB    DD  DISP=SHR,DSN=SYS1.SCEECPP,
    //COPTS     DD DSN=&OPTSDSN(&OPTIONS),DISP=SHR
    //SEARCH     DD *
      SEARCH(
             //'SYS1.SCEECPP.+',
             //'SYS1.SCEEH.SYS.H.+',
             //'SYS1.SCEEH.+',
             //'SYS1.SCLBH.+',
             //'&MQLIB')
    /*
    //SYSMSGS   DD   DUMMY,DSN=SYS1.SCBC3MSG(EDCMSGE),DISP=SHR
    //SYSXMSGS  DD   DUMMY,DSN=SYS1.SCBC3MSG(CBCMSGE),DISP=SHR
    //SYSIN     DD   DSN=&&ELMOUT,DISP=(OLD,DELETE)
    //SYSLIN    DD   DSN=&&OBJLIB(&OBJ),DISP=(NEW,PASS,DELETE),
    //            UNIT=&C1VIOUNIT,SPACE=(CYL,(1,,1)),
    //            DCB=(LRECL=80,RECFM=FB)
    //SYSPRINT  DD   DSN=&&LIST2,DISP=(OLD,PASS)
    //SYSCPRT   DD   DSN=&&LIST3,DISP=(OLD,PASS)
    //SYSOUT    DD   DSN=&&LIST4,DISP=(OLD,PASS)
    //SYSEVENT  DD   SYSOUT=&SYSOUT



    ------------------------------
    Russ
    ------------------------------



  • 4.  RE: C++ Compile Processor

    Posted Nov 21, 2023 09:40 AM

    Hello Charles,

    I don't know that CONWRiTE expands C++ #include statements.  How were they expandend in your previous product, or before that?  Perhaps you can incorporate that into your processor.  My C++ users do not use CICS or DB2,if it helps, their includes are in a USS directory.  here's a snippet.  

    Good Luck!

    Karen

    //********************************************************************* 
    //*  C++ Unix System Services Processor for Sub programs.               
    //*  creates PDS/e OBJECT members.                                      
    //*  Objects will get pulled into composite PDS/e load modules          
    //*  via type LINKCTL processor GCPNBLK1                                
    //*  G=Generate CP=C++ M=MVS N=NO DB2 B=Batch O=Object 1=Seq number     
    //*------------------------------------------------------------------
    //*  COMPILE STEP:                                                   
    //*------------------------------------------------------------------
    //COMPILE  EXEC PGM=CCNDRVR,MAXRC=4,                                 
    //    PARM=('&CRUN/CXX XPLINK GOFF &CPARM')                          
    //STEPLIB  DD  DSN=&#SCEERUN,DISP=SHR                                
    //         DD  DSN=&#SCCNCMP,DISP=SHR                                
    //SYSMSGS  DD  DUMMY,DSN=&#SYSMSGS(EDCMSGE),DISP=SHR                 
    //SYSXMSGS DD  DUMMY,DSN=&#SYSMSGS(CBCMSGE),DISP=SHR                 
    //SYSIN    DD  PATH='&C1BASELIB/&FILE',                              
    //             PATHDISP=(KEEP,KEEP),PATHOPTS=(ORDONLY),FILEDATA=TEXT 
    //SYSLIN   DD  DSN=&OBJLIB(&C1ELEMENT),DISP=SHR,                     
    //             MONITOR=COMPONENTS,FOOTPRNT=CREATE                    
    //*OPTIONS  DD  DISP=SHR,DSN=GTS.BLM.OPTIM.TESTMOD.SYSIN(COMPOPTS)   
    //OPTIONS  DD  DATA,DLM=ZZ                                           
     LANGLVL(EXTENDED) DLL LO GOFF SOURCE LIST NOMARGINS NOSEQ           
     EXPORTALL XREF                                                      
     SEARCH(/shared_application/endevor/&C1SY/CPPINCL/&C1ST. ,           
    //OPTIONS  DD  DATA,DLM=ZZ                                       
     LANGLVL(EXTENDED) DLL LO GOFF SOURCE LIST NOMARGINS NOSEQ       
     EXPORTALL XREF                                                  
     SEARCH(/shared_application/endevor/&C1SY/CPPINCL/&C1ST. ,       
     /shared_application/endevor/&C1SY/CPPINCL/&STG2. ,              
     /shared_application/endevor/&C1SY/CPPINCL/&STG3. ,              
     /shared_application/endevor/&C1SY/CPPINCL/&STG4. ,              
     /shared_application/endevor/&C1SY/CPPINCL/&STG5. ,              
     /shared_application/cpp/dasg/xpmask/inc ,                       
     /shared_application/cpp/dasg/inc/odpp ,                         
     /shared_application/cpp/dasg/inc/optim ,                        
     /shared_application/cpp/dasg/TestMod/inc ,                      
     //'SYS1.SCEEH.+',//'SYS1.SCLBH.+',                              
     //'TTAP.TS2.DB2.SDSNC.+')                                       
    ZZ                                                               
    //*  Monitor system files from above "SEARCH"                          
    //EN$DYN00 DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCEEH              
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCEEH.ARPA.H       
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCEEH.H            
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCEEH.NET.H        
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCEEH.NETINET.H    
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCEEH.SYS.H        
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCEEH.T            
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCLBH.C            
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCLBH.H            
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=SYS1.SCLBH.INL          
    //         DD  DISP=SHR,MONITOR=COMPONENTS,DSN=TTAP.TS2.DB2.SDSNC.H    
    //SYSPRINT DD  SYSOUT=*                                                



    ------------------------------
    Karen
    [JobTitle]
    [CompanyName]
    [State]
    ------------------------------



  • 5.  RE: C++ Compile Processor

    Posted Nov 22, 2023 08:01 AM

    Hi Karen,

    This is how to expand includes using CONWRITE

    //WRITE    EXEC PGM=CONWRITE,PARM='EXPINCL(Y)',MAXRC=0     Notice EXPINCL = Y
    //C1INCL01 DD DSN=HLQ.&PHLQ1..&C1STAGE..&C1SYS..INCLIB,DISP=SHR,
    //            MONITOR=COMPONENTS

    The DDNAME is C1INCL01-nn depending on the number of datasets to be included.

    Our INCLIB is an 80 character, FB dataset containing COBOL and ASM copybooks converted from Librarian.

    But it could contain -INC or ++INC members also. 

    ------------------------------
    Russ
    ------------------------------



    ------------------------------
    Russ
    ------------------------------