Sunday, December 15, 2013

Day-23.

Query/400:

Overview:

This module enables the student to understand the concept of Query400.

Outline:
Topics covered,
            a. Query/400
  b. Creation of Query
            c. Running of Query
            d. Updation of Query
            e. Level Breaks
 Objective:
By the end of this module, the student should be able to:
 ·         Understanding the Query/400 and its function

Query/400

Query for iSeries is an IBM licensed program and a decision support utility that can be used to obtain information from the DB2 Universal Database for iSeries database.

You use Query to select, arrange, and analyze information (data) stored in one or more database files to produce reports and other data files. You can create your own query definitions and then run them, you can run existing queries.

You can use Query to obtain information from a single file or a combined set of up to 32 files. You can select all the fields, or a few of the fields and organize them as you want them to appear in the type of output chosen. You can have all records in the files included in the output, or you can select only a few to be included, using record selection tests.
Files, fields, and record formats in Query for iSeries
Information, or data, is organized and stored on your system in various forms, primarily in objects called database files . A file contains individual units of information, called records, that each contain related pieces of data. Each piece of information in a record is called a field, and how the fields are organized is defined in a record format.

Query has four commands, which can be entered from any command line:

1. STRQRY brings up the Query menu.
2. WRKQRY brings up the Work with Queries display.
3. Run Query (RUNQRY) runs an existing query, or you can use it to run a default query. This command can also be embedded in CL programs so that you could, for example, run several queries overnight.
4. Delete Query (DLTQRY) deletes one or several query definitions.

On command line type STRQRY

                                  Work with Members Using PDM                 S653278B
                                                                               
 File  . . . . . .   MYSRC                                                     
   Library . . . .   PB07U01D             Position to  . . . . .              
                                                                               
 Type options, press Enter.                                                    
  2=Edit         3=Copy  4=Delete 5=Display       6=Print     7=Rename         
  8=Display description  9=Save  13=Change text  14=Compile  15=Create module...
                                                                               
 Opt  Member      Type        Text                                             
         STUD1        PF          STUDENT DETAILS                                  
                                                                               

                                                                               
                                                                          Bottom
 Parameters or command                                                         
 ===> STRQRY                                                                   
 F3=Exit          F4=Prompt             F5=Refresh            F6=Create        
 F9=Retrieve      F10=Command entry     F23=More options      F24=More keys    
  
Query utilities

Work with queries

QUERY                          Query Utilities                                
                                                             System:   S653278B
 Select one of the following:                                                  
                                                                               
   Query for AS/400                                                             
      1. Work with queries                                                     
      2. Run an existing query                                                 
      3. Delete a query                                                         
                                                                               
   DB2 for AS/400                                                              
     10. Start DB2 Query Manager for AS/400                                     
                                                                               
   Query management                                                            
     20. Work with query management forms                                       
     21. Work with query management queries                                    
     22. Start a query                                                         
     23. Analyze a Query for AS/400 definition                                  
                                                                        More...
 Selection or command                                                          
 ===> 1                                                                         
                                                                                
 F3=Exit   F4=Prompt   F9=Retrieve   F12=Cancel   F13=Information Assistant    
 F16=AS/400 Main menu                                                          
 (C) COPYRIGHT IBM CORP. 1980, 2002.                                                                                                                         


Query Task Description of Task
1=Create Creates (defines) a new query. When this option is processed, the Define the Query
display is shown so you can start defining a query.
2=Change Changes an existing query definition.
3=Copy Copies an existing query definition.
4=Delete Deletes an existing query definition. The Confirm Delete of Queries display is shown.

5=Display Shows the definition of a query without being able to change it.
6=Print definition Prints a query definition
8=Run in batch Runs a query in batch, reducing the resource drain caused by running the query interactively.
9=Run Runs a query. Query displays a report, prints a report, or puts the data into a database
file, depending on what is specified in the query definition.


                               Work with Queries                               
                                                                                
 Type choices, press Enter.                                                    
                                                                               
   Option  . . . . . .   1              1=Create, 2=Change, 3=Copy, 4=Delete   
                                        5=Display, 6=Print definition          
                                        8=Run in batch, 9=Run                  
   Query . . . . . . .   QRY1           Name, F4 for list                       
     Library . . . . .     PB07U01D     Name, *LIBL, F4 for list               
                                                                               
                                                                               

        
                                                                   
                                                                               
 F3=Exit       F4=Prompt       F5=Refresh       F12=Cancel                     
                                                 (C) COPYRIGHT IBM CORP. 1988  


Selecting options for a Query for iSeries query definition

To select options that you want to use from those listed in the Query Definition Option column, type a 1 in the Opt (option) column beside each of those options, then press the Enter key. The displays for the options you select are then shown one after the other so you can create those parts of the query definition.

Following are brief descriptions of each of the definition steps.

Specify file selections

This option is required, and you use it to specify the file or files from which you want your query to obtain information. If you specify more than one file, you are shown the displays on which you
specify how you want the files joined.

Define result fields

Use this option to define fields that do not exist in your files but you want to use in your query. 

Select and sequence fields

Use this option to select the fields (from your selected file(s) and your result fields) that you want
to appear on your report. You also specify in what order you want them to appear.

Select records

Use this option to select records, from your selected file or files, if you only want particular records to be included in your report.

Select sort fields

Use this option to specify what fields to sort on so that your output records appear in a particular
order (such as alphabetically or in descending or ascending order).

Select collating sequence

Use this option to select a collating sequence for your query. The collating sequence you select can affect many different things in your query, including record selection and the order of records when they are sorted. You can also specify a different language for a particular query. You can set your collating sequence defaults while defining your first query and thereby never have to change the collating sequence again.

Specify report column formatting

Use this option to change the column headings, column spacing, numeric editing, length, and decimal positions for fields that appear in your report.

Select report summary functions

Use this option to specify one or more (or all) of the types of summary functions for each field in your report: total, average, minimum value, maximum value, and count.

Define report breaks

Use this option to specify how to break your report into groups of records.

Select output type and output form

Use this option to specify if you want your output to be displayed, printed, or sent to a database file. If you want your output printed, you also specify printer attributes. You also use this option to specify whether you want detailed or summary-only output.

Specify processing options

Use this option to specify if you want the results of your query calculations to be truncated or rounded, if you want decimal data errors ignored, or if you want to ignore character substitution warnings during conversion.

 Suggested sequence of tasks for creating Query for iSeries queries

The following is a suggested sequence of tasks to create queries:

  • Define result fields before selecting and sequencing fields.
  • Specify comparisons used for selecting records before selecting and sequencing fields.
  • Select and sequence fields and specify sort fields before you reformat columns.
  • Select sort fields before you define report breaks.
  • Press F5 to view your query results and F13 to view your report layout before and after you reformat columns.

Specify File selection

                                Define the Query                                
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CREATE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                                
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                    
                                                                                
 Opt    Query Definition Option                                                
  1     Specify file selections                                                
        Define result fields                                                    
        Select and sequence fields                                             
        Select records                                                         
        Select sort fields                                                      
        Select collating sequence                                              
        Specify report column formatting                                       
        Select report summary functions                                         
        Define report breaks                                                   
        Select output type and output form                                     
        Specify processing options                                              
   

                                                                           
 F3=Exit            F5=Report          F12=Cancel                              
 F13=Layout         F18=Files          F21=Select all                          
                                                                                




                               Specify File Selections                            
                                                                               
 Type choices, press Enter.  Press F9 to specify an additional                 
   file selection.                                                             
                                                                               
   File . . . . . . . . .   STUDENT        Name, F4 for list                   
     Library  . . . . . .     PB07U01D     Name, *LIBL, F4 for list            
   Member . . . . . . . .   *FIRST         Name, *FIRST, F4 for list           
   Format . . . . . . . .   RSTUD          Name, *FIRST, F4 for list           
                                                                               
                                                                               

                                                                            
                                                                               
 F3=Exit           F4=Prompt          F5=Report            F9=Add file         
 F12=Cancel        F13=Layout         F24=More keys                             
 Select file(s), or press Enter to confirm.                                                                                                                 



                                                                       
                                Define the Query                               
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CREATE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                               
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                     
                                                                               
 Opt    Query Definition Option                                                
      > Specify file selections                                                
        Define result fields                                                   
        Select and sequence fields                                             
        Select records                                                          
        Select sort fields                                                     
        Select collating sequence                                              
        Specify report column formatting                                        
        Select report summary functions                                        
        Define report breaks                                                   
        Select output type and output form                                      
        Specify processing options                                             
  

                                                                           
 F3=Exit            F5=Report                                                  
 F13=Layout         F18=Files          F21=Select all                          
 Select options, or press F3 to save or run the query.                         


Press F3 to save or run the Query

                                Exit this Query                                 
                                                                               
 Type choices, press Enter.                                                    
                                                                                
   Save definition  . . .   Y              Y=Yes, N=No                         
                                                                               
   Run option . . . . . .   1              1=Run interactively                 
                                           2=Run in batch                      
                                           3=Do not run                        
                                                                               
   For a saved definition:                                                     
     Query  . . . . . . .   QRY1           Name                                
       Library  . . . . .     PB07U01D     Name, F4 for list                   
                                                                                
     Text . . . . . . . .                                                      
                                                                               
     Authority  . . . . .   *LIBCRTAUT     *LIBCRTAUT, authorization list name,
                                           *CHANGE, *ALL, *EXCLUDE, *USE       
                                                                               
         
                                                                      
                                                                               
 F4=Prompt        F5=Report        F12=Cancel        F13=Layout                
 F14=Define the query                                                           
                                                                               

Output

                                 Display Report                                
 Query . . . :   PB07U01O/QRY1                Report width . . . . . :      69 
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....  
        ROLL NO  STUDENT NAME  COURSE CODE  COURSE NAME  ADDRESS  COURSE FEES  
 000001     1       AAA            100         BASIC      PUNE        3,000    
 000002     2       BBBB           200         VB         PUNE        5,000    
 000003     3       CCCCC          300         AS400      BOMB       30,000    
 000004     4       DDDDD          200         VB         NASH        5,000    
 ****** ********  End of report  ********                                      
                                                                               
                                                                                
                                                                       Bottom  
 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           
                                                                                

Press F3=Exit
Type Option 2 to make changes in query.

                               Work with Queries                               
                                                                                
 Type choices, press Enter.                                                    
                                                                               
   Option  . . . . . .   2              1=Create, 2=Change, 3=Copy, 4=Delete   
                                        5=Display, 6=Print definition          
                                        8=Run in batch, 9=Run                  
   Query . . . . . . .   QRY1           Name, F4 for list                      
     Library . . . . .     PB07U01D     Name, *LIBL, F4 for list               
                                                                               

                                                                              
                                                                                
 F3=Exit       F4=Prompt       F5=Refresh       F12=Cancel                     
 Query option processing completed successfully.                               


Define result fields.


                                Define the Query                               
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                               
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                     
                                                                               
 Opt    Query Definition Option                                                
      > Specify file selections                                                 
  1     Define result fields                                                   
        Select and sequence fields                                             
        Select records                                                          
        Select sort fields                                                     
        Select collating sequence                                              
        Specify report column formatting                                        
        Select report summary functions                                        
        Define report breaks                                                   
        Select output type and output form                                      
        Specify processing options                                             
                           

                                                   
 F3=Exit            F5=Report          F12=Cancel                              
 F13=Layout         F18=Files          F21=Select all                          
      
Press enter


                              Define Result Fields                             
                                                                                
 Type definitions using field names or constants and operators, press Enter.   
   Operators:  +, -, *, /, SUBSTR, ||, DATE...                                 
                                                                               
 Field       Expression                         Column Heading        Len   Dec
 CONS        FEES * 0.10                        CONCESSION              7     2
                                                                               
                                                                                

                                                                               
                                                                        Bottom 
                                                                                
 Field              Field                                                      
 ROLL               ADD                                                        
 SNAME              FEES                                                        
 CCD                                                                           
 CORS                                                                          
                                                                        Bottom 
 F3=Exit           F5=Report         F9=Insert            F11=Display text     
 F12=Cancel        F13=Layout        F20=Reorganize       F24=More keys        
                                                                                


Exit, Save and Run 



                                Exit this Query                                
                                                                               
 Type choices, press Enter.                                                     
                                                                               
   Save definition  . . .   Y              Y=Yes, N=No                         
                                                                                
   Run option . . . . . .   1              1=Run interactively                 
                                           2=Run in batch                      
                                           3=Do not run                        
                                                                                
   For a saved definition:                                                     
     Query  . . . . . . .   QRY1           Name                                
       Library  . . . . .     PB07U01D     Name, F4 for list                   
                                                                               
     Text . . . . . . . .                                                      
                                                                                
     Authority  . . . . .   *CHANGE        *LIBCRTAUT, authorization list name,
                                           *CHANGE, *ALL, *EXCLUDE, *USE       
                                                                                
                                                                               
                                                                               
 F4=Prompt        F5=Report        F12=Cancel        F13=Layout                
 F14=Define the query                                                          


Output 

                                 Display Report                                
 Query . . . :   PB07U01D/QRY1                Report width . . . . . :      69 
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....  
          CNCSION   ROLL NO  STUD NAME  CORS CODE  CORS NAME  ADRS   CORS FEE  
 000001    300.00       1      AAA         100       BASIC    PUNE     3,000   
 000002    500.00       2      BBBB        200       VB       PUNE     5,000   
 000003  3,000.00       3      CCCCC       300       AS400    BOMB    30,000   
 000004    500.00       4      DDDDD       200       VB       NASH     5,000   
 ****** ********  End of report  ********                                      
                                                                               


                                                                   Bottom  
 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           
                                                                            

Select and sequence fields


                                Define the Query                               
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                               
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                     
                                                                               
 Opt    Query Definition Option                                                
      > Specify file selections                                                 
      > Define result fields                                                   
  1     Select and sequence fields                                             
        Select records                                                          
        Select sort fields                                                     
        Select collating sequence                                              
        Specify report column formatting                                        
        Select report summary functions                                        
        Define report breaks                                                   
        Select output type and output form                                      
        Specify processing options                                             
                                                                               
 F3=Exit            F5=Report          F12=Cancel                              
 F13=Layout         F18=Files          F21=Select all                          
                                                                               


                          Select and Sequence Fields                           
                                                                                
 Type sequence number (0-9999) for the names of up to 500 fields to            
   appear in the report, press Enter.                                          
                                                                                
 Seq   Field                                                                   
 7     CONS                                                                    
 1     ROLL                                                                     
 2     SNAME                                                                   
 4     CCD                                                                     
 3     CORS                                                                     
 5     ADD                                                                     
 6     FEES                                                                    
                                                                                

                                                                               
                                                                        Bottom 
 F3=Exit           F5=Report          F11=Display text       F12=Cancel         
 F13=Layout        F20=Renumber       F21=Select all         F24=More keys     
                                                                               



                          Select and Sequence Fields                           
                                                                                
 Type sequence number (0-9999) for the names of up to 500 fields to            
   appear in the report, press Enter.                                          
                                                                                
 Seq   Field                                                                   
    1  ROLL                                                                    
    2  SNAME                                                                    
    3  CORS                                                                    
    4  CCD                                                                     
    5  ADD                                                                      
    6  FEES                                                                    
    7  CONS                                                                    

                                                                               Bottom 
 F3=Exit           F5=Report          F11=Display text       F12=Cancel        
 F13=Layout        F20=Renumber       F21=Select all         F24=More keys     
 Press Enter to confirm.                                                        

Output

                                 Display Report                                
 Query . . . :   PB07U01D/QRY1                Report width . . . . . :      69 
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....  
        ROLL NO  STUD NAME  CORS NAME  CORS CODE  ADRS   CORS FEE    CNCSION   
 000001     1      AAA        BASIC       100     PUNE     3,000      300.00   
 000002     2      BBBB       VB          200     PUNE     5,000      500.00   
 000003     3      CCCCC      AS400       300     BOMB    30,000    3,000.00   
 000004     4      DDDDD      VB          200     NASH     5,000      500.00   
 ****** ********  End of report  ********                                      
                                                                               
    
                                                      
                                                                       Bottom  
 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           


Select Records


                                Define the Query                               
                                                                                
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                                
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                    
                                                                                
 Opt    Query Definition Option                                                
      > Specify file selections                                                
      > Define result fields                                                    
      > Select and sequence fields                                             
  1     Select records                                                         
        Select sort fields                                                     
        Select collating sequence                                              
        Specify report column formatting                                       
        Select report summary functions                                        
        Define report breaks                                                   
        Select output type and output form                                     
        Specify processing options                                             
              


                                                                 
 F3=Exit            F5=Report                                                  
 F13=Layout         F18=Files          F21=Select all                          

  
                                 Select Records                                
                                                                               
 Type comparisons, press Enter.  Specify OR to start each new group.           
   Tests:  EQ, NE, LE, GE, LT, GT, RANGE, LIST, LIKE, IS, ISNOT...             
                                                                               
 AND/OR  Field             Test   Value (Field, Number, 'Characters', or ...)  
         ROLL              EQ     1                                             
                                                                               

                                                                        Bottom 
                                                                           

    
 Field              Field                                                      
 ROLL               FEES                                                       
 SNAME              CONS                                                       
 CORS                                                                          
 CCD                                                                           
 ADD                                                                           
                                                                        Bottom 
 F3=Exit          F5=Report          F9=Insert             F11=Display text    
 F12=Cancel       F13=Layout         F20=Reorganize        F24=More keys       


Output


                                 Display Report                                
 Query . . . :   PB07U01O/QRY1                Report width . . . . . :      69 
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....  
        ROLL NO  STUD NAME  CORS NAME  CORS CODE  ADRS   CORS FEE    CNCSION   
 000001     4      DDDDD      VB          200     NASH     5,000      500.00   
 000002     3      CCCCC      AS400       300     BOMB    30,000    3,000.00   
 000003     2      BBBB       VB          200     PUNE     5,000      500.00   
 ****** ********  End of report  ********                                      
          


        



                                                            

                                                                       Bottom  
 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           
                                                                                 
  

Select sort fields                     

                                Define the Query                               
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                               
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                    
                                                                               
 Opt    Query Definition Option                                                 
      > Specify file selections                                                
      > Define result fields                                                   
      > Select and sequence fields                                              
      > Select records                                                         
  1     Select sort fields                                                     
        Select collating sequence                                               
        Specify report column formatting                                       
        Select report summary functions                                        
        Define report breaks                                                   
        Select output type and output form                                     
        Specify processing options                                             
             

                                                                 
 F3=Exit            F5=Report          F12=Cancel                              
 F13=Layout         F18=Files          F21=Select all                          
 
Press enter


                               Select Sort Fields                              
                                                                                
 Type sort priority (0-999) and A (Ascending) or D (Descending) for            
   the names of up to 32 fields, press Enter.                                  
                                                                                
 Sort                                                                          
 Prty A/D  Field                                                               
  1    A   ROLL                                                                 
           SNAME                                                               
           CORS                                                                
           CCD                                                                  
           ADD                                                                 
           FEES                                                                
           CONS                                                                 
                                                                               

                                                                               
                                                                        Bottom 
 F3=Exit         F5=Report       F11=Display text     F12=Cancel               
 F13=Layout      F18=Files       F20=Renumber         F24=More keys            


Press Enter to confirm

                               Select Sort Fields                               
                                                                               
 Type sort priority (0-999) and A (Ascending) or D (Descending) for            
   the names of up to 32 fields, press Enter.                                   
                                                                               
 Sort                                                                          
 Prty A/D  Field                                                               
    1  A   ROLL                                                                
           SNAME                                                               
           CORS                                                                
           CCD                                                                  
           ADD                                                                 
           FEES                                                                
           CONS                                                                 
                          
    
                                                                   Bottom 
 F3=Exit         F5=Report       F11=Display text     F12=Cancel               
 F13=Layout      F18=Files       F20=Renumber         F24=More keys            
 Press Enter to confirm.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     


Output


                                 Display Report                                
 Query . . . :   PB07U01D/QRY1                Report width . . . . . :      69 
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....  
        ROLL NO  STUD NAME  CORS NAME  CORS CODE  ADRS   CORS FEE    CNCSION   
 000001     2      BBBB       VB          200     PUNE     5,000      500.00   
 000002     3      CCCCC      AS400       300     BOMB    30,000    3,000.00   
 000003     4      DDDDD      VB          200     NASH     5,000      500.00   
 ****** ********  End of report  ********                                      
         








                                                                     

                                                                       Bottom  
 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           
          

Select Collating Sequence
                                                                    
                                Define the Query                               
                                                                                
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                               
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                    
                                                                               
 Opt    Query Definition Option                                                
      > Specify file selections                                                
      > Define result fields                                                   
      > Select and sequence fields                                             
      > Select records                                                         
      > Select sort fields                                                     
  1     Select collating sequence                                               
        Specify report column formatting                                       
        Select report summary functions                                        
        Define report breaks                                                    
        Select output type and output form                                     
        Specify processing options                                             
                                                                                
 F3=Exit            F5=Report          F12=Cancel                              
 F13=Layout         F18=Files          F21=Select all                          

 HIT Enter     

                 
                           Select Collating Sequence                           
                                                                               
 The selected collating sequence will be used for character fields when        
 sorting, selecting records, joining files, finding minimum and maximum        
 values, and determining when a control break has occurred.                    
                                                                               
                                                                                
 Type choices, press Enter.                                                    
                                                                               
   Collating sequence                                                           
     option . . . . . . .   1              1=Hexadecimal                       
                                           2=Query for iSeries English         
                                           3=Define the sequence               
                                           4=Translation table                 
                                           5=System sort sequence              
                                                                               
   For choice 4=Translation table:                                             
     Table  . . . . . . .                  Name, F4 for list                   
       Library  . . . . .                  Name, *LIBL, F4 for list            
                                                                                
                                                                               
 F3=Exit            F4=Prompt          F5=Report          F10=Process/previous 
 F12=Cancel         F13=Layout         F17=Job sequence   F24=More keys        
                                                                                                                                      


Report column formatting

                                Define the Query                                
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535            
                                                                               
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                    
                                                                                
 Opt    Query Definition Option                                                
      > Specify file selections                                                
      > Define result fields                                                   
      > Select and sequence fields                                             
      > Select records                                                         
      > Select sort fields                                                      
        Select collating sequence                                              
  1     Specify report column formatting                                       
        Select report summary functions                                         
        Define report breaks                                                   
        Select output type and output form                                     
        Specify processing options                                              
             

                                                                 
 F3=Exit            F5=Report          F12=Cancel                              
 F13=Layout         F18=Files          F21=Select all                           
                                                                               












                        Specify Report Column Formatting                       
                                                                                
 Type information, press Enter.                                                
   Column headings:  *NONE, aligned text lines                                 
                                                                               
                   Column                                                      
 Field             Spacing       Column Heading               Len  Dec   Edit  
 ROLL                 0          ROLL NO                        3    0         
                                                                                
 SNAME                1          STUD NAME                      5              

 CORS                 1          CORS NAME                      5              

 CCD                  1          CORS CODE                      3    0         
                                                                                
 ADD                  1          ADRS                           5              
                                                                            
 FEES                 1          CORS FEE                       5    0         

 CONS                 3          CNCSION                        7    2       
                                                                              

                                                                        
 F3=Exit         F5=Report       F10=Process/previous     F12=Cancel           
 F13=Layout      F16=Edit        F18=Files                F23=Long comment     
                                                                               

Output
                                 Display Report                                
 Query . . . :   PB07U01D/QRY1                Report width . . . . . :      65  
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+      
        ROLL NO STUD NAME CORS NAME CORS CODE ADRS  CORS FEE     CNCSION       
 000001     2     BBBB      VB         200    PUNE    5,000       500.00       
 000002     3     CCCCC     AS400      300    BOMB   30,000     3,000.00       
 000003     4     DDDDD     VB         200    NASH    5,000       500.00       
 ****** ********  End of report  ********                                      











                                                                       Bottom  
 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           
                                                                                
Report summary functions


                                Define the Query                               
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                               
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                    
                                                                               
 Opt    Query Definition Option                                                 
      > Specify file selections                                                
      > Define result fields                                                   
      > Select and sequence fields                                              
      > Select records                                                         
      > Select sort fields                                                     
        Select collating sequence                                               
      > Specify report column formatting                                       
  1     Select report summary functions                                        
        Define report breaks                                                    
        Select output type and output form                                     
        Specify processing options                                             
                      

                                                        
 F3=Exit            F5=Report          F12=Cancel                              
 F13=Layout         F18=Files          F21=Select all                          
                                                                               


                        Select Report Summary Functions                        
                                                                               
 Type options, press Enter.                                                    
   1=Total   2=Average   3=Minimum   4=Maximum   5=Count                       
                                                                               
 ---Options---    Field                                                        
                  ROLL                                                          
                  SNAME                                                        
                  CORS                                                         
                  CCD                                                           
                  ADD                                                          
       3  4       FEES                                                         
 1           5    CONS                                                          
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                       
                                                        
                                                                        Bottom 
 F3=Exit         F5=Report       F10=Process/previous      F11=Display text    
 F12=Cancel      F13=Layout      F18=Files                 F23=Long comment    
 

Output                                                                             


                                 Display Report                                
 Query . . . :   PB07U01D/QRY1                Report width . . . . . :      69 
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....  
        ROLL NO STUD NAME CORS NAME CORS CODE ADRS  CORS FEE         CNCSION   
 000001     2     BBBB      VB         200    PUNE    5,000           500.00   
 000002     3     CCCCC     AS400      300    BOMB   30,000         3,000.00   
 000003     4     DDDDD     VB         200    NASH    5,000           500.00   
 000004                                                                        
 000005                                        FINAL TOTALS                    
 000006                                        TOTAL                4,000.00   
 000007                                        MIN    5,000                    
 000008                                        MAX   30,000                    
 000009                                        COUNT                       3   
 ****** ********  End of report  ********                                      
                                                                       Bottom  





 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           

Report  breaks

                                Define the Query                               
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                               
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                     
                                                                               
 Opt    Query Definition Option                                                
      > Specify file selections                                                
      > Define result fields                                                   
      > Select and sequence fields                                             
      > Select records                                                          
      > Select sort fields                                                     
        Select collating sequence                                              
      > Specify report column formatting                                        
      > Select report summary functions                                        
  1     Define report breaks                                                   
        Select output type and output form                                      
        Specify processing options                                             
  
                                                                            
 F3=Exit            F5=Report                                                  
 F13=Layout         F18=Files          F21=Select all                          
 Select options, or press F3 to save or run the query.                                                                                                          

Press enter
                              Define Report Breaks                             
                                                                               
 Type break level (1-6) for up to 9 field names, press Enter.                  
   (Use as many fields as needed for each break level.)                        
                                                                               
 Break    Sort                                                                 
 Level    Prty    Field                                                         
               10      ROLL                                                         
                         SNAME                                                        
   1                    CORS                                                          
                         CCD                                                          
                         ADD                                                          
                         FEES                                                          
                         CONS                                                         
                                                                               

                                                                       
                                                                        Bottom 
 F3=Exit         F5=Report        F10=Process/previous     F11=Display text    
 F12=Cancel      F13=Layout       F18=Files                F23=Long comment    

Press enter

                               Format Report Break                             
                                                                               
 Break level  . . . . . . . :   0                                               
                                                                               
 Type choices, press Enter.                                                    
   (Type &field in text to have break values inserted.)                        
                                                                                
           
   Suppress summaries . . . .   N           Y=Yes, N=No                        
                                                                               
   Break text . . . . . . . .   COURSE TOTALS                                  
                                                                               

 Level  Field                                                                  
   1    CORS 
  



                                                              
 F3=Exit           F5=Report          F10=Process/previous     F12=Cancel      
 F13=Layout        F18=Files          F23=Long comment                          

Press enter
                                                                               
                                     Format Report Break                             
                                                                               
 Break level  . . . . . . . :   1                                              
                                                                               
 Type choices, press Enter.                                                    
   (Type &field in text to have break values inserted.)                        
                                                                               
   Skip to new page . . . . .   N           Y=Yes, N=No                        
                                                                                
   Suppress summaries . . . .   N           Y=Yes, N=No                        
                                                                               
   Break text . . . . . . . .                                                   
                                                                               
                                                                               
                                                                                
 Level  Field                                                                  
   1    CORS                                                                   
                                                                               
                                                                               
                                                                               
                                                                               
 F3=Exit           F5=Report          F10=Process/previous     F12=Cancel      
 F13=Layout        F18=Files          F23=Long comment                         

Output

                                 Display Report                                
 Query . . . :   PB07U01D/QRY1                Report width . . . . . :      69 
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+....4....+....5....+....6....+....  
        ROLL NO STUD NAME CORS NAME CORS CODE ADRS  CORS FEE         CNCSION   
 000001     2     BBBB      VB         200    PUNE    5,000           500.00   
 000002                                                                        
 000003                                        TOTAL                  500.00   
 000004                                        MIN    5,000                    
 000005                                        MAX    5,000                    
 000006                                        COUNT                       1   
 000007                                                                        
 000008     3     CCCCC     AS400      300    BOMB   30,000         3,000.00   
 000009                                                                         
 000010                                        TOTAL                3,000.00   
 000011                                        MIN   30,000                    
 000012                                        MAX   30,000                    
 000013                                        COUNT                       1   
 000014                                                                        
 000015     4     DDDDD     VB         200    NASH    5,000           500.00   
 000016                                                                         
 000017                                        TOTAL                  500.00 
 000018                                        MIN    5,000                  
 000019                                        MAX    5,000                  
 000020                                        COUNT                       1 
 000021                                                                      
 000022                                        COURSE TOTALS                 
 000023                                        TOTAL                4,000.00 
 000024                                        MIN    5,000                  
 000025                                        MAX   30,000                   
 000026                                        COUNT                       3                                                                         
 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           
     




Output Type and Output Form


                                Define the Query                               
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                               
 Type options, press Enter.  Press F21 to select all.                           
   1=Select                                                                    
                                                                               
 Opt    Query Definition Option                                                
      > Specify file selections                                                
      > Define result fields                                                   
      > Select and sequence fields                                             
      > Select records                                                          
      > Select sort fields                                                     
        Select collating sequence                                              
      > Specify report column formatting                                       
      > Select report summary functions                                        
      > Define report breaks                                                   
  1     Select output type and output form                                      
        Specify processing options                                             
       

                                                                       
 F3=Exit            F5=Report          F12=Cancel                               
 F13=Layout         F18=Files          F21=Select all                          
                                                                               

Press enter

                       Select Output Type and Output Form                       
                                                                               
 Type choices, press Enter.                                                    
                                                                                
   Output type  . . . . . . . . . . .   1     1=Display                        
                                              2=Printer                        
                                              3=Database file                  
                                                                                
   Form of output . . . . . . . . . .   2     1=Detail                         
                                              2=Summary only                   
                                                                                
   Line wrapping  . . . . . . . . . .   N     Y=Yes, N=No                      
     Wrapping width . . . . . . . . .         Blank, 1-378                     
     Record on one page . . . . . . .   N     Y=Yes, N=No                      
                                                                                

 F3=Exit           F5=Report           F10=Process/previous                    
 F12=Cancel        F13=Layout          F18=Files                               
                                                                                  

Press enter





Output

                                 Display Report                                
 Query . . . :   PB07U01D/QRY1                Report width . . . . . :      36 
 Position to line  . . . . .              Shift to column  . . . . . .         
 Line   ....+....1....+....2....+....3....+.                                   
         CORS NAME    CORS FEE         CNCSION                                    
 000001    VB                                                                  
 000002       TOTAL                    500.00                                    
 000003       MIN      5,000                                                      
 000004       MAX      5,000                                                     
 000005       COUNT                       1                                    
 000006                                                                         
 000007    AS400                                                               
 000008       TOTAL                    3,000.00                                    
 000009       MIN      30,000                                                      
 000010       MAX      30,000                                                     
 000011       COUNT                       1                                    
 000012                                                                         
 000013    VB                                                                  
 000014       TOTAL                    500.00                                    
 000015       MIN      5,000                                                      
 000016       MAX      5,000                                                     
 000017       COUNT                       1 
 000018                                     
 000019       COURSE TOTALS                 
 000020       TOTAL                    4,000.00 
 000021       MIN      5,000                  
 000022       MAX      30,000                  
 000023       COUNT                       3 
 ****** ********  End of report  ********   
                                                                                                                  More...  
 F3=Exit      F12=Cancel      F19=Left      F20=Right      F21=Split           

Processing Options

                                Define the Query                                
                                                                               
 Query . . . . . . :   QRY1              Option  . . . . . :   CHANGE          
   Library . . . . :     PB07U01D        CCSID . . . . . . :   65535           
                                                                                
 Type options, press Enter.  Press F21 to select all.                          
   1=Select                                                                    
                                                                                
 Opt    Query Definition Option                                                
      > Specify file selections                                                
      > Define result fields                                                    
      > Select and sequence fields                                             
      > Select records                                                         
      > Select sort fields                                                      
        Select collating sequence                                              
      > Specify report column formatting                                       
      > Select report summary functions                                         
      > Define report breaks                                                   
      > Select output type and output form                                     
  1     Specify processing options                                              
         

                                                                     
 F3=Exit            F5=Report          F12=Cancel                              
 F13=Layout         F18=Files          F21=Select all                          


  
                            Specify Processing Options                         
                                                                               
 Type choices, press Enter.                                                    
                                                                                
   Use rounding . . . . . . . . . . .          Blank, Y=Yes, N=No              
                                                                               
   Ignore decimal                                                               
     data errors  . . . . . . . . . .          Blank, Y=Yes, N=No              
                                                                               
   Ignore character                                                             
     substitution warnings  . . . . .   Y      Y=Yes, N=No                     
                                                                               
   Use collating sequence for                                                   
     all character comparisons  . . .   Y      Y=Yes, N=No                     
                                                                              
                                                                                
 F3=Exit           F5=Report           F10=Process/previous                    
 F12=Cancel        F13=Layout          F18=Files                               
                                                                                                                                                                                                                                                                                                                                                                                                                      

No comments:

Post a Comment