Board: [DoveNet] Programming Subject: Cobol/gnucobol From: Dumas Walker Date: Tue Jun 24, 2025 10:02 @VIA: CAPCITY2 > DW> Once upon a time, I considered writing a program to do something like tha > DW> with my model railroad equipment. I eventually figured out that keeping i > DW> all in spreadsheets with gnumeric was sufficient enough. ;) > Well, tobe honest, part of the plan was to make a comparison like > "the cobol/mainframe way" and "the unix way", i.e. using standard shell > tools to manipulate CSV. I found out sc-im as a terminal based spreadsheet. Fun fact... on the mainframe, I had to writeseveral cobol programs to manipulate CSV files. We'd get data from sources that either used Excel spreadsheets or that were onPC systems that could only create CSV files. I would upload them and then run the cobol program to parse them into fixed-lengthdata files to be processed against our data. I got pretty good with STRING and UNSTRING. ;) > Ages ago, in 1999, my mentor invented the noSQL term (you can search him on > wikipedia). I am curious so I will have to see if I can find that. > It was based on shell only, using sed awk and other standard > tools. I wrote an extended article about it on Linux Journal. Although > Ican't recall much, I have a grasp on how powerful shell could be. Shell can do a lot, but being able to code your own solutionwhen you can't get the desired results from shell is a big, big plus! > Plus, I recently joined the FreeBSD bandwagon. I trulyadmire how some > FreeBSD have mastery on shell. If you look at the CBSD management tool > source code, feels like reading C++ instead of shell. Kudos to them. I have tried BSD out a couple of times, usually just to test/play with on a second-hand machine, but have always stuck with linux. I would say that, too me, it seemed too similar in some ways to motivate me to change. > I know, a csv/ods/xls can be as powerful today, aka "the poor man's > database", but it was an excuse to learn COBOL. Yeah, if you want to learn to program, or want to be creative, then using spreadsheets isn't going to scratch that itch. ;) I heard an old COBOL programmer say once that, if you can learn COBOL you can learn anything. Despite what "they've" been saying for years,you can still find a demand for that skill in banking and government shops, especially. > Also, I am a model railway lover, although I lack the space and time > so I just had a few models of the (real) trains I used to play with > when I was a kid. My father used to work for the local railway company, > so I was not an estranger to it. Over the years, I didn't have the space to do what I wanted, and then not the time. I feel like I have enough of both now to get back into working on it. Right now, I amworking on a coal mine scene. > DW> One thing that some people have difficulty with when going from > DW> another language to COBOL is that, although the code reads like English, > DW> they are not used to needing to define all of their variables in working > DW> storage. For some reason, that just seemed logical to me. > I don't feel that as a huge issue for me. Many languages need to define > the variables at the beginning. It's just in a separate section. I remember that from Pascal. You did have to define things but, yes, there was no separate section. I think I prefer the separate section approach. > I'm much more dealing now with the limits of the programming language, > as many things aren't built-in. Ex. generating a random string is not >as straightforward as I'm used to. But I get it, it was a language > that was born in the 60s, a lot of stuff just wasn't there. That, and it was meant for business computation and data manipulation. A business or government entity probably didn't have as much of a need for random data back then so there was no reason to program for it. For other applications, like trying to write a simple game, generate a password, etc., having the ability to generate random data is much more important than it would have been then. * SLMR 2.1a * I'm easy to please ... as long as I get my way --- ■ Synchronet ■ CAPCITY2 * capcity2.synchro.net * Telnet/SSH:2022/Rlogin/HTTP .