• Cann OpenCobol handle Databases by default?

    From F. W.@2:250/1 to All on Thursday, November 09, 2023 12:47:39
    Can I work with an old DBF-File with OpenCobol by default? Or do I have
    to use Embedded SQL? Or a library?

    Thanx

    FW

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From Vincent Coen@2:250/1 to F. W. on Thursday, November 09, 2023 18:43:29
    Hello F!

    Thursday November 09 2023 12:47, F. W. wrote to All:

    Can I work with an old DBF-File with OpenCobol by default? Or do I
    have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C? libriaries to
    handle it by calling such from within Cobol. Sorry your msg does not show exactly what DBF system you are referring to.


    Vincent


    SEEN-BY: 25/0 21 250/0 1 2 4 5 6 8 13 14 15 263/0 362/6 371/52 467/4 712/1321
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@2:250/1 to All on Thursday, November 09, 2023 18:50:01
    On 11/9/2023 1:43 PM, Vincent Coen wrote:
    Thursday November 09 2023 12:47, F. W. wrote to All:
    > Can I work with an old DBF-File with OpenCobol by default? Or do I
    > have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C? libriaries to handle it by calling such from within Cobol. Sorry your msg does not show exactly what DBF system you are referring to.

    Often DBF-file means dBase III/IV/V database.

    Arne



    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From bill@2:250/1 to All on Friday, November 10, 2023 02:01:44
    On 11/9/2023 1:50 PM, Arne Vajhøj wrote:
    On 11/9/2023 1:43 PM, Vincent Coen wrote:
    Thursday November 09 2023 12:47, F. W. wrote to All:
      > Can I work with an old DBF-File with OpenCobol by default? Or do I
      > have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C? libriaries to
    handle it by calling such from within Cobol. Sorry your msg does not show
    exactly what DBF system you are referring to.

    Often DBF-file means dBase III/IV/V database.


    dBase, FoxBASE, FoxPro and a few others.
    Format is well documented so writing something in COBOL to
    futz with a dbf file is definitely doable. But I would have
    to ask why? There appear to be utilities on the web to convert
    dbf to other more modern formats.

    I play with CP/M and TRS-80's all the time and even I haven't
    run dBase in so long I can't even remember the last time.

    bill



    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From Vincent Coen@2:250/1 to Arne Vajhøj on Friday, November 10, 2023 14:52:51
    Hello Arne!

    Thursday November 09 2023 18:50, Arne Vajhøj wrote to All:

    As Bill has stated you will have to run the DB through a utility to convert
    it to a current DB or even a ISAM file before using Cobol to read it.
    If needed it can be converted to a sequential file instead of a ISAM one as
    it will be simpler to process subject to the type of data stored (i.e.,
    binary fields but would be OK for sequential but NOT Line Sequential).



    On 11/9/2023 1:43 PM, Vincent Coen wrote:
    Thursday November 09 2023 12:47, F. W. wrote to All:
    > Can I work with an old DBF-File with OpenCobol by default? Or do
    I
    > have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C?
    libriaries to handle it by calling such from within Cobol. Sorry
    your msg does not show exactly what DBF system you are referring to.

    Often DBF-file means dBase III/IV/V database.

    Arne





    Vincent


    SEEN-BY: 25/0 21 250/0 1 2 4 5 6 8 13 14 15 263/0 362/6 371/52 467/4 712/1321
  • From F. W.@2:250/1 to All on Monday, November 13, 2023 11:15:45
    Am 09.11.2023 um 19:43 schrieb Vincent Coen:

    Can I work with an old DBF-File with OpenCobol by default? Or do I
    have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C? libriaries
    to handle it by calling such from within Cobol. Sorry your msg does
    not show exactly what DBF system you are referring to.

    Thank you for answering.

    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    In C, Pascal etc. I have to install a database library or so. Can COBOL
    handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.

    FW

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From Vincent Coen@2:250/1 to F. W. on Monday, November 13, 2023 16:28:11
    Hello F!

    Monday November 13 2023 11:15, F. W. wrote to All:

    Am 09.11.2023 um 19:43 schrieb Vincent Coen:

    Can I work with an old DBF-File with OpenCobol by default? Or do I
    have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C?
    libriaries to handle it by calling such from within Cobol. Sorry
    your msg does not show exactly what DBF system you are referring to.

    Thank you for answering.

    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    In C, Pascal etc. I have to install a database library or so. Can
    COBOL handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.
    FW

    When you build the Cobol compiler on your system regardless of O/S it
    normally installs one of the various libraries and you can have the choice
    of Berkeley (BDB), VBISAM, DISAM or others if you need them.

    The one's normally used are BDB or VBISAM - They are not auto installed
    unless you use one of Andrews builds from his website and he has one of
    each for each archive.

    See the document DEPENDENCIES and README for more information as well as
    any docs supplied by Andrew. As far as I remember Andrew supplies all that
    is need per GnuCOBOL archive.

    GnuCOBOL is the name of the compiler that was renamed from OpenCobol some
    10 years ago since it joined the GNU family of software tools.

    These ISAM tools do NOT use a database per say, at least they are not SQL
    types for those you do need another library such as Mysql, Postgres etc -
    there are many others but regardless you must install the related library
    for it as well as the development library for the same one.

    I use Mysql and the JC Precompiler (written in Cobol) or dbpre (written in
    C). Again there are many others including for ODBC.

    Just read the supplied documentation and in addition you will need to also download and read / print out the GnuCOBOL Programmers Guide, Programmers Reference (current the same as the Guide), Quick Reference and may be the Sample Programs and these you can get by going to :

    https://gnucobol.sourceforge.io/guides.html

    Scrolling down and select the version you want, i.e., A4 or USA letter
    formats. These have minor updates during the a year so you might want to
    get the latest every 3 - 6 months or so. There is no auto update service
    for them as it is not available from the Sourceforge website.

    As I am currently updating these as required, which can be at any point in
    time subject to programmers telling me of updates, mistakes etc and
    The latest manuals are always available at :

    http://www.applewood.linkpc.net/files/GnuCobol/

    Then folder Cobol-Guides

    Note the names are of the form gnucobxx-yy.pdf
    Where xx = pg (programmers guide), pr = programmers reference, qr = quck reference and sp = sample programs
    Where yy = a4 (A4 format) and letter (US Letter format).

    I must get around to linking these to their formal names.

    For the manuals, go to Cobol-Guides as noted above

    For my Cobol tools go to Cobol-Tools
    For my Applications go to Cobol-Applications and go to :

    http://www.applewood.linkpc.net/files/

    and select from :
    CobXRef-latest
    MySQL-Pre-Compilers
    acas - for a Accounting system written in Cobol
    and for the ACAS nightly builds go to :

    http://www.applewood.linkpc.net/files/acas/nightlybuilds/

    Note the OE system is still under test and some development - it is not
    ready for usage other than for testing.

    A version will be linked up into ACAS but at the moment it is a stand alone application while being worked on.

    By all mean have a good look around the different areas as they do get
    updated from time to time.


    Vincent


    SEEN-BY: 25/0 21 250/0 1 2 4 5 6 8 13 14 15 263/0 362/6 371/52 467/4 712/1321
  • From bill@2:250/1 to All on Monday, November 13, 2023 13:49:04
    On 11/13/2023 6:15 AM, F. W. wrote:
    Am 09.11.2023 um 19:43 schrieb Vincent Coen:

    Can I work with an old DBF-File with OpenCobol by default? Or do I
    have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C? libriaries
    to handle it by calling such from within Cobol. Sorry your msg does
    not show exactly what DBF system you are referring to.

    Thank you for answering.

    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    In C, Pascal etc. I have to install a database library or so. Can COBOL handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.


    If you choose the option to do ISAM GnuCOBOL includes BDB when it
    builds. But, to the best of my knowledge, ISAM files are not portable
    between different COBOL compilers.

    bill



    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@2:250/1 to All on Monday, November 13, 2023 14:49:18
    On 11/10/2023 9:52 AM, Vincent Coen wrote:
    Thursday November 09 2023 18:50, Arne Vajhøj wrote to All:
    > On 11/9/2023 1:43 PM, Vincent Coen wrote:
    >> Thursday November 09 2023 12:47, F. W. wrote to All:
    >> > Can I work with an old DBF-File with OpenCobol by default? Or do I
    >> > have to use Embedded SQL? Or a library?
    >>
    >> You can use GnuCobol BUT, you will need to also use the C?
    >> libriaries to handle it by calling such from within Cobol. Sorry
    >> your msg does not show exactly what DBF system you are referring to.

    > Often DBF-file means dBase III/IV/V database.

    As Bill has stated you will have to run the DB through a utility to convert it to a current DB or even a ISAM file before using Cobol to read it.
    If needed it can be converted to a sequential file instead of a ISAM one as it will be simpler to process subject to the type of data stored (i.e., binary fields but would be OK for sequential but NOT Line Sequential).

    There could exist a Cobol library to read DBF files directly
    from Cobol.

    But a utility to convert the DBF file to something more
    modern is probably the way to go.

    You can either find a complete utility or write something
    custom using a library.

    If you go custom then Python may be a good choice.

    Maybe:
    https://pypi.org/project/dbfread/

    Arne


    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From F. W.@2:250/1 to All on Monday, November 13, 2023 14:51:51
    Am 13.11.2023 um 14:49 schrieb bill:
    On 11/13/2023 6:15 AM, F. W. wrote:
    Am 09.11.2023 um 19:43 schrieb Vincent Coen:

    Can I work with an old DBF-File with OpenCobol by default? Or do I
    have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C? libriaries
    to handle it by calling such from within Cobol. Sorry your msg does
    not show exactly what DBF system you are referring to.

    Thank you for answering.

    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    In C, Pascal etc. I have to install a database library or so. Can COBOL
    handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.


    If you choose the option to do ISAM GnuCOBOL includes BDB when it
    builds.  But, to the best of my knowledge, ISAM files are not portable between different COBOL compilers.

    bill



    Thank you. I think this is here not necessary.

    What about SCREEN SECTION? This can not be used for GUIs?

    FW


    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@2:250/1 to All on Monday, November 13, 2023 14:57:33
    On 11/9/2023 9:01 PM, bill wrote:
    On 11/9/2023 1:50 PM, Arne Vajhøj wrote:
    On 11/9/2023 1:43 PM, Vincent Coen wrote:
    Sorry your msg does not show
    exactly what DBF system you are referring to.

    Often DBF-file means dBase III/IV/V database.

    dBase, FoxBASE, FoxPro and a few others.
    Format is well documented so writing something in COBOL to
    futz with a dbf file is definitely doable.  But I would have
    to ask why?  There appear to be utilities on the web to convert
    dbf to other more modern formats.

    I play with CP/M and TRS-80's all the time and even I haven't
    run dBase in so long I can't even remember the last time.

    DBF was a relative common format up to the late 90's.

    And recent Windows versions (checked on 10) still ship with
    ODBC driver for DBF files. Note though that ODBC to a non-SQL
    database comes with its own challenges.

    Arne



    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@2:250/1 to All on Monday, November 13, 2023 15:03:55
    On 11/13/2023 6:15 AM, F. W. wrote:
    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    In C, Pascal etc. I have to install a database library or so. Can COBOL handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.

    I believe it was added to the Cobol standard many years
    ago - like Cobol-74 or Cobol-85 (before my time).

    Arne



    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@2:250/1 to All on Monday, November 13, 2023 15:08:35
    On 11/13/2023 8:49 AM, bill wrote:
    On 11/13/2023 6:15 AM, F. W. wrote:
    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    In C, Pascal etc. I have to install a database library or so. Can COBOL
    handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.

    If you choose the option to do ISAM GnuCOBOL includes BDB when it
    builds.

    You can get GnuCOBOL with BDB for ISAM support or with VBISAM for
    ISAM support or without ISAM support.

    BDB is supposedly the best. But for license reasons people
    may consider VBISAM.

    But, to the best of my knowledge, ISAM files are not portable
    between different COBOL compilers.

    They are not.

    But usually the on disk formats are accessible via explicit
    library calls. That means that it is possible to write
    a C program that reads files in one format and write files
    in another format. Or wrap such C code in some Java/Python/whatever
    code.

    Arne



    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From bill@2:250/1 to All on Monday, November 13, 2023 15:31:26
    On 11/13/2023 9:51 AM, F. W. wrote:
    Am 13.11.2023 um 14:49 schrieb bill:
    On 11/13/2023 6:15 AM, F. W. wrote:
    Am 09.11.2023 um 19:43 schrieb Vincent Coen:

    Can I work with an old DBF-File with OpenCobol by default? Or do I
    have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C? libriaries
    to handle it by calling such from within Cobol. Sorry your msg does
    not show exactly what DBF system you are referring to.

    Thank you for answering.

    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    In C, Pascal etc. I have to install a database library or so. Can COBOL
    handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.


    If you choose the option to do ISAM GnuCOBOL includes BDB when it
    builds.  But, to the best of my knowledge, ISAM files are not portable
    between different COBOL compilers.

    bill



    Thank you. I think this is here not necessary.

    What about SCREEN SECTION? This can not be used for GUIs?


    GUIs? No real graphics in COBOL. But terminal screens. Of course we
    did that long before the SCREEN SECTION was introduced. I haven't used
    any of them yet but I think there are a couple different GUI libraries available for GnuCOBOL>

    bill



    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1@fidonet)
  • From Vincent Coen@2:250/1 to F. W. on Monday, November 13, 2023 20:15:04
    Hello F!

    Monday November 13 2023 14:51, F. W. wrote to All:

    Am 13.11.2023 um 14:49 schrieb bill:
    On 11/13/2023 6:15 AM, F. W. wrote:
    Am 09.11.2023 um 19:43 schrieb Vincent Coen:

    Can I work with an old DBF-File with OpenCobol by default? Or do
    I have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C?
    libriaries to handle it by calling such from within Cobol. Sorry
    your msg does not show exactly what DBF system you are referring
    to.

    Thank you for answering.

    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per
    Default?

    In C, Pascal etc. I have to install a database library or so. Can
    COBOL handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.


    If you choose the option to do ISAM GnuCOBOL includes BDB when it
    builds.  But, to the best of my knowledge, ISAM files are not
    portable between different COBOL compilers.

    bill



    Thank you. I think this is here not necessary.

    What about SCREEN SECTION? This can not be used for GUIs?

    Screen section will only do BLOCKED.
    That means very basic stuff, take a look in the contribs section at the gnucobol site and download it.
    Then look at tools/TUI-TOOLS for a good set of example programs.

    For real gui again look the gnucobol site for FAQs and there is various suggestions for using 3rd party tools and languages that Cobol can call but
    be warned there will be a learning curve to use any of them.

    The FAQs have some examples for there products that you can try out.

    The only other option is to use the web facilities to hook into using as a frontend a web browser but again it will take some learning.

    Good luck :)


    Vincent


    SEEN-BY: 25/0 21 250/0 1 2 4 5 6 8 13 14 15 263/0 362/6 371/52 467/4 712/1321
  • From docdwarf@panix.com@2:250/1 to All on Monday, November 13, 2023 19:03:17
    In article <uit0h2$1erva$4@solani.org>, F. W. <me@home.invalid> wrote:

    [snip]

    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    If it cannot then it is not a full implementation of the Standard.

    DD

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Public Access Networks Corp. (2:250/1@fidonet)
  • From docdwarf@panix.com@2:250/1 to All on Monday, November 13, 2023 19:14:22
    In article <krenqgFisnuU2@mid.individual.net>,
    bill <bill.gunshannon@gmail.com> wrote:
    On 11/13/2023 6:15 AM, F. W. wrote:
    Am 09.11.2023 um 19:43 schrieb Vincent Coen:

    Can I work with an old DBF-File with OpenCobol by default? Or do I
    have to use Embedded SQL? Or a library?

    You can use GnuCobol BUT, you will need to also use the C? libriaries
    to handle it by calling such from within Cobol. Sorry your msg does
    not show exactly what DBF system you are referring to.

    Thank you for answering.

    I asked myself, if I have a "normed" COBOL-Compiler here (COBOL 85
    etc.), can this Compiler in all cases handle ISAM-Files per Default?

    In C, Pascal etc. I have to install a database library or so. Can COBOL
    handle that by default simply by installing the compiler?

    As far as I can recognize: yes, it can.


    If you choose the option to do ISAM GnuCOBOL includes BDB when it
    builds. But, to the best of my knowledge, ISAM files are not portable >between different COBOL compilers.

    It was just a few years ago - '85, maybe '87 - that I had a gig where the client was looking to replace DATABUS with an early version of Microfocus COBOL on a Novel network of IBM PC ATs.

    There was the DATABUS camp and the COBOL camp and the business-users camp
    and none of the campers were happy, everyone argued and pointed fingers. Everyone was wearing neckties, starched shirts and well-polished shoes.

    Since I was the New Guy I did what the New Guy always does, I wrote a
    utility to convert a file from the old system to the new system by reading
    it one character at a time and when it reached X0D0A WRITE an OUTREC and
    start all over again. Folks mocked it as a 'dog', pointed and laughed and then asked 'just for curiousity's sake' if I could give them a listing.

    Soon enough Corner Cubicle Guy declared 'his' utility (an obvious
    plagiarism) was a site standard and me, I found another place to work.

    DD

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Public Access Networks Corp. (2:250/1@fidonet)
  • From docdwarf@panix.com@2:250/1 to All on Monday, November 13, 2023 19:15:40
    In article <uitd67$1f5jp$5@solani.org>, F. W. <me@home.invalid> wrote:
    Am 13.11.2023 um 14:49 schrieb bill:

    [snip]

    If you choose the option to do ISAM GnuCOBOL includes BDB when it
    builds.?? But, to the best of my knowledge, ISAM files are not portable
    between different COBOL compilers.

    Thank you. I think this is here not necessary.

    What about SCREEN SECTION? This can not be used for GUIs?

    Only in the way that ASCII graphics are graphics.

    DD

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Public Access Networks Corp. (2:250/1@fidonet)
  • From docdwarf@panix.com@2:250/1 to All on Tuesday, November 14, 2023 01:44:25
    In article <1699906504@f1.n250.z2.fidonet.ftn>,
    Vincent Coen <VBCoen@gmail.com> wrote:
    Hello F!

    Monday November 13 2023 14:51, F. W. wrote to All:

    [snip]

    What about SCREEN SECTION? This can not be used for GUIs?

    [snip]

    For real gui again look the gnucobol site for FAQs and there is various >suggestions for using 3rd party tools and languages that Cobol can call but >be warned there will be a learning curve to use any of them.

    '(A) learning curve', Mr Coen? I'd say that most folks posting and
    reading here have a bit of time and patience... but what do I know?

    (... and now I hear a voice from long ago, bellowing at a newly-shorn
    recruit 'You think you know more'n me, AIR-man? I've forgotten more than you'll ever learn... BACK straight, SHOULders square, HEEL beat, HARCH!')

    DD

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: Public Access Networks Corp. (2:250/1@fidonet)