Editing
Cobol and PostgreSQL
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Employee program = The setup of the lab environment, source code and a simple compilation workflow are below. * Program name: pgcobol * Source code: pgcobol.cbl * Intermediate preprocessed source code file: pgcobol.cbsql * Cobol compiler output: pgcobol.out * Database: Employee, with table emptable * pgcobol print output file: pgcobol.prt == Cobol == Cobol has been around for more than 60 years and will stay around for the foreseeable future, estimates are that there are about 800 billion lines of Business Cobol code around. The programs are heavily used, servicing about 80% of all financial and business transactions world wide.<br /><br /> The reason behind this endurance lies in the fact that Cobol is a standardised language, a program written in 1974 can be compiled today with a modern compiler. The resulting executable program still runs today, without the need of adaptation. This very fact is of high value to enterprises, their investments are safe and well protected on the long term.<br /><br /> Traditionally Cobol programs have their application in big business mainframe environments. These large enterprises, however, are shifting more and more of their applications to the Linux platform. The broad adoption of Linux in the enterprise environment started around 2010. So, it is no wonder that Cobol gradually is being made available for the Linux platform, enter [https://gnucobol.sourceforge.io/ GNUCobol]. === GNUCobol === Is an Open Source Cobol compiler, the project originally started in 2002 [https://en.wikipedia.org/wiki/GnuCOBOL GNUCobol] as OpenCobol. GNUCobol now is a full blown Cobol compiler. == GixSQL links PostgreSQL and Cobol == PostgreSQL is getting more and more traction around the world, also in the big enterprises. Big enterprises have ample reason to stick to their Cobol program stack, in which they invested huge amounts of money. So if PostgreSQL is to make it to the business applications of the big enterprises, it has to find a way to interact in a reliable manner with Cobol. Enter the [https://github.com/mridoni/gixsql GixSQL] SQL preprocessor for Cobol. === An SQL statement in Cobol === This is the way the SQL code is embedded in the Cobol program: <pre> EXEC SQL CONNECT TO :DATASRC AS cobol_sql USER :DBUSR USING :DBPWD END-EXEC. </pre> The example shows the program making a connection to the database with the variables DATASRC, DBUSR and DBPWD.
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information