Using DDL to define your data has a lot of benefits, but you still need to know a few tricks to get all of the features we enjoy in DDS. Read on for the secrets!
Written by Joe Pluta
Today's article is my first dedicated to Data Definition Language (DDL), the specific SQL syntax used to define tables. It's counterpart in the green-screen world is Data Descriptions Specifications (DDS), the simple data definition language we've used forever.
Those of us who used the RPG cycle and L1, L2, etc. for control-break processing remember how slick it was. Very few lines of code were needed, since most of the work was being done by the cycle code. As we proceeded into full procedural programming, we became aware that more code was needed to get the same result. Typically, we now needed save fields of control-break key fields, code to load the save fields, logic to see if the control-break key fields in the file changed from the save fields, and then more logic to handle the last group. Also, the save data needed to be updated in our control-break routine. This is pretty standard stuff that has been around for a long time.