The use of databases has progressed rapidly in the last 20 years. As the amount of data collected by companies has increased, so have the demands on application developers to make use of it.
When databases were originally used, all the processing was performed on large mainframes with the output being sent to dumb terminals. There was no concern about where the application processed the data, because the data always resided on the server. This process changed when databases began to appear on mid-range UNIX machines, where the client and server were often separate. Stored procedures were created to allow data processing to occur on the much faster servers, to reduce the workload and CPU bottlenecks on the slower clients, and to reduce the amount of data sent across the network.
In those days, DB2 stored procedures were primarily developed using the C programming language, which gave developers greater flexibility in how they could manipulate data. This flexibility, however, came with a pricewriting C procedures was a complicated and error-prone process. Developers had to be highly knowledgeable in both C and embedded SQL, which was often a difficult combination to find.
This issue created a demand for an easier method to write stored procedures and led to the creation of a new third-generation (3GL) programming language. The language was based on the existing SQL syntax and used a simple structured programming language very similar to early BASIC. DB2 SQL Procedural Language (DB2 SQL PL) was born. This new language enabled programmers to quickly develop and build stored procedures without having to know any complex programming languages or data structures. The ease of development led to an explosion in the use of stored procedures, as both developers and database administrators quickly learned how to work with this new simplified programming language.
DB2 SQL PL for stored procedures was originally available on DB2 for AS/400, which is now referred to as DB2 UDB for iSeries. From there, DB2 for mainframe (now called z/OS or zSeries) and DB2 for Linux, UNIX, and Windows adopted the language as well.