home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
o22516d1.zip
/
CICSCOMP.@MD
/
CICSTCL.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1992-07-14
|
3KB
|
94 lines
@echo off
@echo -----------------------------------------------------------------------
@echo CICSTCL - Translate, compile and Link %1.ccp
@echo -----------------------------------------------------------------------
if %1.==. goto msg
if not exist %1.ccp goto msg1
faaprpml %1 %2 %3 %4
if errorlevel 12 goto aserv
if errorlevel 8 goto aerror
if errorlevel 4 goto awarn
goto acomp
:aserv
@echo .
@echo Severe translator errors detected
@echo .
goto aend
:awarn
@echo .
@echo Translator warning errors issued, compile continuing
@echo .
goto acomp
:aerror
@echo .
@echo Translator errors issued, program may be unusable
@echo .
goto aend
:acomp
COBOL %1,%1,%1;
if errorlevel 1 goto acerr
goto alink
:acerr
@echo .
@echo Compiler errors discovered
@echo .
goto aend
:alink
if exist %1.def goto dlink
@echo ;Module definition file for %1 program > %1.def
@echo LIBRARY INITINSTANCE >> %1.def
@echo PROTMODE >> %1.def
@echo DATA NONSHARED >> %1.def
@echo CODE LOADONCALL >> %1.def
@echo EXPORTS %1 @1 >> %1.def
:dlink
link /NOD /NOP /MAP %1,%1.dll,,COBLIB+DOSCALLS+FAACLIB,%1.DEF;
if errorlevel 1 goto alerr
goto aend
:alerr
@echo .
@echo Link errors discovered
@echo .
goto aend
:msg1
@echo .
@echo %1.ccp does not exist
:msg
@echo .
@echo This command will translate, compile and link a CICS program. The
@echo source module is expected to have an extension of CCP.
@echo The input into this process is:
@echo .
@echo File Contents Source
@echo ------------- --------------------- -----------------
@echo progname.CCP CICS Source module user defined
@echo progname.DEF Module definition file user defined
@echo COBLIB.LIB COBOL compiler library Supllied with COBOL/2
@echo DOSCALLS.LIB OS/2 call library Supplied with OS/2
@echo FAACLIB.LIB CICS OS/2 library Supplied with CICS OS/2
@echo .
@echo The Output is:-
@echo progname.TRL Translator listing
@echo progname.CBL Translated source
@echo progname.LST Compiler listing
@echo progname.OBJ Object module
@echo progname.DLL Executable program
@echo progname.MAP Map listing
pause
@echo .
@echo To run this command enter:
@echo .
@echo CICSTCL progname directive1 directive2 directive3
@echo .
@echo progname can be fully qualified and is required
@echo .
@echo directive1,2,3 can be COBOL2, LINECOUNT(n), QUOTE, APOST or /B
@echo all are optional
@echo .
@echo Using this command the compiler directives should either be put
@echo in the source file or in the file COBOL.DIR
@echo .
@echo The definitions file progname.DEF is created if it does not exist
:aend