Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment "Flexible" database keys (Score 1) 356

What I've been planning to look into as a project is the following problem:

I have several instances of a platform, each with several customers. I'd like to be able to move customers around, but this would cause all kinds of problems with primary keys and foreign key relations in our database. To make matters worse, the database doesn't contain actual foreign keys all the foreign key relationships that are used and it contains a few text-fields which would require search-and-replace on some of the foreign keys.

I know of no standard solution to fix this, but it should be possible to do. It should be possible to make a tool, feed it with a configuration file that maps out all the relationships (ideally this could be generated from the database meta-data itself) and search&replace actions. Supply it with a list of "start" keys (in my example, this would be a customerid) from which it would scan all linked records. Have it export a file format which can be imported using the tool on a different database, generating new keys and properly setting foreign keys to the new keys. For bonus points, have it de-duplicate records as specified in that configuration file.

Such a tool would probably be very interresting to a lot of people.

Benefits of the project is that (AFAIK) it's not been done before, it's quite technical in nature (no need to understand non-IT stuff) and would produce code that would be useful after it is no longer a school project. Down side is that it's going to take quite some effort to make it truely effective. Also, as of now, you can't patent it ;)

Comment Re:Showoff Gets Off Easy (Score 1) 122

He's not exposing some inherent weakness in the system

Yes he is; it's users.
It's not hacking in the modern, limited sense, it's hacking in the traditional sense.
There aren't some hacking rules that say "you can't use a password if somebody gives it to you".
If the users can't be trusted with passwords (why were they sharing a password with a collegue in the first place?), provide some other (combination of) methods of identification.

Comment Re:Batch (Score 1) 318

JCL is rather verbose and very easy to get wrong though; it's rather unforgiving.
There's good reason for this, but it ensures that few people can create working JCL from scratch.

Writing a bash script usually involves knowing how to use the features of the programs you want to access. Writing a similar script in JCL typically requires knowing most of the features you're not using as well.

Comment Re:Batch (Score 1) 318

Anything that can be handled with sed and awk would typically be handled in JCL without touching any compiled code. Stuff like DFSORT/ICETOOL are remarkable flexible, have literally decades of continued improvement behind them and can do pretty much any file operation except business logic. One of the nice things about a mainframe is that pretty much every third party application can be controlled through JCL. A bit like bash scripting, but with more control. JCL itself is a bit complex though.

Comment Re:Batch (Score 1) 318

Please explain. I'm under the impression that IBM sells a C/C++ compiler. And even failing that, doesn't gcc work?

Yes, IBM provides their own C/C++ compilers, there are a few third party commercial C compilers available (don't know about C++) and GCC works too (for instance http://gccmvs.sourceforge.net/, but google has more).

Comment Re:Batch (Score 2) 318

Indeed. And I have yet to see any programming language (excluding assembly) that can do all the things you can do in machine code. And yes, this includes C.

Why would it be so strange that not all languages cover the same abilities on machine code level?

Comment Re:Batch (Score 4, Informative) 318

Yes, I'm sure it's much easier to code in RPG. In Java/C++/PHP/C# you could probably do it in less than a dozen lines of code as well. But none of those come close to the performance of COBOL for these specific tasks.

As far as right-aligning a string; it's supported in the data division: http://mainframewizard.com/content/cobol-just-right-clause. I'm sure if I had to program RPG without any training or a manual, I wouldn't produce very good code either.

COBOL is bad at a lot of things and in a lot of ways, but it does have a few redeeming qualities. It just turns out those particular qualities are highly sought after in many large companies.

Comment Re:Teaching The Controversy - Properly (Score 2) 813

Once there was an organism.
That organism had lots of babies, each slightly different from it's parent and slighly different from it's brothers and sisters.
The stronger, smarter and better those babies were, the more babies they had. Each slightly different again, but more different from it's nephews and nieces, of whom there were few.
This happened a lot of times until finally we named one of them "virus", and so virusses were born.
And the virus and all it's babies lived happily ever after (sadly, to the detriment of a few particular other organisms, which sometimes included humans).

Slashdot Top Deals

If you want to put yourself on the map, publish your own map.

Working...