Ohio Educational Computer Network System (OECN)
UDMS Beginning Training Guide


Previous Contents

3.6.3 SORT Report Data

Press the MODIFY option in the REPORT SERVICES MENU. This will bring up the [TOP] RPW menu.


 
========================================================================================= 
|DD-MMM-YY  HH:MN XM                    REPORT4                                PAGE 9999| 
|                                   Lesson 4 Report                                     | 
|                               Data definition (PRSPAY)                                |  
|=======================================================================================| 
|EMPLOYEE #  LASTNAME         DEPT. #  WAGE CLASS       SALARY   CA_RAISE  CA_NEW_SALARY|  
|**********  ***************  *******  **********  ***********  *********  *************|  
|                                                                                       |  
|    00-000  XXXXXXXXXXXXXXX     9999           9  $999,999.99  $9,999.99    $999,999.99|  
|                                                                                       |  
|                                                                                       |  
|                                                                                       |  
|                                                                                       | 
|                                                                                       |  
|                                                                                       | 
| REPORT MENU [TOP]                                 <PF3> cancel                        | 
|                                                                                       | 
| SELECT Rpt Fields          TOTAL this Rpt      MODIFY Rpt Descriptor  CANCEL          | 
| DEFINE Input/Calc Flds     FORMAT this Rpt     CHANGE Submit Options  SAVE as         | 
| QUALIFY Data Records       GENERATE this Rpt                          CATALOG         | 
| SORT Rpt Data              EXAMINE Format                                             | 
|_______________________________________________________________________________________| 
 
 

Highlight and select the "SORT Rpt Data" option. This brings up the DEFINE SORT FLDS menu as shown next.


 
_____________________________________________________________________________ 
|                                                                           | 
|  DEFINE SORT FLDS                                      <PF3> cancel       |  
|                                                                           | 
| ====>  USER-DEFINED Sort Fields                              CANCEL       |  
|        LOAD Data Record Qualification from existing Def                   |   
|                                                                           |   
|___________________________________________________________________________| 
 
 

Next select the "USER-DEFINED Sort Fields" option.

This brings up the REPORT SORTING DATA screen with the cursor prompting for "Sort Field". For this report you will sort first on DEPTNO field and second on the LASTNAME field. You can either type in a field name, or press the [PF1] key to see a list of the report fields, and select one from there.

Type in DEPTNO for the sort Field and press the [Return] key to advance to the "Sort Type" field. This is shown in the following screen.


 
_________________________________________________________________________________________ 
|                                                                                       | 
| Rpw: REPORT4            REPORT DEFINITION MODIFICATION     View: PRSPAY               | 
|                                                                                       |    
|EMPLOYEE #  LASTNAME         DEPT. #  WAGE CLASS       SALARY   CA_RAISE  CA_NEW_SALARY|   
|**********  ***************  *******  **********  ***********  *********  *************|   
|                                                                                       |  
|    00-000  XXXXXXXXXXXXXXX     9999           9  $999,999.99  $9,999.99    $999,999.99|   
|                                                                                       |    
|                                                                                       |   
|                                                                                       |  
| Sort Entries: 0              REPORT DATA SORTING                                      |   
|       Sort Field      Sort Type                                                       |   
|                                                                                       |   
|   1  DEPTNO             ASC  <=====                                                   |  
|                                                                                       |   
|                                                                                       |  
|                                                                                       |  
| DEFINE                              <PF2> help    <PF3> cancel                        |  
|_______________________________________________________________________________________| 
 
 

To see the available sorting types, press the [PF2] HELP key. A screen similar to the following will appear.


 
_________________________________________________________________________________________ 
|                                                                                       | 
| Rpw: REPORT4            REPORT DEFINITION MODIFICATION     View: PRSPAY               |  
|                                                                                       |   
|EMPLOYEE #  LASTNAME         DEPT. #  WAGE CLASS       SALARY   CA_RAISE  CA_NEW_SALARY|  
|**********  ***************  *******  **********  ***********  *********  *************| 
|                                                                                       |   
|    00-000  XXXXXXXXXXXXXXX     9999           9  $999,999.99  $9,999.99    $999,999.99|   
|                                                                                       |  
|                                                                                       |   
|                                                                                       |   
| Sort Entries: 0              REPORT DATA SORTING                                      |  
|       Sort Field      Sort Type                                                       |  
|                                                                                       |  
|   1  DEPTNO             ASC                                                           |   
|                                                                                       |   
|                                                                                       | 
|                                                                                       |   
| DEFINE                              <PF2> help    <PF3> cancel                        |   
|                                                                                       |   
| Enter the type of sort desired for this      |  ASC (ascending)                       | 
| Field:                                       |  DSC (descending)                      |    
|                                              |  NOS (no sort, already sorted)         | 
|_______________________________________________________________________________________| 
 
 

The purpose of the "no sort" option is to use an "indexed" (keyed) field in a GROUP FORMAT without having to sort the field again. This will be discussed in lesson 5. It is important to note that this option CANNOT be mixed with the ascending or descending options.

Since you want DEPTNO to be sorted in ascending order, press the [Return] key to accept the default. This will set the cursor at line 2 prompting for another sort field.

Enter the sorting data as indicated next. Press the [Return] key at the end of line 2.


_________________________________________________________________________________________ 
|                                                                                       | 
| Rpw: REPORT4            REPORT DEFINITION MODIFICATION     View: PRSPAY               | 
|                                                                                       | 
|EMPLOYEE #  LASTNAME         DEPT. #  WAGE CLASS       SALARY   CA_RAISE  CA_NEW_SALARY| 
|**********  ***************  *******  **********  ***********  *********  *************| 
|                                                                                       |  
|    00-000  XXXXXXXXXXXXXXX     9999           9  $999,999.99  $9,999.99    $999,999.99|  
|                                                                                       | 
|                                                                                       | 
|                                                                                       | 
| Sort Entries: 0              REPORT DATA SORTING                                      |  
|       Sort Field      Sort Type                                                       |  
|                                                                                       | 
|   1  DEPTNO             ASC                                                           | 
|   2  LASTNAME           ASC  <====                                                    | 
|   3  ___________...                                                                   |  
|                                                                                       | 
|                                                                                       | 
|                                                                                       |   
| DEFINE           <PF1> select     <PF2> help                   <PF4> finished         |  
|_______________________________________________________________________________________| 
 

Since you have finished defining the sort data, press the [PF4] key to indicate that you are finished. The following SORT FIELDS main menu will appear.


 
_________________________________________________________________________________________ 
|                                                                                       | 
| Rpw: REPORT4            REPORT DEFINITION MODIFICATION     View: PRSPAY               | 
|                                                                                       | 
|EMPLOYEE #  LASTNAME         DEPT. #  WAGE CLASS       SALARY   CA_RAISE  CA_NEW_SALARY| 
|**********  ***************  *******  **********  ***********  *********  *************| 
|                                                                                       |  
|    00-000  XXXXXXXXXXXXXXX     9999           9  $999,999.99  $9,999.99    $999,999.99| 
|                                                                                       | 
|                                                                                       | 
|                                                                                       |  
| Sort Entries: 2              REPORT DATA SORTING                                      |  
|       Sort Field      Sort Type                                                       |  
|                                                                                       |  
|   1  DEPTNO             ASC                                                           |  
|   2  LASTNAME           ASC                                                           | 
|                                                                                       |  
|                                                                                       |  
| SORT FIELDS MENU                                  <PF3> cancel  <PF4> finished        | 
|                                                                                       |  
| ADD    an Entry               REVIEW  the Entries           CANCEL                    |  
| INSERT an Entry               CLEAR   all Entries           FINISHED                  |  
| CHANGE an Entry               EXAMINE Format                                          | 
| DELETE an Entry                                                                       |  
|_______________________________________________________________________________________| 
 
 

This menu allows you to make additions, deletions, clear, or examine the sort fields. Press the [PF4] key to return to the [TOP] RPW menu as shown next.


 
_________________________________________________________________________________________ 
|                                                                                       | 
| Rpw: REPORT4            REPORT DEFINITION MODIFICATION     View: PRSPAY               |    
|                                                                                       | 
|=======================================================================================| 
|DD-MMM-YY  HH:MN XM                     REPORT4                             PAGE 9999  | 
|                                    Lesson 4 Report                                    |                       
|                                Data definition (PRSPAY)                               |                        
|=======================================================================================| 
|EMPLOYEE #  LASTNAME         DEPT. #  WAGE CLASS       SALARY   CA_RAISE  CA_NEW_SALARY|    
|**********  ***************  *******  **********  ***********  *********  *************|  
|                                                                                       |    
|    00-000  XXXXXXXXXXXXXXX     9999           9  $999,999.99  $9,999.99    $999,999.99| 
|                                                                                       |   
|                                                                                       |   
|                                                                                       |   
|                                                                                       |   
|                                                                                       |   
| REPORT MENU [TOP]                                 <PF3> cancel                        |   
|                                                                                       |   
| SELECT Rpt Fields          TOTAL this Rpt      MODIFY Rpt Descriptor  CANCEL          | 
| DEFINE Input/Calc Flds     FORMAT this Rpt     CHANGE Submit Options  SAVE as         | 
| QUALIFY Data Records       GENERATE this Rpt                          CATALOG         | 
| SORT Rpt Data              EXAMINE Format                                             | 
|_______________________________________________________________________________________| 
 
 

3.6.4 Generate the Report

Again, you are asked to PREVIEW the proposed report. When the report is generated, you will be prompted to "Enter the highest Department Number to process". The value you enter will be assigned as the current value of the Input variable, IN_DEPTNO.

In order to PREVIEW the updated report, type in the command, GEN, and press the [Return] key. The following REPORT GENERATION/ OUTPUT PARAMETERS screen will appear.


 
______________________________________________________________________________ 
|  Rpw: REPORT4               REPORT GENERATION               View: PRSPAY   |        
|                                                                            |     
|                      O U T P U T     P A R A M E T E R S                   |     
|                                                                            |     
|  1. Output Specification : TERMINAL                                        |     
|                                                                            |     
|  2. Printer Type         :                13. Number of copies   :  1      |     
|  3. Page Length          :  60            14. First page to print:  1      |   
|  4. Page Width           : 132            15. Last page to print :         |     
|  5. Report Spacing       : SINGLE         16. Stop every page    :  N      |      
|  6. Characters per inch  :                                                 |     
|  7. Top Margin           :                17. Read Limit         :         |     
|  8. Bottom Margin        :                18. Qualify Limit      :         |     
|  9. Left Margin          :                19. Extract Display Inc:  500    |    
| 10. Page Break           : N                                               |     
| 11  Suppress Dupl Values : N              20. 4GL Include File   :         |     
| 12. Summary Report       : N                                               |     
|                                                                            |     
|  MENU                                              <PF3> cancel            |     
|                                                                            |     
|  CONTINUE with Generate        PREVIEW this Report                CANCEL   |     
|  CHANGE an Output Parameter                                                | 
|____________________________________________________________________________|     
 

Highlight the "PREVIEW this Report" option and press the [Return] key.

Processsing will begin, and the following screen should appear which will ask you to enter some value for the "highest Department Number to Process".


 
_________________________________________________________________________________________ 
|                                                                                       |      
| Rpw: REPORT4                  REPORT GENERATION            View: PRSPAY               |                                             
|                                                                                       | 
|      Enter the highest Department Number to Process: 30  <====                        | 
|                                                                                       | 
|_______________________________________________________________________________________| 
 
 

Enter the value 30 and press the [Return] key. The first page of the report, similar to the following, should appear on your screen.


 
 
 
======================================================================================= 
07-JAN-97  10:10 AM                      REPORT4                          PAGE    1 
                                     Lesson 4 Report 
                                 Data definition (PRSPAY) 
======================================================================================= 
 
 
EMPLOYEE #  LASTNAME         DEPT. #  WAGE CLASS       SALARY   CA_RAISE  CA_NEW_SALARY 
**********  ***************  *******  **********  ***********  *********  ************* 
 
    00-120  CUSHNER               10           1  $  1,450.00  $  101.50    $  1,551.50 
    00-110  MARVIN                10           1  $  3,000.00  $  210.00    $  3,210.00 
    00-145  NORRIS                10           1  $    850.00  $   59.50    $    909.50 
    00-105  NOLL                  20           1  $  4,500.00  $  270.00    $  4,770.00 
    00-209  WESSELLER             20           1  $  1,500.00  $   90.00    $  1,590.00 
    00-135  ANDERSON              30           1  $  2,100.00  $  126.00    $  2,226.00 
    00-245  BUCHANAN              30           1  $  2,100.00  $  126.00    $  2,226.00 
    00-203  FOSTER                30           1  $  2,000.00  $  120.00    $  2,120.00 
    00-150  HIRSCH                30           1  $    800.00  $   48.00    $    848.00 
    00-235  WANDERSEEN            30           1  $  1,000.00  $   60.00    $  1,060.00 
 
Press <RETURN> to continue.... 
 
 

Notice that the records are grouped by increasing department number, and are listed by lastname within each department. It might be useful to break the report by department number and give departmental subtotals. This will be one of the formatting additions which you will do in lesson 5.

Press the [Return] key to return to the REPORT GENERATION/OUTPUT PARAMETERS Menu as shown below.


 
______________________________________________________________________________ 
|                                                                            |      
|  Rpw: REPORT4               REPORT GENERATION               View: PRSPAY   |        
|                                                                            |     
|                      O U T P U T     P A R A M E T E R S                   |     
|                                                                            |     
|  1. Output Specification : TERMINAL                                        |     
|                                                                            |     
|  2. Printer Type         :                13. Number of copies   :  1      |     
|  3. Page Length          :  60            14. First page to print:  1      |   
|  4. Page Width           : 132            15. Last page to print :         |     
|  5. Report Spacing       : SINGLE         16. Stop every page    :  N      |      
|  6. Characters per inch  :                                                 |     
|  7. Top Margin           :                17. Read Limit         :         |     
|  8. Bottom Margin        :                18. Qualify Limit      :         |     
|  9. Left Margin          :                19. Extract Display Inc:  500    |    
| 10. Page Break           : N                                               |     
| 11  Suppress Dupl Values : N              20. 4GL Include File   :         |     
| 12. Summary Report       : N                                               |     
|                                                                            |     
|  MENU                                              <PF3> cancel            |     
|                                                                            |     
|  CONTINUE with Generate        PREVIEW this Report                CANCEL   |     
|  CHANGE an Output Parameter                                                | 
|____________________________________________________________________________|     
 
 

Choose the CANCEL option to return to the SERVICES MENU, (you may need to press CANCEL twice) and then select the MAIN option to return to the Main UDMS menu as shown next.


 
 
_________________________________________________________________________ 
|                                                                       | 
| Version 5.3-aa        User Data Management System                     |         
|                                                                       |         
|                       M  A  I  N     M  E  N  U                       |         
|                                                                       |         
|          RPW    ReportWriter                 INQ    Inquiry           |         
|          EXP    Export                                                |         
|          LBL    Labels                                                |         
|          TXT    Text/Merge                                            |         
|                                                                       |         
|                      MOD    Select Defs by Module (RPW, EXP, FRM...)  |      
|                      DATA   Select a Data Def (Record/View/Alias)     |      
|                      EXIT                                             |      
|                                                                       |         
|                                                                       |         
|                                                                       |         
|                                                                       |         
|                                                                       |         
|  MENU                       <PF2> help                  <PF4> exit    | 
|                                                                       |         
|        Copyright (C) 1987-1995 Interactive Software Systems Inc.      |         
|                         Enabled until 11/22/99.                       |         
|_______________________________________________________________________|  
 
 


Previous Next Contents