Antwort: Re: Antwort: Re: Cobol Conditional Compile
A good idea, but a C-Compiler is not available on the programmers workstations. I'll try it with REXX. Maybe IBM decides to built in the conditional compile feature in the future. Thank you all for your response. Albert VERLAGSGRUPPE WELTBILD GMBH Sitz der Gesellschaft: Augsburg Handelsregister Augsburg HRB 6035 Ust-ID-Nr: DE 127501299 Geschäftsführung: Carel Halff (Vorsitzender), Dr. Klaus Driever, Werner Ortner, Herbert Zoch Vorsitzender des Aufsichtsrates: Dr. Klaus Donaubauer
Re: Antwort: Re: Cobol Conditional Compile
It would not be compatable with your current source, but have you considered using the C compiler's preprocessor? You use it's macro capability, run the original COBOL code through it, then run the resulting output through the COBOL compiler? The C preprocessor is relatively simple and I cannot think of a C compiler which does not support it. So you should be able to use a C preprocessor on z/OS, and UNIX, and Linux, and Windows to preprocess your COBOL code. Another possibility shudder would be to look at the m4 macro language. It is on z/OS and almost all UNIX variants (including Linux, of course). You can get it for Windows as well. http://www.gnu.org/software/m4/ http://www-03.ibm.com/servers/eserver/zseries/zos/unix/bpxa1ty1.html -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology The information contained in this e-mail message may be privileged and/or confidential. It is for intended addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited and could, in certain circumstances, be a criminal offense. If you have received this e-mail in error, please notify the sender by reply and delete this message without copying or disclosing it. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Antwort: Re: Cobol Conditional Compile
We use a single COBOL-Sourcecode (mostly subprograms) for multiple use to avoid redundancy (Batch, CICS, PC). Sample Code in MF-Cobol: 003380 LINKAGE SECTION. 003410$IF COMPILEMODUS = CICS 003420 01 DFHCOMMAREA. 00343002 ... 003540$END 003550 003560$IF COMPILEMODUS = BATCH 003570 01 io-para. 00358005 ... 003670$END 003680 003700$IF COMPILEMODUS = PC 003710 01 INPUT-BEREICH. 00372005 ... 003810$END Edit macro is a good idea, but I need a script that works as well under MVS as under Windows. We migrate from Micro Focus Mainframe Express to Websphere Developer for zSeries. Thanks Albert VERLAGSGRUPPE WELTBILD GMBH Sitz der Gesellschaft: Augsburg Handelsregister Augsburg HRB 6035 Ust-ID-Nr: DE 127501299 Geschäftsführung: Carel Halff (Vorsitzender), Dr. Klaus Driever, Werner Ortner, Herbert Zoch Vorsitzender des Aufsichtsrates: Dr. Klaus Donaubauer
Cobol Conditional Compile
Micro Focus COBOL provides a mechanism for selectively compiling part of the COBOL source. (controlled by $IF, $ELSE, $END) IBM Enterprise COBOL for z/OS 3.3 do not support conditional compile. I think about to write a REXX to do this. Any other ideas ? Albert VERLAGSGRUPPE WELTBILD GMBH Sitz der Gesellschaft: Augsburg Handelsregister Augsburg HRB 6035 Ust-ID-Nr: DE 127501299 Geschäftsführung: Carel Halff (Vorsitzender), Dr. Klaus Driever, Werner Ortner, Herbert Zoch Vorsitzender des Aufsichtsrates: Dr. Klaus Donaubauer
Re: Cobol Conditional Compile
An edit macro might work just fine as well. Todd -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Albert Klimek Sent: Tuesday, July 24, 2007 9:02 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Cobol Conditional Compile Micro Focus COBOL provides a mechanism for selectively compiling part of the COBOL source. (controlled by $IF, $ELSE, $END) IBM Enterprise COBOL for z/OS 3.3 do not support conditional compile. I think about to write a REXX to do this. Any other ideas ? Albert No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.10.9 - Release Date: 7/18/2007 12:00 AM -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Cobol Conditional Compile
On Tue, 24 Jul 2007 16:01:59 +0200, Albert Klimek [EMAIL PROTECTED] wrote: Asked about compiling parts of a source cobol program. Never had the need to. Interested in hearing why you can not use IF statements to avoid execting parts of code you are not interested in. Using an edit macro to temporarily delete portions of code to send to the compiler seems like an accident waiting to happen when you leave and the next person does not know they have to use a special edit macro in order to submit a partial compile. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: Cobol Conditional Compile
Hi, I vaguely remember such a requirement. The code went something like this : #IF RUNNING-IN-CICS #EXEC CICS LINK UTILPROG #END-IF #IF RUNNING-IN-BATCH # CALL UTILPROG #END-IF The main program was some sort of generic driver type of program which required invocation of UTILPROG. They even had a home-grown pre-compiler that would strip off the # and insert proper code. I never delved into the details; but, the scheme worked. As mentioned by someone earlier, perhaps it makes sense to have selective execution than selective compilation. Regards, Nags. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html