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!
== Simple Workflow script == The python script [[gixc.py]] implements the GixSQL Cobol compilation workflow. It is invoked with a single parameter, being the program_name suffixed by either 'cbl or 'cob'. People that like to get their hands dirty follow the two steps below. === gixsql precompilation === The command invoking the precompile process is as follows:<br/> <pre> /usr/bin/gixsql pgcobol.cbl pgcobol.cbsql -S -I . -e ".,*.cpy,*.CPY" </pre> The input file is pgcobol.cbl, the preprocessing output file is [[pgcobol.cbsql]]. It is very important to leave the cbsql file as is, because meddling with the file easily leads to errors in the next step of the workflow.<br /><br /> The result of the precompile step of the SQL stement above looks like this: <pre> GIXSQL* EXEC SQL GIXSQL* CONNECT TO :DATASRC AS cobol_sql USER :DBUSR USING :DBPWD GIXSQL* END-EXEC. GIXSQL CALL STATIC "GIXSQLConnect" USING GIXSQL BY REFERENCE SQLCA GIXSQL BY REFERENCE DATASRC GIXSQL BY VALUE 64 GIXSQL BY REFERENCE "cobol_sql" & x"00" GIXSQL BY VALUE 0 GIXSQL BY REFERENCE x"00" GIXSQL BY VALUE 0 GIXSQL BY REFERENCE DBUSR GIXSQL BY VALUE 64 GIXSQL BY REFERENCE DBPWD GIXSQL BY VALUE 64 GIXSQL END-CALL. </pre> The precompile program translated the SQL statement in to a standardised Cobol call. === The cobc GNUCobol compilation === The command invoking the precompile process is as follows: <pre> /usr/bin/cobc -x pgcobol.cbsql -l:libgixsql.so -T pgcobol.out </pre> This results in the executable program file '''pgcobol''' and the compilation listing [[pgcobol.out]].
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