Maybe you can use Python or another language for the web parts, and then call the cobol programs from Python or whichever language you choose. Would not recommed doing web programming in cobol. I have been playing around with combining Golang and Cobol which i think works really great. Golang is a great language for web developing. One example of passing data between Go and Cobol. https://github.com/swichblade/Go-golang-calls-COBOL-program
Thanks for your replies. WIll look into Allura when i got time. I uploaded a demo with the complete code here : https://github.com/swichblade/Sync-Cobol-group-item-with-Golang-struct I also added a quick demo where the content of a json file is inserted in a cobol data area.
Been playing around with Go alittle bit, and right now im working on a program that will sync a Cobol group item to a Go struct and vice versa. Seems to work really well. For example Cobol group item: 01 TESTJSON. 03 PERSON occurs 3 times. 05 NAME PIC X(100). 05 AGE PIC 9(3). 05 BIRTH PIC X(20). 05 LUCKY-NUMBERS PIC 9(4) OCCURS 5 TIMES. becomes type TestJson struct { Name string `json:"name"` Age int `json:"age"` Birth string `json:"birth"` Lucky_numbers []int `json:"lucky_numbers"` } This Cobol...
Uploaded a demo on github where i show how different data types can be passed between a main cobol progam and a go function. https://github.com/swichblade/Call-Go-function-from-Cobol
Awsome thanks alot guys. Tried the export COB_PRE_LOAD = functions and it worked. hello.cob ~~~ IDENTIFICATION DIVISION. PROGRAM-ID. hello. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS_KEY PIC X(20). 01 WS_VALUE USAGE BINARY-SHORT SIGNED. PROCEDURE DIVISION. initialize WS_KEY. string "gri" delimited by size, low-value delimited by size into WS_KEY CALL "MapExample" USING BY reference WS_KEY RETURNING WS_VALUE. DISPLAY WS_VALUE. STOP RUN. ~~~
Awsome thanks alot guys. Tried the export COB_PRE_LOAD = functions and it worked.
Thanks for the answer. Although i dont think the func main {} method is included in the functions.so. I tried call the functions.so from python, and it worked great, test.py from ctypes import * libc = CDLL("functions.so") print libc.MapExample("gri") In terminal: export LD_LIBRARY_PATH=. python test.py
Thanks for the answer. Although i dont think the main method is included in the functions.so. I tried call the functions.so from python, and it worked great, test.py from ctypes import * libc = CDLL("functions.so") print libc.MapExample("gri") In terminal: export LD_LIBRARY_PATH=. python test.py