• Prime Mover (unregistered)

    I was once told to implement some functionality in Java, in which I had just taken a course. So I quickly knocked together a Fortran-to-Java code converter, and wrote the code in Fortran.

    What?

  • LCrawford (unregistered)

    Fast forward to 2021 where Howie went to work for Dawie and was tasked to find out why reports ran so slow. Customer queries ran fast but any type of report was slow. To his horror Howie's SELECT * revealed 73 rows of 5 columns: Auto number ID, Customer ID, First name, Last Name, CustomerRecord. Queries had proper columns to work with but reports still had to unpack the customer record and crunch it to find results.

    The second WTF was using C++ to orchestrate the fiasco.

  • Moogle (unregistered)

    Real WTF: not actually telling Dawie what's going on. That's one of the reasons why they bring in INDEPENDENT consultants. If George didn't have the tits to give them the truth (bitter pill though it might be), then I hope that he at least didn't charge them for wasting of their time.

    It's people like George that give a bad name to independent consultants.

  • Mick Moignard (unregistered)

    I agree with Moogie. Telling customers bad news , like this one, is exactly what HPCs are for.

  • my name is missing (unregistered)

    At my last place of employment early on the customer database was exactly this, each customer record was an XML document storied in a column in Oracle. Each read required unpacking the (large) XML into Java class instances before data could be extracted and returned, each write required that plus changing the XML and resaving it to the database. With millions of customers and an active business, performance was abysmal. Thankfully it was rewritten into a real database design.

  • The Dave G (unregistered) in reply to Mick Moignard

    Agreed. And then as an HPC, when the customer asks how (and how much) to fix it, smile, and ... profit.

  • Matthew (unregistered)

    I’ve seen a similar database structure implemented in Foxpro. The CTO was not happy when I showed off SQL’s full-text indexing capabilities, especially when it rebuilt an index in five minutes that his system needed three days to rebuild.

  • (nodebb)

    The modern equivalent of this is putting JSON in SQL columns, although at least those are stored in ways that allow some optimized searching.

  • (nodebb)

    Pretty sure Dawie is not "guru" material. Sure, it's well-known that COBOL is record driven, but the 100,000 lines of WORKING-STORAGE SECTION that splits every record in every file into every field with every possible pretty-format in a nice hierarchical structure should give someone a clue as to how databases work.

    COBOL has some very nice features to make using RDBMS as nice (nicer, actually) than sequential ISAM files, and anyone who uses it regularly in the last 20 years knows it even supports Java applets. ANY book or document on SQL-structured databases discusses the idea of table and columns, so even "skimming through" one would understand this.

    TRWTF is believing Dawie is a "guru".

  • (nodebb) in reply to Barry Margolin 0

    The modern equivalent of this is putting JSON in SQL columns, although at least those are stored in ways that allow some optimized searching.

    You mean like Microsoft did twenty years ago in SQL Server for XML? See: https://docs.microsoft.com/en-us/sql/relational-databases/xml/xml-indexes-sql-server?view=sql-server-ver15

  • Randal L. Schwartz (google)

    I once rescued a body shop who had put a consultant in on a project who was completely underqualified. TL;DR: he wasted 9 months of client's money, I finished the project starting with "mv his_stuff OLD_his_stuff" in 3 weeks total counting learning the particulars of this SQL database (Unify on Xenix). Amongst many failures, the data hadn't been normalized... each record was numbers of four items coming from up to four places, then being distributed to up to four places with differing amounts (matrix blend). So each record had a lot of "Product1Pickup1", "Product2Pickup1"... up to "Product4Pickup4", then repeat for Delivery1 to 4. And he was having problems making reports which had to coalesce the 16 columns in both directions by product and pickup, and somehow balance that with product by delivery in both directions. My solution: about 3 levels of many-to-1 going in, and 3 levels of 1-to-many coming out. Had it all done in a week, basically.

    This confirms the old useful adage that any time you see a column or variable ending with a number you're very likely in for a world of painful rewrite of the code generated with someone who should never have designed it.

  • Jay (unregistered)

    Database developer and COBOL developer are 2 different skill sets. That's the take-away from this story. Dawie did not understand how SQL server (or any modern SQL database) worked. He just viewed it as an alternative to using a file system to store his data files and he was still using an external parser.

    I wouldn't be surprised if he was playing dumb to secure his job and avoid learning new technology

  • Yikes (unregistered)

    This one actually gave me the chills. What are the pitfalls of coming to the rescue on this one that I'm not seeing? Why would the customer be upset for having gone out on his own without formal training, making a mess, and then getting notes on how to clean it up the right way once things go south? Is the goal to keep the COBOL guy employed or is it to avoid the company's pointing the finger publicly at them for... a private matter that makes them look bad??

  • Wayne (unregistered)

    Been there, done that.

    I worked for a city gov't as a SQL Server DBA/developer. Got ahold of their water pipes maintenance system. Single COBOL file/record literally about a thousand columns wide. I have a background in COBOL, which helped. Basically each screen of their app populated one set of columns, so the first chunk of columns was always populated, then lots of blank field and somewhere a whole bunch of other stuff populated, then everything else empty.

    Really easy to normalize, I think I broke it into six tables? Something like that.

    I started teaching their mainframe people relational database theory/SQL Server, and man, did their eyes light up! They were absolutely loving it! They could see the efficiencies of parent/child relationships. I was just getting in to T-SQL and the director said "No more training, they've learned enough to be productive."

    He was an idiot.

  • Sigako (unregistered) in reply to Prime Mover

    Once I had to write a code in Matlab that would generate a code in SPSS script language, because my employer requested the source code for their relatively simple calculations and thought "Matlab scary". When they saw the length of said SPSS code, they quietly picked up a dropped jaw and decided to never speak of it again (and just requested I make more comments in matlab version of said calculations).

  • (nodebb) in reply to Yikes

    Why would the customer be upset for having gone out on his own without formal training, making a mess, and then getting notes on how to clean it up the right way once things go south?

    I assume you want a different answer to, the "guru" has built enough walls around the implementation to retain his "irreplacable" crown & would resist any attempt to take them down.

    Unless you wrestled the code from him and did all the work yourself then he would likely claim to his boss that you don't know what you're doing and if you did do that then I'm not sure they'd thank you.

    The company is a train wreck and if you specialty is consulting on sql performance then I can see why they would steer clear (the idea would be to charge a whole load of money for parachuting in and pointing out which indexes to add or queries to turn into stored procedures etc, not to oversea rewriting their entire app).

  • Mike (unregistered) in reply to Yikes

    He did tell his client (Microsoft) the news. The one who has to tell the client's client is Lucinda. That conversation will go like:

    'We can't fix this without a total rewrite (estimate attached), you've wasted a whole year of your time and money, and the only guy who deeply understands your business (their words) is not competent to implement or maintain a SQL Server solution without more training (estimate attached) or help from us (estimate attached)'.

    'You are right, this was a terrible idea from the start. Thank you, we no longer need your services.'

  • Jaloopa (partially registered) (unregistered) in reply to Randal L. Schwartz

    This confirms the old useful adage that any time you see a column or variable ending with a number you're very likely in for a world of painful rewrite of the code generated with someone who should never have designed it.

    Having previously worked at a place that considered it good practice to add 3 each of spareInt, spareString etc. columns to each table, I can confirm this

  • made up name (unregistered)

    made up story!!!!!!! thats fiction!!!!!! whya m i reading this?Β¬!??!?

  • (nodebb)

    Wimps..... I have never had trouble telling a client what was wrong (running a consulting firm since 1984)

  • Rob (unregistered)

    The missing data in this story... There was no database. DB2 relational and sql. Obviously not DB2.. datacom? Idms? Flatfile?

    The writer left out the most important points. And this COBOL guy was not the right guy to convert to something ... Obviously he wanted it to fail. I have met sharp programmers that were good at digging into new stuff and I have met my fair share that were just maintenance and small improvement programmers... Don't ever confuse the two.

  • (nodebb) in reply to my name is missing

    π•Ύπ–™π–”π–—π–Žπ–“π–Œ 𝖉𝖆𝖙𝖆 π–Žπ–“ 𝖃𝕸𝕷 π–Žπ–˜π–‘π–†π–“π–‰π–˜ π–Žπ–˜ π–™π–π–Š 𝕿𝕽𝖂𝕿𝕱!

  • (nodebb) in reply to smf

    π‘¨π’ˆπ’“π’†π’†π’…!

  • Yikes (unregistered) in reply to smf

    That kind of makes sense... Maybe there's something unstated (or vaguely implied) in the situation, such as it's a low-budget company. You may be right that the opportunity cost of dwelling on that project may be a negative, but why can't it be the case that you notify a buddy in the area who likes to do that sort of thing and take some commission? (enter gig economy)

  • Just a DBA (unregistered)

    This sounds like a small bank or local government. COBOL isn’t used much by competitive businesses.

    I can totally see this happening, given what I’ve witnessed in corporate life. One β€˜magic man’ holds the place together with duct tape, and nobody’s the wiser. They’re just happy not to pay an expert.

  • (nodebb) in reply to Bananafish

    Pretty sure Dawie is not "guru" material.

    This.

    SQL was invented by IBM. I'm pretty sure COBOL was the first language to interface with a SQL database and most of the early SQL applications were built with COBOL. Dawie is not a guru of any kind, he is an idiot.

    To say "COBOL programmer therefore doesn't understand relational databases" is a stupid and lazy and probably wrong in most cases. It's not like we haven't seen plenty of SQL WTF's from Java and C# programmers in the past. In fact, I reckon you'll find COBOL is severely underrepresented on this web site.

  • jgh (unregistered)

    I seem to have spent an inordinate amount of time coding to deal with data that arrives as ADDRESSLINE1, ADDRESSLINE2, ADDRESSLINE3, ADDRESSLINE4, etc.

Leave a comment on “Classic WTF: The Mainframe Database”

Log In or post as a guest

Replying to comment #:

« Return to Article