Re: powercobol compile all directory projects
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Apr 2007 11:25:36 +1200
"HeyBub" <heybubNOSPAM@xxxxxxxxx> wrote in message
news:131q493n5m1v578@xxxxxxxxxxxxxxxxxxxxx
HeyBub wrote:Cool! (in a 1980s kind of way...:-))
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
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.
.
- References:
- powercobol compile all directory projects
- From: ramzenit
- Re: powercobol compile all directory projects
- From: HeyBub
- Re: powercobol compile all directory projects
- From: HeyBub
- powercobol compile all directory projects
- Prev by Date: Re: (humor) Cogito ergo sum
- Next by Date: Re: COBOL stored procedure for DB2
- Previous by thread: Re: powercobol compile all directory projects
- Next by thread: OT: (humor) Cogito ergo sum
- Index(es):
Relevant Pages
|