Editerr: Trapping Compiler Errors

Qedit’s :Editerror command traps compiler syntax errors and pulls up the offending lines of source code for you to correct. Of course, you need a custom link to each compiler for this to work (:Editerror links are included in the SPLash! compiler from Software Research Northwest). We provide a utility, Editerr, which formats compiler errors for HP’s COBOLII (ANSI 74 and 85), SPL, Pascal and C/iX compilers.

Editerr is invoked through User Commands in UDC.Catalog.Robelle. There are two commands: Coberr, which traps compiler errors in COBOL source, and :Ederr, which traps compiler errors in SPL, Pascal and C/iX source. The User Command compiles the source file (you specify which compiler to be used). If there are any errors, the Editerr utility generates a list of errors for the :Editerror command. The User Command then puts you into Visual mode on the line in the source file where the first syntax error was found, and shows the first line of the compiler error message at the top of your screen. To see the next error you press F4. To see the previous error you press F3. Qedit takes care of Opening and Shutting your source files, or Texting and Keeping them if they are not Qedit files.

Editerr can be configured to ignore compiler warning messages, as well as nonstandard COBOL statement warnings. This is done by setting JCWs before running the Editerr program:

  :setjcw EditerrIgnoreWarn = 1  :setjcw EditerrIgnoreNonStd = 1 {COBOL only}  

The Editerr utility identifies errors in COBOL Copylib members and Include files, and allow you to correct them, as long as you have Write access to the copylib file. For SPL, Pascal, and C/iX, Editerr attempts to identify errors in Include files and allow you to correct them.

  /set udc udc.catalog.robelle  /open srcfile                   {or Text it}  /visual                         {make changes, then try one}                                  {of the following commands}  /coberr ,*                      {default is COBOL 85/iX}  /coberr cob74xl custrept.source {compile/fix}  /coberr co * uslfile            {use MPE V compiler}  /ederr pasxl *                  {Pascal/iX}  /ederr ccxl *,objfile           {C/iX}  /ederr spl *                    {SPL}  /shut                           {or Keep}  

HINT: In general, you use the same syntax as you are accustomed to using for compiling, but you insert the word Coberr or Ederr in front of the command. For example, instead of typing /cob85xl *, you type /coberr cob85xl *.

For MPE/iX systems, a native-mode version of the Editerr program is provided which works with both the compatibility-mode and native-mode compilers. The Qedit installation job, Install.Qeditjob.Robelle, renames the appropriate version of Editerr into production, depending on whether your machine has MPE/iX or MPE V.

More:

Limitations and Restrictions

Editerr: Trapping Compiler Errors