SRI Technologies

Last Modified
Date: 11-Dec-2005
Time: 03:02:06
Index

Project Name: Gamma Project
System Name: Demo System
Application Name: Demo Application
Source File: DEMO04.SQR
Program Name: Demo Program 04
Program Description: Program to demonstrate automatic documentation capabilities of SqrPlus product.
Menu Navigation: 1. PeopleTools->Utilities->Use->Demo04
2. PeopleTools->Demo->Use->Demo04
Author: Scott M

Program Change Log:
Sl.NODateAuthorRemark
1.02-Feb-2002Scott.MCloned from demo02.sqr
2.10-Feb-2002Sunita.MChanges as result of detailed scope and requirement Analysis
3.15-Feb-2002Scott.MIntroduced SqrPlus Documentation tags to facilitate automatic document generation

Main Tables Used:
SLNO.Table NameAccess ModeProcedure NameRemarks
1XLATTABLESELECT, SUB-SELECT DB-SELECT To get Translate Values for various fields.

Input Parameters:

File Inputs/Outputs:
Sl.NOFileModeRemarks
1.c:\temp\demo01.datInputdata file for input stream
2.c:\temp\demo01.outOutputCSV data file

Initial Processing:
 

Initialise Printer:

  1. Initialise printer as line printer in portrait mode.

Init Report:

  1. Create Array.
  2. Fill random data into array to be used as input stream for reporting.

Main Processing:
 

Generate Report:

  1. Generate report by scanning each record from the previously filled array with random data.
  2. Call procedure to test database connection. This is done only if connect string is specified and PSOFT variable has been defined.

EOJ Processing:
 

Terminate:

  1. Set end of report flag.

See Also:

  1. Demo01.sqr
  2. Demo02.sqr
  3. Demo03.sqr

Include Files:

  1. d:\sqrplus\sqr\democons.sqc
  2. d:\sqrplus\sqr\demodate.sqc
  3. d:\sqrplus\sqr\demostr.sqc
  4. d:\sqrplus\sqr\democomm.sqc


Program Flow:

+---------------------------------------------------------------+ 
|                                                               | 
|                 +-----------------------------+               | 
|                 | Fill Array with Random Data |               | 
|                 +-----------------------------+               | 
|                                |                              | 
|                                |                              | 
|                 +-----------------------------+               | 
|                 | Generate Report based on    |               | 
|                 | input stream from array     |               | 
|                 +-----------------------------+               | 
|                                |                              | 
|                                |                              | 
|                 +-----------------------------+               | 
|                 | Do some common tests        |               | 
|                 +-----------------------------+               | 
|                                |                              | 
|                                |                              | 
|                 +-----------------------------+               | 
|                 |        Terminate            |               | 
|                 +-----------------------------+               | 
|                                                               | 
+---------------------------------------------------------------+ 


Procedure Call Tree:

    01  BEGIN-PROGRAM
        02  COMM-INIT 
            03  DATE-CURR-DATE 
            03  DATE-CURR-TIME 
        02  INIT-REPORT 
            03  DATE-CURR-DATE 
            03  COMM-CREATEARRAY 
        02  REPORT 
            03  DB-SELECT 
        02  COMM-SOMETESTS 
        02  TERMINATE 
        02  BEGIN-HEADING (indirect call) 
            03  COMM-HEADER 
        02  BEGIN-FOOTING (indirect call) 


Selected Procedures:

  1. Procedure Name: REPORT
    Procedure Description: Generate Report
    Procedure Type: Global

    Arguments/Parameter:
    SLNO.VariableMode
    N/ANoneNot Applicable

    Database Tables:
    SLNO.Table NameAccess ModeRemarks
    1NoneN/ANot Applicable

    Processing:

    Generate Report:

    1. Generate report by scanning each record from the previously filled array with random data.
    2. Call procedure to test database connection. This is done only if connect string is specified and PSOFT variable has been defined.

  2. Procedure Name: DB-SELECT
    Procedure Description: Obtain xlat value for given field name and and field value
    Procedure Type: Local

    Arguments/Parameter:
    SLNO.VariableMode
    1$FLD_NAMBy Value
    2$FLD_VALBy Value
    3$SHORT_NAMEBy Reference
    4$LONG_NAMEBy Reference

    Database Tables:
    SLNO.Table NameAccess ModeRemarks
    1XLATTABLESELECT, SUB-SELECT To get Translate Values for various fields.

    Processing:

    Data Select:

    1. Select short and long description from xlat table for given field namd and field value
    2. Log appropriate message in the program log.

    Selects:

  3. Main Select:

    begin-SELECT 
    XLATSHORTNAME, 
    XLATLONGNAME 
    FROM  XLATTABLE 
    WHERE FIELDNAME   = $fld_nam 
      AND FIELDVALUE  = $fld_val 
      AND EFFDT = 
          (SELECT MAX(EFFDT) 
           FROM   XLATTABLE 
           WHERE  FIELDNAME  = $fld_nam 
             AND  FIELDVALUE = $fld_val) 
      AND EFF_STATUS = 'A' 
    end-SELECT 
    

  4. See Also:

    1. COMM-SomeTests of democomm.sqc
    2. report


Sample Output: