home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / o22516d1.zip / CICSCOMP.@MD / CICSTCL.CMD < prev   
OS/2 REXX Batch file  |  1992-07-14  |  3KB  |  94 lines

  1. @echo off
  2. @echo -----------------------------------------------------------------------
  3. @echo    CICSTCL  -  Translate, compile and Link %1.ccp
  4. @echo -----------------------------------------------------------------------
  5. if %1.==. goto msg
  6. if not exist %1.ccp goto msg1
  7. faaprpml %1 %2 %3 %4
  8. if errorlevel 12 goto aserv
  9. if errorlevel 8 goto aerror
  10. if errorlevel 4 goto awarn
  11. goto acomp
  12. :aserv
  13. @echo .
  14. @echo    Severe translator errors detected
  15. @echo .
  16. goto aend
  17. :awarn
  18. @echo .
  19. @echo    Translator warning errors issued, compile continuing
  20. @echo .
  21. goto acomp
  22. :aerror
  23. @echo .
  24. @echo    Translator errors issued, program may be unusable
  25. @echo .
  26. goto aend
  27. :acomp
  28. COBOL %1,%1,%1;
  29. if errorlevel 1 goto acerr
  30. goto alink
  31. :acerr
  32. @echo .
  33. @echo    Compiler errors discovered
  34. @echo .
  35. goto aend
  36. :alink
  37. if exist %1.def goto dlink
  38. @echo ;Module definition file for %1 program >  %1.def
  39. @echo LIBRARY INITINSTANCE >>   %1.def
  40. @echo PROTMODE             >>   %1.def
  41. @echo DATA NONSHARED       >>   %1.def
  42. @echo CODE LOADONCALL      >>   %1.def
  43. @echo EXPORTS %1 @1        >>   %1.def
  44. :dlink
  45. link /NOD /NOP /MAP %1,%1.dll,,COBLIB+DOSCALLS+FAACLIB,%1.DEF;
  46. if errorlevel 1 goto alerr
  47. goto aend
  48. :alerr
  49. @echo .
  50. @echo    Link errors discovered
  51. @echo .
  52. goto aend
  53. :msg1
  54. @echo .
  55. @echo    %1.ccp does not exist
  56. :msg
  57. @echo .
  58. @echo    This command will translate, compile and link a CICS program. The
  59. @echo    source module is expected to have an extension of CCP.
  60. @echo    The input into this process is:
  61. @echo .
  62. @echo      File             Contents                  Source
  63. @echo    -------------    ---------------------     -----------------
  64. @echo    progname.CCP     CICS Source module         user defined
  65. @echo    progname.DEF     Module definition file     user defined
  66. @echo    COBLIB.LIB       COBOL compiler library     Supllied with COBOL/2
  67. @echo    DOSCALLS.LIB     OS/2 call library          Supplied with OS/2
  68. @echo    FAACLIB.LIB      CICS OS/2 library          Supplied with CICS OS/2
  69. @echo .
  70. @echo    The Output is:-
  71. @echo                        progname.TRL     Translator listing
  72. @echo                        progname.CBL     Translated source
  73. @echo                        progname.LST     Compiler listing
  74. @echo                        progname.OBJ     Object module
  75. @echo                        progname.DLL     Executable program
  76. @echo                        progname.MAP     Map listing
  77. pause
  78. @echo .
  79. @echo    To run this command enter:
  80. @echo .
  81. @echo        CICSTCL progname  directive1 directive2 directive3
  82. @echo .
  83. @echo    progname can be fully qualified and is required
  84. @echo .
  85. @echo    directive1,2,3 can be COBOL2, LINECOUNT(n), QUOTE, APOST or /B
  86. @echo    all are optional
  87. @echo .
  88. @echo    Using this command the compiler directives should either be put
  89. @echo    in the source file or in the file COBOL.DIR
  90. @echo .
  91. @echo    The definitions file progname.DEF is created if it does not exist
  92. :aend
  93.  
  94.