Hi
In batch I'm using like this:
//COMPILE EXEC PGM=CCNDRVR,REGION=&CREGSIZ,
// PARM=('&CRUN/&CPARM OPTFILE(DD:OPTFILE)')
//STEPLIB DD DSN=&LIBPRFX..SCEERUN,DISP=SHR
// DD DSN=CBC.SCCNCMP,DISP=SHR
//USERLIB DD DISP=SHR,DSN=ESA.PRJ.CBTEXP.HPP
//SYSMSGS DD DUMMY,DSN=&LNGPRFX..SCBC3MSG(&CLANG),DISP=SHR
//SYSXMSGS DD DUMMY,DSN=&LNGPRFX..SCBC3MSG(&CXXLANG),DISP=SHR
//SYSIN DD DSN=ESA.PRJ.CBTEXP.CPP(&M),DISP=SHR
//SYSLIN DD DSN=ESA.PRJ.CBTEXP.OBJECT(&M),DISP=SHR
//SYSCPRT DD DSN=ESA.PRJ.CBTEXP.COMPLIST(&M),DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//OPTFILE DD DSN=ESA.PRJ.CBTEXP.PROC(OPTC),DISP=SHR
and in the OPTFILE:
---------------------------------------------
BROWSE ESA.PRJ.CBTEXP.PROC(OPTC) - 01.04
********************************* Top of Data
SEARCH(CEE.SCEEH.+,CBC.SCLBH.+,DD:USERLIB)
GONUMBER
OPT(2)
ARCH(7)
TUNE(7)
SPILL(3600)
DLL(CBA)
LOC(DE_DE.IBM-273)
DEFINE(__OS390__)
DEFINE(_POSIX_SOURCE)
DEFINE(_XOPEN_SOURCE_EXTENDED)
DEFINE(MU_STANDALONE)
LANGLVL(EXTC89)
On 30.08.2013 16:15, Mark Hammack wrote:
I would like to be able to pass a string to the IBM C/C++ compiler to include
in a program. I have tried every way I can think of to use the DEFINE()
compiler option but can't make it work. This is what I would like to do:
...
// EXEC PGM=CCNDRVR,PARM=('...DEFINE(MYSTRING=TEST)')
...
In the program --
...
#pragma comment(copyright, "This program was compiled on " __DATE__ " with the " MYSTRING
" option");
...
The compiler gets an error that it expected ")" but found "TEST" (it likes __DATE__ just
fine). I have tried DEFINE(MYSTRING='"TEST"') (with the set of quotes), using another macro:
#define test_string(option) #option
but test_string(MYSTRING) generates "MYSTRING" not "TEST".
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
--
Kind regards, / Mit freundlichen Grüßen
Miklos Szigetvari
Research& Development
ISIS Papyrus Europe AG
Alter Wienerweg 12, A-2344 Maria Enzersdorf, Austria
T: +43(2236) 27551 333, F: +43(2236)21081
E-mail: [email protected]
Info: [email protected] Hotline: +43-2236-27551-111
Visit our brand new extended Website at www.isis-papyrus.com
---------------------------------------------------------------
This e-mail is only intended for the recipient and not legally
binding. Unauthorised use, publication, reproduction or
disclosure of the content of this e-mail is not permitted.
This email has been checked for known viruses, but ISIS Papyrus accepts
no responsibility for malicious or inappropriate content.
---------------------------------------------------------------
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN