16
Basic UserBasic User
16

    Dec 24, 2020#16

    Mofi

    It is possible to compile, link and produce the .EXE file in one step. See

    coblink.bat:

    set path=c:\cobol32\exedll;

    set cobdir=c:\cobol32\lbr; c:\cobol32\exedll;
    set lib=c:\cobol32\lib;

    cbllink coboltest.cbl

    This produces the .OBJ file and the resulting .EXE file.

    Maybe we could modify the UEStudio Application to only call cbllink .exe (and ignore cobol.exe)

    6,688587
    Grand MasterGrand Master
    6,688587

      Dec 24, 2020#17

      Thanks for letting me know that it is possible to compile your COBOL source code file with cobol.exe and with command lines and environment variables.  The variables list proves that the following statement on the Micro Focus Environment variables page is not correct:
      The following environment variables are set in the system registry. You can change the values using the SET command, but values you set are only added to the values already set in the registry.
      None of the variables are defined by default as persistent stored system environment variables.
      By the way: The first folder paths in system PATH should be always the Windows default folder paths:

      %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\;%SystemRoot%\System32\OpenSSH\

      There are are lots of other folder paths inserted before by not good coded installers. I strongly recommend to open Windows Control Panel - System - Advanced system settings, click on button Environment Variables and fix in upper half user PATH and in lower half system PATH.

      The folder paths above/left the folder paths listed above should be moved down/right of them.
      ;; after C:\Program Files (x86)\Wolfram Research\WolframScript\ should be replaced by a single semicolon. (It is also possible that user PATH starts with a semicolon which should be removed to fix that.)
       c:\windows\system32\ should be removed as this is a duplicate of %SystemRoot%\system32.
       C:\Users\paulr\AppData\Local\Microsoft\WindowsApps is twice in user PATH and so the second occurrence should be deleted from user PATH.
      It would make sense to make sure that C:\Program Files\PowerShell\7\ is above/left to %SystemRoot%\System32\WindowsPowerShell\v1.0\ so that version 7 of PowerShell takes precedence over the PowerShell version installed by default depending on Windows version.

      So the output of set PATH after making all the chances in a new opened command prompt window should be:

      Code: Select all

      Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\PowerShell\7\;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Embarcadero\Studio\20.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\20.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\Win64;C:\Program Files (x86)\Common Files\Fujitsu\COBOL;C:\Program Files (x86)\Calibre2\;C:\Program Files\dotnet\;C:\FPC\3.2.0\bin\i386-Win32;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\PWRS\shared;C:\PWRS\im6\tutorial;C:\Program Files (x86)\PuTTY\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\IDM Computer Solutions\UltraEdit;C:\Program Files (x86)\Eloquence\8.3\bin;C:\Program Files (x86)\Eloquence\8.3\bin64;C:\Program Files (x86)\Wolfram Research\WolframScript\;C:\Program Files (x86)\IDM Computer Solutions\UEStudio;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Python39\Scripts\;C:\Python39\;C:\Users\paulr\AppData\Local\Microsoft\WindowsApps;C:\Program Files\LLVM\bin;C:\Users\paulr\.dotnet\tools;
      PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

      I updated MicroFocusApplicationConfig.zip in my previous post. The updated file in this ZIP file defines now also the environment variable COBDIR similar to your batch file. I am just wondering myself why you have assigned the two directories c:\cobol32\lbr; c:\cobol32\exedll; with a space after first semicolon as there is written on the Micro Focus page:
      COBDIR The location of the COBOL system directory.
      So I would expect only one directory path assigned to environment variable COBDIR, the directory c:\cobol32\exedll, and the directory path c:\cobol32\lbr is assigned to environment variable INCLUDE.

      You have not executed the command lines as suggested by me to find out if the compilation of the COBOL source file works also from within subdirectory Debug with relative path ..\coboltest.cbl and without or with the additional options.

      I would really like to create the Micro Focus COBOL compiler configuration not with just minimal options, but with all possible options easy to configure in the Compiler Options dialog window. So I would really like to know how the string assigned to Cmd0 should look like in section [.CBL] other than using just cobol.exe $I or cobol.exe $I; to be able to use the options to compile with generating also source and/or object code listing which means which command lines really to use on using the additional options.

      That is also the reason why I would like the two step build with compilation of each *.cbl file first with cobol.exe and next link the *.obj files together with cbllink.exe. It would be of course possible to define the compiler configuration to always Build or Rebuild with using just cbllink.exe as I read also in the documentation, but that would mean the options supported by cobol.exe to generate a source/object code listing would not be available as these options are not supported by cbllink.exe according to the documentation.

      Sorry, that I would like a compiler configuration working with all available features instead of a minimal. I have spent too much hours already in the Micro Focus COBOL compiler configuration to give up now to define a full feature compiler configuration and define just a working minimal compiler configuration.
      Best regards from an UC/UE/UES for Windows user from Austria

      16
      Basic UserBasic User
      16

        Dec 24, 2020#18

         Mofi

        Just a quick reply (before Christmas festivities)

        cobol coboltest.cbl;       <--- the semi-colon causes coboltest.obj to be created
        cbllink coboltest.obj       <--- creates coboltest.exe

        Using cobol coboltest.cbl (without semi-colon) requires user input for .OBJ file name and source/object listing. Maybe this was why the earlier Application was not creating the .OBJ file.
                        
        C:\WORKAREA\COBOL32\COBOLtest>cobol coboltest.cbl
        Micro Focus Object COBOL (32-bit)
        Version 4.0.38 Copyright (C) 1984-1998 Micro Focus Ltd.
        URN OXCNM/000047913
        Object file-name [COBOLTEST.OBJ]:      <----- User input required
        Source listing   [NUL]:                                    <----- <enter>
        Object listing   [NUL]:                                    <----- <enter>
        * Checking complete with no errors - starting code generation
        * Generating COBOLTEST
        * Data:         560     Code:        1221     Literals:         536

        Happy Christmas.

          Dec 26, 2020#19

          Mofi

          If you want to have the option of selecting source and/or object listings I presume you will need to have a separate compile facility i.e. a compile followed by a separate link facility, to allow the input of listing options (as above)

          I tried the Compile option and got this:

          --------------------Configuration: COBOLtest - Debug--------------------
          cobol.exe ..\COBOLtest.cbl,COBOLtest.obj,nul,nul ;
          COBOLtest.obj - 0 error(s), 0 warning(s)

          There is no .OBJ file created and no screen shows allowing user input.
          I am just wondering myself why you have assigned the two directories c:\cobol32\lbr; c:\cobol32\exedll; with a space after first semicolon as there is written on the Micro Focus page
          I have used these environment settings for many years without problems.  MF recognises them - MF doesn't have an INCLUDE directory and, I assume, would not recognise INC
          You have not executed the command lines as suggested by me to find out if the compilation of the COBOL source file works also from within subdirectory Debug with relative path ..\coboltest.cbl and without or with the additional options.
          I did this and got:

          C:\WORKAREA\COBOL32\COBOLtest\Debug>cobol ..\coboltest.cbl;
          Micro Focus Object COBOL (32-bit)
          Version 4.0.38 Copyright (C) 1984-1998 Micro Focus Ltd.
          URN OXCNM/000047913
          * Checking complete with no errors - starting code generation
          * Generating ..\COBOLTEST
          * Data:         560     Code:        1221     Literals:         536

          C:\WORKAREA\COBOL32\COBOLtest\Debug>

          COBOLTEST.OBJ is created in the Debug folder.

            Dec 26, 2020#20

            Also amending the batch file to allow user input I requested COBTEST.LST which was created in the Debug directory.

            C:\WORKAREA\COBOL32\COBOLtest\Debug>cobol ..\coboltest.cbl
            Micro Focus Object COBOL (32-bit)
            Version 4.0.38 Copyright (C) 1984-1998 Micro Focus Ltd.
            URN OXCNM/000047913
            Object file-name [COBOLTEST.OBJ]:
            Source listing   [NUL]: cobtest.lst
            Object listing   [NUL]:
            * Checking complete with no errors - starting code generation
            * Generating ..\COBOLTEST
            * Data:         560     Code:        1221     Literals:         536

            C:\WORKAREA\COBOL32\COBOLtest\Debug>

            6,688587
            Grand MasterGrand Master
            6,688587

              Dec 28, 2020#21

              I found out that on page Visual COBOL Personal Edition can be downloaded a trial edition of the Micro Focus Visual COBOL compiler. So I decided to register, download the installer for Eclipse (1 GB), activate the license and make use of it with a small "HELLO WORD" COBOL source file I found in world wide web.

              I installed Micro Focus Visual COBOL 6.0 into C:\Cobol32. There was an error during the installation because of no Visual Studio Tools installed on my machine. That error during installation causes finally linker errors because of missing compatible Windows libraries and tools. However, these linker errors because of missing compatible *.lib files of Windows do not matter for creation of the compiler configuration.

              Installation directory  (compiler path)

              I found out that the installer creates under registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\Visual COBOL\6.0 a string value with name INSTALLDIR with the string value C:\Cobol32\. The updated compiler configuration evaluates this registry string value with following line in section [Variables].

              CPATH = $(HKEY_LOCAL_MACHINE\SOFTWARE$6432\Micro Focus\Visual Cobol\$(Compiler Version)\INSTALLDIR)

              So the user of the compiler configuration does not need to manually define the installation directory of the Micro Focus Visual COBOL compiler.

              I don't know if the installers of version 5.0 and version 4.0 of Micro Focus Visual COBOL compiler create also an appropriate registry key with the string value INSTALLDIR containing the path to the installation directory which ends with a backslash. I suppose that this is the case. So I added a general compiler option with name Compiler Version with the three options 6.0 (default), 5.0 and 4.0. A user like you using the attached compiler configuration must select the appropriate version on not using currently latest version 6.0.

              Please let me know if version 4.0 is installed with creation of registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\Visual COBOL\4.0 with a string value with name INSTALLDIR and with string value C:\Cobol32\ (backslash at end).

              Environment variables

              Micro Focus Visual COBOL 6.0 is installed with 32-bit and 64-bit binaries. I added the general compiler option Compiler Architecture to give the user of the compiler configuration the possibility to choose between 32-bit or 64-bit cobol.exe and cbllink.exe.

              I could see further that under registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\Visual COBOL\6.0\COBOL\Environment are several strings defined which define the environment on execution. In directory C:\Cobol32 are installed the two batch files CreateEnv.bat and SetupEnv.bat. I looked on them and found out that the environment is created by running either C:\Cobol32\bin\cblpromp.exe or C:\Cobol32\bin64\cblpromp.exe with output redirected into a temporary batch file which is called next to define the environment variables.

              Output of C:\Cobol32\bin\cblpromp.exe:

              Code: Select all

              @SET COBDIR=C:\Cobol32\;%COBDIR%
              @SET PATH=C:\Cobol32\bin\;C:\Cobol32\binn\;C:\Cobol32\AdoptRedis;%PATH%
              @SET LIB=C:\Cobol32\lib\;%LIB%
              @SET COBCPY=%COBCPY%;C:\Cobol32\cpylib\;C:\Cobol32\cpylib\basecl;C:\Cobol32\cpylib\guicl;C:\Cobol32\cpylib\olecl
              @SET MFTRACE_ANNOTATIONS=C:\Cobol32\etc\mftrace\annotations
              @SET MFTRACE_LOGS=C:\ProgramData\Micro Focus\Visual COBOL\6.0\mftrace\logs
              @SET INCLUDE=C:\Cobol32\include;%INCLUDE%
              @SET CLASSPATH=C:\Cobol32\bin\mfcobol.jar;C:\Cobol32\bin\mfcobolrts.jar;C:\Cobol32\bin\mfsqljvm.jar;C:\Cobol32\bin\mfunit.jar;C:\Cobol32\bin\mfidmr.jar;C:\Cobol32\bin\mfle370.jar;%CLASSPATH%
              @SET MFDBFH_SCRIPT_DIR=C:\Cobol32\etc\mfdbfh\scripts
              @SET DSGDIR=C:\Users\Public\Documents\Micro Focus\Visual COBOL\;C:\Cobol32\Bin
              @SET TXDIR=C:\Cobol32\
              @SET COBREG_PARSED=True
              
              Output of C:\Cobol32\bin64\cblpromp.exe:

              Code: Select all

              @SET COBDIR=C:\Cobol32\;%COBDIR%
              @SET PATH=C:\Cobol32\bin64\;C:\Cobol32\binn64\;C:\Cobol32\bin\;C:\Cobol32\AdoptOpenJDK\bin;C:\Cobol32\AdoptRedis;%PATH%
              @SET LIB=C:\Cobol32\lib64\;%LIB%
              @SET COBCPY=%COBCPY%;C:\Cobol32\cpylib\;C:\Cobol32\cpylib\basecl
              @SET MFTRACE_ANNOTATIONS=C:\Cobol32\etc\mftrace\annotations
              @SET MFTRACE_LOGS=C:\ProgramData\Micro Focus\Visual COBOL\6.0\mftrace\logs
              @SET INCLUDE=C:\Cobol32\include;%INCLUDE%
              @SET JAVA_HOME=C:\Cobol32\AdoptOpenJDK
              @SET CLASSPATH=C:\Cobol32\bin\mfcobol.jar;C:\Cobol32\bin\mfcobolrts.jar;C:\Cobol32\bin\mfsqljvm.jar;C:\Cobol32\bin\mfunit.jar;C:\Cobol32\bin\mfidmr.jar;C:\Cobol32\bin64\mfle370.jar;%CLASSPATH%
              @SET MFDBFH_SCRIPT_DIR=C:\Cobol32\etc\mfdbfh\scripts
              @SET TXDIR=C:\Cobol32\
              @SET COBREG_64_PARSED=True
              
              I analyzed which environment variables are used by which executable or DLL and found out that for cobol.exe and cbllink.exe only the environment variables are necessary which are defined in the attached compiler configuration in section [Environment]. The other environment variables are not needed for compilation and linking.

              I added $(CPATH)exedll; to PATH although such a directory does not exist on using version 6.0 of the Micro Focus Visual COBOL compiler. That is for compatibility with your installed version 4.0.

              I added $(CPATH)lbr to LIB although such a directory does not exist on using version 6.0 of the Micro Focus Visual COBOL compiler. That is for compatibility with your installed version 4.0.

              Update compiler configuration

              Please download the attached ZIP file. Next extract the file Application in the ZIP file to the directory C:\workarea\cobol32\coboltest\Configs\COBOL Compiler\ while UEStudio is not running and overwrite the existing file.

              Then start UEStudio, open the Compiler Options dialog window, click first on button Default, next double click on Compiler Version and select 4.0, close all dialog windows with X and run a Build.

              I expect a working build.

              But if there is an error output because of cobol.exe is not found, the compiler configuration must be adapted as the line CPATH = $(HKEY_LOCAL_MACHINE\SOFTWARE$6432\Micro Focus\Visual Cobol\$(Compiler Version)\INSTALLDIR) is not working for your installation of Micro Focus Visual COBOL compiler version 4.0. Modify this line to CPATH = C:\Cobol32\ (backslash at end is important) and let me know that the query of the installation directory from Windows registry does not work for version 4.0.

              I used on my tests the file coboltest.cbl with following lines:

              Code: Select all

                    IDENTIFICATION DIVISION.
                     PROGRAM-ID. HELLOWRD.
              
                     PROCEDURE DIVISION.
                     DISPLAY "SIMPLE HELLO WORLD".
                     STOP RUN.
              
              The compilation with 32-bit and 64-bit cobol.exe worked with the attached compiler configuration in all four possible variations:
              1. *.obj file with no *.lst and *.grp file (default).
              2. *.obj file with *.lst and no *.grp file.
              3. *.obj file with no *.lst but with *.grp file.
              4. *.obj file with *.lst and with *.grp file.
              Linking with 32-bit and 64-bit cbllink.exe worked also taking into account on my incomplete installation that there are three linker errors because of missing symbols defined in cblrtsmi.lib not found in the *.lib which I copied from Visual Studio 2010. I suppose I would need the Windows libraries from Visual Studio 2019 for a successful linking with cblrtsmi.lib.
              MicroFocusCOBOLversion6.zip (1.88 KiB)   2
              Update compiler configuration for creating an application with Micro Focus Visual COBOL Compiler 6.0 (and hopefully also older versions).
              Best regards from an UC/UE/UES for Windows user from Austria

              16
              Basic UserBasic User
              16

                Dec 29, 2020#22

                Mofi

                I applaud your persistence 🙂.
                Then start UEStudio, open the Compiler Options dialog window, click first on button Default, next double click on Compiler Version and select 4.0, close all dialog windows with X and run a Build.
                I received these errors:

                --------------------Configuration: COBOLtest - Debug--------------------
                cobol.exe ..\COBOLtest.cbl,,nul,nul;
                'cobol.exe' is not recognized as an internal or external command,
                operable program or batch file.
                cbllink.exe -oCOBOLtest.exe COBOLtest.obj
                'cbllink.exe' is not recognized as an internal or external command,
                operable program or batch file.
                COBOLtest.exe - 0 error(s), 0 warning(s)

                So I changed CPATH to c:\cobol32\ and got:

                --------------------Configuration: COBOLtest - Debug--------------------
                cobol.exe ..\COBOLtest.cbl,,nul,nul;
                cbllink.exe -oCOBOLtest.exe COBOLtest.obj
                Micro Focus COBOL - CBLLINK utility
                Version 4.0.38 Copyright (C) 1993-1998 Micro Focus Ltd.
                Micro Focus COBOL - CBLNAMES utility
                Version 4.0.38 Copyright (C) 1993-1998 Micro Focus Ltd.
                ERROR: (1) Cannot open file :  COBOLtest.obj
                ERROR: (6) No public symbols found. No object file generated
                ERROR: (9) Program indicated failure
                COBOLtest.exe - 3 error(s), 0 warning(s)

                I checked the Registry for $(HKEY_LOCAL_MACHINE\SOFTWARE$6432\Micro Focus\Visual Cobol\$(Compiler Version)\INSTALLDIR). This key does not exist.

                There is $(HKEY_LOCAL_MACHINE\SOFTWARE\Micro Focus\Visual Cobol\6.0\COBOL\ under which there are 3 sub-keys: Config, Environment and Install. Environment has the various Environment Variables e.g. COBDIR, INCLUDE, LIB.

                6,688587
                Grand MasterGrand Master
                6,688587

                  Dec 29, 2020#23

                  The string $(HKEY_LOCAL_MACHINE\SOFTWARE$6432\Micro Focus\Visual Cobol\$(Compiler Version)\INSTALLDIR) is interpreted with 4.0 selected as Compiler Version as  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\Visual COBOL\4.0\INSTALLDIR. You can verify if this registry value exists under this registry key by running in a command prompt window.

                  Code: Select all

                  reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\Visual COBOL\4.0" /v INSTALLDIR
                  An error message indicates the registry value INSTALLDIR does not exist or the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\Visual COBOL\4.0 does not exist.

                  Please run in a command prompt window:

                  Code: Select all

                  reg export "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\Visual COBOL" "%UserProfile%\Desktop\MicroFocus4RegKey.txt"
                  That command exports the entire Micro Focus COBOL registry key into the text file MicroFocus4RegKey.txt created on your desktop. I would like this text file together with cobol.exe and  cbllink.exe compressed into a 7-Zip, RAR or ZIP file which is attached to your next post. Then I could look myself on how version 4.0 of Micro Focus Visual COBOL compiler differs from version 6.0 working fine with the compiler configuration created by me.

                  I attached a ZIP file containing the text file MicroFocus6RegKey.txt which is the export of the registry on my computer.
                  MicroFocus6RegKey.zip (1.81 KiB)   2
                  This ZIP file contains the Micro Focus COBOL 6 registry export.
                  Best regards from an UC/UE/UES for Windows user from Austria

                  16
                  Basic UserBasic User
                  16

                    Dec 29, 2020#24

                    Mofi

                    Error message:

                    C:\>reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Micro Focus\Visual COBOL\4.0" /v INSTALLDIR
                    ERROR: The system was unable to find the specified registry key or value.

                    C:\>

                    Desktop.rar attached.
                    Desktop.rar (25.32 KiB)   1

                    6,688587
                    Grand MasterGrand Master
                    6,688587

                      Dec 30, 2020#25

                      Thanks for the RAR archive file with the requested files. I see that you have installed Micro Focus Visual COBOL version 6.0, but you are not using that version for the current project, but 22 years old version 4.0. Well, I know now that Micro Focus COBOL 4.0 is so old (Windows 95/98) that it has most likely nothing stored in Windows registry and the online documentation for Micro Focus Visual COBOL version 6.0 is not helpful for creating a compiler configuration for Micro Focus COBOL version 4.0.38 created on 30th October 1998.

                      I suggest to use the following configuration for your project compiled and linked with this very old version of Micro Focus COBOL.

                      Code: Select all

                      # --- Micro Focus COBOL 4.0 Compiler configuration --
                      # --- general --------------------------------------
                      # $P  - project name with path
                      # $Pp - path to project directory
                      # $Pn - project name without path
                      # --- compile --------------------------------------
                      # $I  - input file name with path and extension
                      # $Ip - input file path
                      # $In - input file name
                      # $Ie - input file extension
                      # $O  - output file with path and extension
                      # $Op - output file path
                      # $On - output file name
                      # $Oe - output file extension
                      # $R  - release/debug setting for compiler
                      # --- build ----------------------------------------
                      # $T  - target file with path and extension
                      # $Tp - target file path
                      # $Tn - target file name
                      # $O  - output file with path and extension
                      # $Op - output file path
                      # $On - output file name
                      # $Oe - output file extension
                      # $R  - release/debug setting for linker
                      
                      [Settings]
                      Target =
                      Working Directory =.
                      Command Line Arguments =
                      
                      [SettingsInfo]
                      Target = Provides a space for you to specify an output file and location of the program that the linker creates.
                      Working Directory = Provides a space for you to specify the directory in which executing occurs. If you do not specify a directory, executing occurs in the directory where the executable is located.
                      Command Line Arguments = Provides a space for you to specify command-line arguments you want to pass to the program at startup.
                      
                      [SettingsReps]
                      
                      [Variables]
                      CPATH = C:\cobol32
                      
                      [Environment]
                      PATH = $(CPATH)\exedll;%PATH%
                      COBDIR = $(CPATH)\lbr;$(CPATH)\exedll
                      LIB = $(CPATH)\lib
                      
                      [General]
                      TargetExt = .exe
                      ReleaseOut = Release
                      DebugOut = Debug
                      UseFullPaths = 0
                      UseDosNames = 0
                      
                      [MakeCommands]
                      run = Execute Application
                      makef = Show Makefile
                      
                      [Execute Application]
                      Title = Execute $T
                      Cmd0 = $(Command Line Arguments)
                      Depends = $T
                      ShowWindow = 1
                      DisplayConsole = 1
                      
                      [Show Makefile]
                      Title=Show makefile
                      Cmd0=uestudio $(UESMAKEFILE)
                      ShowWindow=1
                      DisplayConsole=0
                      
                      [FileGroups]
                      FGO = .obj;
                      
                      [GroupFormats]
                      FGO = %s
                      
                      [Build]
                      Out = $T
                      Depends = $FGO
                      Cmd0 = cbllink.exe $FGO
                      
                      [.CBL]
                      Out = $In.obj
                      Cmd0 = cobol.exe $I;
                      
                      I have not tested this configuration as I am busy now with testing new features of UltraEdit 28.00 released next year. But I really hope this spartan compiler configuration works for your project. There are no compiler and linker options anymore as they are not really needed according to your batch files.

                      BTW: The last two sections can be also as follows if you want to use your working batch files with two small modifications inside them:

                      Code: Select all

                      [Build]
                      Out = $T
                      Depends = $FGO
                      Cmd0 = $Pplink.bat $FGO
                      
                      [.CBL]
                      Out = $In.obj
                      Cmd0 = $Ppcompile.bat $I
                      
                      In the batch file compile.bat in directory C:\workarea\cobol32\coboltest must be replaced coboltest.cbl by %1; to reference the file to compile passed from UEStudio to the batch file as first argument. The semicolon is necessary to avoid prompting for the other option by cobol.exe. %1 is ..\COBOLtest.cbl for your project.

                      In the batch file link.bat in directory C:\workarea\cobol32\coboltest must be replaced coboltest.obj by %* to reference all object files to link together passed from UEStudio to the batch file with one or more arguments depending on how much *.cbl files are added to the project. %* is just COBOLtest.obj for your project.

                      The compiler configuration written by me for compilation of one or more COBOL source code files to an application with Micro Focus Visual COBOL version 6.0 are quite good and I will send them to IDM support after fine tuning, some more tests and creating additionally a configuration also for creating a dynamic library. I am just wondering myself why you do not use version 6.0 on having this newer version also installed. But that is not really important for me. You have most likely a good reason for using version 4.0.
                      Best regards from an UC/UE/UES for Windows user from Austria

                      16
                      Basic UserBasic User
                      16

                        Dec 30, 2020#26

                        Mofi

                        Thanks for your help. There are very specific reasons why I use this COBOL compiler, one of which is the fact that the program editor for MF 4.0 is not very good, hence my wish to use a modern editor.

                        Good luck with your MF 6.0 configuration and best wishes with UltraEdit 28.

                        Read more posts (-4 remaining)