Event Driven SQR's (EDS)

Event Driven Sqrs (termed as EDS) is a methodology that ensures fast development of SQR programs that is fast not only first time but every time when further maintenance/enhancement is required. It is very different to a drag-drop GUI methodology that promises fast development but only first time and demands more and more efforts when programs are revisited for general maintenance or enhancement.

EDS is a code-based methodology. With EDS you will save time each visit as past efforts are never wasted.

EDS Methodology:

EDS Methodology is a style of SQR coding that uses only 3 API's and ensures fast development or maintenance/enhancement. It is applicable to SQR program files and not to SQC program files. With EDS, programmer can generate complex report (report that demands several on-break prints) without much programming efforts and thinking. With EDS, a report may be a simple MAIN report or MAIN report with several SUB reports. In brief, EDS, offers following features that makes EDS a worthwhile style of coding.

  • Fast Development and Maintenance/Enhancement every time.
  • Programmer can concentrate more on business requirements.
  • Event Driven programming concept that requires low SQR programming skills to produce high quality and accurate reports.
  • Support of MAIN and unlimited SUB reports.
  • Input stream is not limited to begin-select. With EDS, input stream may be from data file, SQR arrays, begin-select or any combination of all these.
  • No need to use native on-break that requires more programming efforts and thinking.
  • Just three API's (begin, process, end) to code in EDS style.
  • Provides better control to programmers for computing totals, groupings or aggregates. These need not be performed at database level. In some situations, such computations at database level may not be practical or could lead to performance issues.
  • Provides better control to programmer to filter unwanted records from input stream.
  • Provision of page break events.
  • Programmers can keep database SQL's very simple and efficient.
  • Reporting data can be sourced from multiple data sources with more programming control as report can be generated from data file or array as input stream.
  • Answer to SQR programs that are suffering from performance issues. With EDS you can split complex SQL's into simple ones and retrieved data can be output into data file or array to generate desired report.
  • EDS methodology is not limited to SQR reports and can be used for SQR Process programs as API's do not print anything to 'lis' file.

EDS achieves this functionality by parsing the code that you have put together in EDS style. EDS style of coding is required for SQR program files only and not for SQC's or any source file that is included in SQR program using '#include ...' SQR directive. By convention, EDS Style of SQR program is coded in a file with extension 'eds'.

EDS Program Structure:

With EDS, programmer can concentrate better on the business logic/requirements. Programmer does not have to worry about previous, current or next value of the fields while addressing business requirements. EDS System maintains them and trigger appropriate action as the business requirements dictate. In other words, programmer just concentrates and codes procedures specific to business requirements - called Event and EDS triggers those Event actions as and when found appropriate.

Please see the Sample Sqr Program (demo06.eds) that has been coded with EDS Methodology. The program addresses following business requirements:

  • Generate a Pay Register by retrieving earning and deduction data from the database.
  • Grouping of earnings and deductions should be done for each employee. Earnings and deductions are not in the same row and necessary groupings should be done based on earning/deduction code provided.
  • Do not include employees who paid less than 700 Dollars in taxes.
  • After printing total earnings and deductions for each employee, print leave taken by an employee.
  • Include employee if leave records exists even if tax paid by him is less than 700 Dollars.
  • Report should have the sort order as:

    • Company
    • Pay Group
    • Department
    • Employee Id

  • Produce necessary totals for each:

    • Company
    • Pay Group
    • Department

  • Produce Report Grand Totals
  • Each Company must start with new page.
  • Necessary code descriptions should be printed when Company, Pay Group or Department changes.
  • Print 'Contd...' message at page break for current detail section in progress.

In other words, this report prints data that is not coming from single input stream. It processes two data input streams:

  • Pay Data - Main Report
  • Leave Data - Sub Report

Further, it is required to handle before and after breaks that can be very time consuming and tedious when using native on-break SQR feature. Also, in future, if one less or one more break is required, it could be a very tedious and time-consuming effort to enhance/maintain the report.

With EDS coding style, this report is a piece of cake. It can be developed in few hours and can be maintained/enhanced with minimum efforts. This is because, programmer has complete control on the logic flow and just needs to code procedure (or events) that business requirements dictate. EDS handles all the breaks (change in company, paygroup, department values). Programmer does not have to code for each break or worry about current, previous or next value of key fields.

Sample Output generated by running demo06.sqr program.

demo06.eds Documentation

Boost Developer's Productivity...