Re: powercobol compile all directory projects




"HeyBub" <heybubNOSPAM@xxxxxxxxx> wrote in message
news:131q493n5m1v578@xxxxxxxxxxxxxxxxxxxxx
HeyBub wrote:
ramzenit wrote:
Hello,
I need compile all powercobol program into my programs directory.
How to compile all program with a bat command ?
Thanks
RamZenit

How about:

PowerCOB {/build | /rebuild} [/Debug | /Release]
[/cbi: "OPTION-FILE-NAME"]
"PROJECT-FILE-NAME"

with the results being placed in the "(projectname).blg" file.

Example:

powercob /build "C:\myprojects\proj1.ppj"

The PCV6 documentation even has a sample bat file to rebuild a whole
passle of programs while concatenating the results files into one big
file for review.

I might even modify the supplied bat file using the FOR command to
suck up everything in the folder.

I did. Here's my batch file, COMPILE.BAT

C:
CD \C-SOURCE
ECHO BEGIN > RESULT.TXT
FOR %%A IN (*.PPJ) DO POWERCOB /Rebuild /Release %%A
FOR %%A IN (*.BLG) DO TYPE %%A >> RESULT.TXT
FOR %%A IN (*.BLG) DO DEL %%A
TYPE RESULT.TXT

You might want to gussy it up some, but it's a start.

So, I gussied it up:

(COMPILE.BAT)

@ECHO OFF
C:
CD \C-SOURCE
IF EXIST == RESULT.TXT DEL RESULT.TXT
IF EXIST == *.BLG DEL *.BLG
ECHO BEGIN COMPILATION BATCH > RESULT.TXT
FOR %%A IN (*.PPJ) DO call compile2.bat %%A
TYPE RESULT.TXT

(COMPILE2.BAT)

@ECHO OFF
ECHO Compile %1
echo === BEGIN %1 >> RESULT.TXT
POWERCOB /REBUILD %1
IF ERRORLEVEL 1 GOTO FAIL
GOTO OK

:FAIL
ECHO . >> RESULT.TXT
ECHO !!! E R R O R I N %1 !!! >> RESULT.TXT
ECHO . >> RESULT.TXT

:OK
TYPE *.BLG >> RESULT.TXT
DEL *.BLG /Q
echo === END %1 >> result.txt
ECHO =============================== >> RESULT.TXT
ECHO =============================== >> RESULT.TXT
ECHO . >> RESULT.TXT
ECHO . >> RESULT.TXT


Cool! (in a 1980s kind of way...:-))

These days it should be a WSH script, but, Hey, if it works...and it
obviously does. I hope the OP takes the trouble to acknowledge your efforts,
Jerry.

Pete.


.



Relevant Pages

  • Re: powercobol compile all directory projects
    ... I need compile all powercobol program into my programs directory. ... How to compile all program with a bat command? ... The PCV6 documentation even has a sample bat file to rebuild a whole ... ECHO BEGIN> RESULT.TXT ...
    (comp.lang.cobol)
  • openmeetings
    ... I am trying to install openmeetings in ubuntu 09.10, ...
    (Ubuntu)
  • Object library problem
    ... I have just reinstalled Intel Fortran 90, ... end module DBLDEF ... echo 'Inserting into lib:' ... and in order to compile it, I use another local shell script ...
    (comp.lang.fortran)
  • Re: Permission Denied
    ... This command syntax used to run fine under OpenBSD 2.6, and it also runs under Vector Linux 5.9. ... Here is the sh script i use to compile the source: ... echo "$prog: you must supply at least $narg argument" ... /usr/lib/libg2c.so.8.1: warning: strcpyis almost always misused, ...
    (comp.unix.bsd.openbsd.misc)
  • Re: PowerCOBOL batch compiles
    ... Permit selection of any number of PowerCOBOL projects. ... @ECHO OFF ... IF %1X == RELEASEX GOTO USAGEOK ... ECHO Usage is COMPILE RELEASE or COMPILE DEBUG ...
    (comp.lang.cobol)