Home
Progress Results User`s Guide for UNIX
Contents
1. Database Customer Inventory Sheets Figure 1 1 Paper and Electronic Filing System Comparison Results Overview Another way you can think of a database table is to view it as a paper table that you use to organize and present data A paper table is made up of rows and columns The intersection of each row and column contains one specific piece of data Similarly in a database table each row contains all the individual pieces of information about one member A row in the database table is called a record In the paper filing system each folder in a filing cabinet contains the equivalent of a row or record For example the Customer filing cabinet contains one folder on Second Skin Scuba and another for Off the Wall Sports When All Around Sports creates its database the Customer table will contain one record for Second Skin Scuba and another for Off the Wall Sports In a database table each discrete piece of information also represents the intersection of a row and column and is called a field In addition to the data each field in a record includes a descriptive name just like the column heading in a paper table For example the customer s name is one piece of information and that information is stored in a field lab
2. Defines a math expression and adds it as a column in the report Once you select this option a window shows the operations you can perform e Add Subtract e Multiply Divide e Raise to a Power This is a menu driven process that enables you to select the elements to build a simple or complex math expression To build a short expression select an operation and the appropriate field s or number s To build a long expression just keep adding options and values to the expression by entering Yes to continue Progress Results User s Guide for UNIX Results automatically enters parentheses in long expressions It assumes a left to right evaluation For example if you use the menus to enter the following expression 4 5 6 7 Results uses parenthesis to make it 4 5 6 7 Or if you enter 2 4 3 6 it becomes 2 4 3 6 See Appendix F Order of Evaluation for more information about evaluating expressions This option inserts the column into the Layout window the same way as Running Totals except that in the Reports module the default label is Math Value and the marker n shows that this is a numeric expression field String Expressions Defines a string calculation and adds the expression as a column in the report Once you select this option a window appears with the operations you can perform e Constant or Field Substring e Combine Two Strings e Combine Three Strings e Combine Four Strings
3. ELSE IF qbf rct qbf i 2 THEN date qbf c STRING DAY qbf rcn qbf i 100 MONTH qbf rcn qbf i 10000 YEARC qbf rcn qbf i 99999999 ELSE IF qbf rct qbf i 3 THEN logical qbf c TRIMCSTRING qbf rcn qbf i true false ELSE qbf c qbf rcn qbf i PUT STREAM qbf io UNFORMATTED SKIP E qbf c IF qbf i qbf rc THEN SKIP ELSE END end the program PUT STREAM qbf io UNFORMATTED gt SKIP END SKIP RETURN SKIP RETURN You can edit this u browse p program or define your own then enable it through the User Defined Export Format option in the Administration module 10 21 Progress Results User s Guide for UNIX 10 10 Designing Your Own Print Menu 10 22 You can design and include your own print menu to replace the print menu in Results To include your own print menu in the Administration module you must delete all print devices except one and give it the type prog Then set the device name to the name of the user print menu When users select the Run option your printer menu program runs and the user sees the default scrolling list of printer devices Results generates the procedure usually qbf p then does the following RUN VALUECdevice name INPUT program to run A user program might be something simple like DEFINE INPUT PARAMETER program to run AS CHARACTER NO UNDO DEFINE VARIABLE elapsed time
4. 0 mn xxviii Heference see ee edem xe er ee Rm dex aee etm xxviii 1 Results Overview nisse adea aaie a aa A nh n nnn 1 1 1 1 IntrOQuctiori 2 ig ctus i edo xxt eme SAREE SANE e x ED rx e 1 2 1 2 Database Terms 0 00 cece tees 1 3 1 3 Database Basics i eri eosa a a E E E A eae 1 3 1 3 1 Table Relationships llis 1 8 1 4 An Overview of Results 2 0 0 0 aunan ccc teens 1 9 1 4 1 QUEN I erm xa e ed ea a e Pay C Pa res 1 10 1 4 2 Heports 246 ets Sete us to Se he es pL M LL LUE Us 1 10 Contents 1 4 3 Eabels yd reru deua educa 1 10 1 4 4 Data Export tice ess Eee oe ea mE euh 1 10 1 4 5 USOr ose tA m catre Be ELENA E St 1 11 1 4 6 Administration simum teni A a eR 1 11 1 4 7 zi p 1 11 1 5 Accessing Help sss nem esee br Eee eet ds 1 12 1 6 Sutntriapo sonar or eec LU M DM cL t Met e LA n its 1 13 General Information 000 0 e eee ees 2 1 2 1 Installing and Accessing Results 0 0 00 eee eee eee 2 2 2 1 1 The DLCRES Environment Variable 2 2 2 1 2 The PROPATH Environment Variable 2 3 2 1 3 Progress Startup Parameters 0000 cee eeeee 2 3 2 1 4 Starting Results 2 eee 2 3 2 2 Results Keystrokes een RE Ea SE EE e i 2 4 2 3 Window AaS iesu SER ure etae OE T TIEA 2 7 2 3 1 Menu Options aiaa i cre n ue E ve a a a eis 2 8 2 3 2 Information Window 000 ee n 2 8 2 3 3 Layout WINdOW ropie reduty ie ne tm a
5. Adding text and fields to labels Adjusting format and print settings NOTE Several of the Labels module options are described in the tour in Chapter 3 A Tour Through Results and are not described in this chapter The steps in this chapter build upon what you learned in the tour of Results You should complete or review the tour before continuing with this chapter This chapter assumes that the Labels module is available in your Results package If it is not see your database administrator Progress Results User s Guide for UNIX 6 1 6 2 Introduction You use the Labels module to generate your own mailing labels and other types of labels You can have labels automatically laid out for you or you can lay them out yourself You also can control the label output For example you can mix field and text information omit blank lines define the total label height adjust the left margin define the number of labels to print across a page and adjust the horizontal spacing between labels You can also have labels print in a specific order For example you can create a label format to leave room for pre printed company logos then print the labels in order by sales region The Labels module window is divided into three sections horizontal menu information window and layout window This chapter describes the horizontal menu options For details on the information and layout windows see Chapter 3 A Tour Through Results
6. Labels Module Main Menu Horizontal menu options appear at the top of each window throughout the Labels module as shown in Figure 6 1 Figure 6 1 Labels Module Main Menu In some cases you see a subset of these options For example you only see the options you can pick when you do not have any files defined for a label in the Label Info window The following list provides brief descriptions of all the menu options and suboptions available in the Labels module The Get Put Run Where Order and Clear options work the same way as they do in the Data Exports and Reports modules For complete descriptions see Appendix B Option Descriptions If you do not have all of the options listed in this chapter see your database administrator Get Retrieves an existing label definition into the Labels window You can get a label definition you have defined or if you have permission you can get a copy of a label definition from someone else s directory Put Saves the current label definition Labels Module Run Prints labels as they are currently laid out in the Label Layout window You can preview the labels on the display print them to a file or route them directly to a printer Define Defines the files and fields for label information You can select fields from a list or you can have Results select the fields automatically Settings Controls general output settings for your labels Where Builds a WHERE clause
7. A Tour Through Results By File Name The same list shows the names of the files used to make the forms The database name appears in parentheses so you know which database contains the file All of the files in the following example are in the mysports database because that is the database you used to start Results for the tour When you start with another database or more than one database you see other database names in parentheses Select Query Form Ci er H Invoice Item Local Default Order Order Line Ref Call Salesrep State Cmysports mysports mysports imgsports mysports mysports Cmysports mysports File 1 af 8 By Program Name Results automatically creates these program names using the first eight characters of the database filename If any of these names is already used by other programs it creates names like qryxxxxx p for the programs where xxxxx represents a unique integer value Thus each query form has its own unique program name so new query forms do not overwrite existing query forms that have the same name m Select gs Form 4 Invoice p Item p Lacal le p rder p Order Li p Ref Call p Salesrep p State p Prag 2 Press MODE to toggle to each type of list 3 Toggle back to the description form list In this tutorial you work only with the description list There are two ways to select a form from the lis
8. Figure 7 2 Sample of Progress Export Format This format consists of one record per line with the beginning and end of each character field denoted by double quotes and a space separating each field You can select the export type you want before or after you select the fields for the report You can select fields using the Define option or you can transfer them from the Reports module using the Module option In this example you select the fields in the Data Export module l Define the report you want to export For example select the files then the fields you want to export Then define any order criteria and calculated fields that you want to include Also define WHERE clause criteria if you want a subset of records For information on selecting files and fields defining order and WHERE criteria or defining calculated fields see Chapter 3 A Tour Through Results 2 Press GO to insert the fields in the layout The files and the file relation information appear in the Data Export Info window and the fields appear in the Data Export Layout window Progress Results User s Guide for UNIX This window also shows all of the fields you selected in the order you selected them Notice that the fields are prefixed by the name of the database and file they come from The default export type Progress appears in the Export Type field Get Put Run JEG Settings Where Order Clear Info Module User Exit Data Export Info mysp
9. 1 Select Put A window appears to let you save the current report Get Run Define Settings Where Order Clear Info Module User Exit Report Info Files mysports Customer Chi Report to Save If you had saved other reports they would be listed here 2 Press RETURN to save the report as a new report A window appears to let you enter a descriptive title for the report Det Run Define Settings Where Order Clear Info Module User Exit Report Info Files mysports Customer 1 mysports Order 1 myspor i myspor Enter description of report Order You can give the report any name that is meaningful to you Name this report Order Line Report 3 Type Order Line Report and press RETURN 4 Select Clear to clear the report from the screen A prompt appears to let you verify that you want to clear the report 5 Select Yes If you did not save the report the screen would clear and you would lose the report you just defined NOTE If you select Clear when there is no report information on the screen a window appears from which you can select saved report definitions to delete 3 27 Progress Results User s Guide for UNIX 3 28 3 4 4 Getting a Report Follow these steps to use the Get option to retrieve a saved report le 2 Select Get You see a list that contains your new report s title Run Define Settings Clear Module User Exit Repor
10. Page spacing in reports defaults 3 50 Page spacing adjusting reports B 17 Parentheses F 2 Percent of total defining B 13 marker p B 13 Percent of Total adding to reports 5 16 Permissions for queries 9 16 for Results modules 9 16 Permissions file for query forms 9 11 Porting applications 9 8 Portrait 9 20 Position marker 3 15 Prev option 3 11 described 4 4 B 7 Primary indexes defined 1 3 Print menu user defined 10 22 Printer Setup option 9 18 Printing devices maximum per system D 1 wide reports 9 18 Printing labels 6 6 Procedure files See p file Procedures Results using in applications 10 17 prodb command 3 3 Progress data export format 7 7 Progress editor A 6 Progress CREATE command 3 3 PROMSGS environment variable 9 2 PROPATH and query definition files 9 5 9 6 PROPATH environment variable 2 3 protermcap file 9 18 Put option described 5 3 B 4 Index Q qbf dhi variable 10 8 qbf file variable 10 10 qbf module variable 10 5 10 6 qbf name variable 10 8 qbf of variable 10 10 qbf order variable 10 9 qbf rc variable 10 12 qbf rca variable 10 12 qbf rcf shared variable 10 12 qbf rcl variable 10 12 qbf rcn variable 10 12 qbf rct variable 10 12 qbf rcw variable 10 12 qbf vers variable 10 6 qbf where variable 10 10 qc file E 2 qd file E 3 ql file E 3 qryxxxxx f file 9 6 qryxxxxx i file 9 6 qryxxxxx p file 9 6 Query directory file See
11. Progress Results User s Guide for UNIX 3 52 2 Select Data Export Results brings up the Data Export module TH Put Run Define Settings Where Order Clear Info Module User Exit Data Export Info mysports Customer WHERE mysports Customer Sales Rep sls OR mys mysports Order mysports Order Line mysports Item BY mysports Customer Mame musports mysports musports Export Tupe Record start Record end Field delimiter Field separator Load a previously Data Export Layout Customer Mame mysports Order Order num rder Line Line num muysports Item Item Mame rder Line Gtu musports 0rder l ine Price dqbf o07 PROGRESS Headers export names as first record cr 1f ro defined export Notice that some of the information you defined in the Report module was automatically transferred to this module For example the files you selected the WHERE clause and the order criteria you defined in the Reports module are now in this module Some of the information from the Reports module didn t transfer over for example field names hidden repeating values and totals and subtotals do not appear You can define a data export report based on the file relation information you just transferred In addition you can expand or delete the default information For example you can use the submenu options of the Define option to add fields counters and calculated fields just as you did in th
12. Select the Order option A window appears that lists all of the fields in the active files You can use any of these fields to change the order of the records in the report Also you can order records by more than one field For example you can put the records in order by state and by customer number within each state Select the first field you want to use to order the records As you select the fields for the report Results numbers them in the order you select them If you select a field by mistake highlight it again and press RETURN to deselect it You can also type a number next to the field and the other selected fields will renumber automatically Continue to select the fields in the sequence you want to order the records Press GO when you are done A window appears that lets you choose the order ascending or descending for each order field For each component tupe a for ascending or d for descending Bsc mysports Customer State asc mysports Customer Cust Num Enter the type of order you want for each field For example if you put character fields in descending order they appear in the report in reverse alphabetical order 5 15 Progress Results User s Guide for UNIX 6 Press GO or RETURN to apply these changes The order definition appears in the Report Info window For example this figure shows a sample order definition Get Put Run Define Settings Where mE Clear Info
13. 3 Select Join A list of the files related to the customer record appears Next Prev First Last Add Update Copy Delete View Browse Query Where Total Order Module Info User Exit Cust Numt 15 Country USA i Namez Thundering Surf Inc Address 354 Market St Join City Coffee City Statet Contact Fran Horan Order imusparts Credit Limit 16 300 Ref Call imusportz liscountz 40 Salesrep mysports Comments State Cmysports 1 of h You can join files if they have one field or a number of fields in common 4 Select Order to see the order records for customer 16 The window in the figure below displays a subset of information default fields from the order file Prev First Last Add Update Copy Delete Browse Join Query Where Total Module Info User Exit tomer Cust Numt 16 Counte Mame Thundering Surf Inc Subset m g rder Order num 23 Cust Numt 16 Ordered 01 12 93 Shipped 02 05 93 Promised 027 05 93 Carrier FluBuMight Courier Instructions PO Terms Metso Sales Rep JAL Note the following about the display e There are fewer options on the horizontal menu the View and Order options are gone when you are working within a subset of information e Thetitle at the top of the order form indicates that you are in a subset Therefore the options that you select will display order information only for the current customer Thundering Surf 3 17 Progress Results User s Guide f
14. 7 43 704 05 bics vline ET 141 4 Enee Guards 28 15 420 Aerobics vline KY 141 5 Hockeu puck 58 7 43 424 42 5 Return to the Data Export screen and save the current definition under any name you like 6 Select the Clear option This clears the current definitions from the screen For more information about the Data Export module see Chapter 7 Data Export Module 3 6 The Labels Module This section of the tour shows you how to use some of the features in the Labels module to create mailing labels For more information about the Labels module see Chapter 6 Labels Module If you save your definitions you can leave the tour of the Labels module at the end of any section When you want to start again retrieve the saved definition and start where you last ended your session In this exercise you create a mailing label and add field and text information to it Before you start this tour clear the Data Export definition from the screen 1 Select the Module option 2 Select the Labels module from the list 3 Select Define from the horizontal menu 3 55 Progress Results User s Guide for UNIX 3 56 4 5 Select the Customer file Press END to end your selection Results prompts you to accept the automatic selection of fields for the label If you select No the screen leads you through a manual selection process to pick the fields for the label For more information
15. CONNECTED logical name alias Ellipses a indicate that you can choose one or more of the preceding items If a group of items is enclosed in braces and followed by ellipses you must choose one or more of those items If a group of items is enclosed in brackets and followed by ellipses you can optionally choose one or more of those items In this example you must include two expressions but you can optionally include more Note that each subsequent expression must be preceded by a comma SYNTAX MAXIMUM expression expression expression ww P In this example you must specify MESSAGE then at least one of expression or SKIP but any additional number of expression or SKIP is allowed SYNTAX MESSAGE expression siae em 3 In this example you must specify include file then optionally any number of argument or amp argument name argument value and then terminate with SYNTAX include file argument amp argument name argument value oon xix Progress Results User s Guide for UNIX In some examples the syntax is too long to place in one horizontal row In such cases optional items appear individually bracketed in multiple rows in order left to right and top to bottom This order generally applies unless otherwise specified Required items also appear on multiple rows in the required order left to right and top to bottom In cases where grouping and order might ot
16. Press GO to insert the new header or footer in the Report Layout window or press END to cancel your changes The header or footer appears in the Report Layout window Report Layout My First Report Page PAGE Region Country x12 xD xm xCD NOTE First page only headers and last page only footers do not appear in the Report Layout window However they appear when you run the report When you define three types of headers or footers for a report they print differently depending on the available header space If there is enough room to fit all three values across they print three across Otherwise the center header prints first then the left and right headers appear on the next two lines 5 13 Progress Results User s Guide for UNIX 5 14 5 4 5 Adjusting Spacing in a Report This section describes how to adjust spacing in your report For example you can use the Spacing options to adjust the left margin change the line spacing within the report and determine the number of lines between the header and body of the report le 2 3 Select the Settings option then select the Spacing option The following window appears Spacing Option Current Default Left margin Di Spaces between columns l 4 Starting line ii Lines per page EE BB Line spacing i d Lines between header and body O Lines between body and footer Oo o This window displays the current and de
17. Progress Results User s Guide for UNIX 9 2001 Progress Software Corporation All rights reserved Progress software products are copyrighted and all rights are reserved by Progress Software Corporation This manual is also copyrighted and all rights are reserved This manual may not in whole or in part be copied photocopied translated or reduced to any electronic medium or machine readable form without prior consent in writing from Progress Software Corporation The information in this manual is subject to change without notice and Progress Software Corporation assumes no responsibility for any errors that may appear in this document The references in this manual to specific platforms supported are subject to change Progress Progress Results Provision and WebSpeed are registered trademarks of Progress Software Corporation in the United States and other countries Apptivity AppServer ProVision Plus SmartObjects IntelliStream and other Progress product names are trademarks of Progress Software Corporation SonicMQ is a trademark of Sonic Software Corporation in the United States and other countries Progress Software Corporation acknowledges the use of Raster Imaging Technology copyrighted by Snowbound Software 1993 1997 and the IBM XML Parser for Java Edition IBM Corporation 1998 1999 All rights reserved U S Government Users Restricted Rights Use duplication or disclosure restricted by GSA ADP Schedule Contract
18. The Browse list appears in a window that has a position marker at the bottom to tell you how much of the list is shown The markers are All Shown At Top when the top is shown and At Bottom when the bottom is shown The marker remains empty if the top and bottom of the list are not shown When you choose this option after selecting a subset of information using the Join Where or Query options Browse only displays summary information about the records in the subset you are working with Join Option Descriptions Joins to a related file and enables you to query the records related to the current active record When you select this option a window pops up with a list of the files that you can join to the current file See Chapter 9 Database Administration for details on how to establish join relationships Query Queries the current file using a Query By Example interface Choosing this option places you in a blank copy of the current screen form where you may enter an operator for example use gt for greater than gt for greater than or equal to and so on and then the value for the query Select this option then press the HELP key F2 or CTRL W to see a complete list of comparisons Once you press GO F1 or CTRL X the software applies the selection criteria to the current active file and places you in the main Query screen using the subset of data you selected The list of fields you can enter Query criteria
19. The Insert mode indicator appears in the lower right corner of the screen Note that there is no mode indicator for the Overstrike mode 5 tmusports Customer Postal Code lo El tmusports Customer Country 71 fnusports Customer Contact 8l a Press F1 to save F5 to add field F4 to undo Insert 3 Type Attn followed by two spaces then press GO to insert the changes into the label layout This places Attn before the contact s name on the label Label Layout Omit Blank Lines yes Total Height 6 Text to Text Spacing iwidth Copies of Eacht 1 Top Margins 0 Left Margin Indent 0 o tmysports Customer Name I I mysports Customer Address o tmysports Customer Address2 l mysports Customer Cityt tmysports Customers o tysports Customer Postal Code I a Label Text gt and Fields gt Number of Labels Across Xmusports Customer Country o Attn tmysports Customer Contacts al Select files and fields 3 59 Progress Results User s Guide for UNIX 3 60 4 Run the labels on your terminal The following labels appear on your screen Lift Line Skiing 275 North Street oston H 02114 USA Attnt Gloria Shepley Urpon Frisbee Rattipolku 3 Valkeala Uusimaa 45360 Finland Attn Urpo Leppakoski Hoops Croquet Co Suite 415 40 Grove St Hingham H 0
20. qc file extension 9 3 9 12 Index qd file extension 9 15 ql file extension 9 5 10 24 lt gt function delimiter 3 48 5 12 B 18 unknown database name 6 5 in Report Info list 3 28 function delimiter 3 48 5 12 B 18 operator 4 10 A a average report marker 5 8 B 12 Active fields B 10 selecting B 11 Active files selecting 3 21 B 11 Active report 5 7 Add option 3 12 described 4 5 B 7 Adding fields to data export formats 7 7 records 3 12 All Shown position marker See Position Progress Results User s Guide for UNIX marker AND operator 3 46 Application Rebuild option 9 8 Application deploying See Deploying Array fields defined 5 10 ASCII data export formats 7 10 to 7 12 ASCII data export options B 22 Ask mode Expert mode 5 19 invoking in WHERE clause builder 2 4 shared variables 10 10 WHERE clause 5 19 At Bottom position marker See Position marker At Top position marker See Position marker Audience xiii Average report marker a B 12 Blank lines omitting in labels 6 10 Bold typeface as typographical convention xvi Break groups creating 3 37 3 38 creating totals 5 7 defined 3 37 B 12 example 3 41 Browse list 9 10 changing temporarily 3 15 Browse option 3 14 adding fields 3 15 maximum number 3 16 described 4 5 B 8 Index 2 Browse Program for Query option 924 Browse user defined 9 24 C count report mar
21. separates each field Follow these steps to export data in ASCII format le 2 3e 4 5 Define the report you want to export Select the Settings option A list of possible export formats appears Select an ASCII format This window appears When entering codes these methods may be used and mixed freely x literal character enclosed in single quotes x interpreted as control character ih one or tuo hex digits Followed by the letter h 44 one two or three digits a decimal number Press F5 ta toggle Expert Mode on and off Record start i Record endt Field delimiter Field separator 7 7 This window shows the default ASCII settings For example the first line of the format grid shows that no characters are defined to mark the beginning of a record The second line shows the characters that mark the end of a record In this case the default is cr lf meaning carriage return line feed The second and third lines define that the fields are surrounded by double quotes and separated by commas Use this window to override the defaults For example you can change the settings so that an asterisk marks the start of each record and the exclamation points delimit the fields Enter new settings then press GO to accept the settings and exit the Settings option The settings appear in the Data Export Layout window Run the report on your terminal Dat
22. 450 0087 Sales Rep HM Credit Limit 66 700 Balance 42 558 00 Terms Metz Discount 352 Comments This customer is on credit hold Next record 3 10 A Tour Through Results This form shows you information about customer number 1 in the customer file of the mysports database Each customer record appears in this format The next section describes how to view other records There is a menu of options at the top of each form There are two ways to select an option RETURN or GO to select the form Highlight the option with the and keys SPACEBAR or TAB key and press Type the first letter of the option Results highlights the option and selects it NOTE Your database administrator can set Results to default to the European numeric format by setting the European Numeric Format E startup option If that startup option is set the numbers on your screen appear in European numeric format For more information about the E startup option see Appendix C Field Display 3 3 1 Select Formats Finding the Next Prev First and Last Records This section shows you how to find the next previous first and last records in the customer file using the Next Prev First and Last options These options let you easily move through a set of records Next to examine the next record in the customer file umm Prev First Last Add Update Copy Delete View Browse Join Query ere Total Order Module In
23. 7 running reports 7 8 settings 7 7 7 8 7 11 using Expert mode in defining formats 7 11 Index Database copy commands 3 3 defined 1 3 structure 1 3 Database security See Sign on Date data type default format C 8 display formats C 8 alternative C 9 European C 9 expressions defining B 15 types B 15 marker d B 16 Date Format d startup parameter 2 3 db Database Name connection parameter A 4 dbname qc file 9 3 dbname q file 9 6 Decimal data types display format C 4 Default Report Settings option 9 24 Defaults display formats C 5 European C 5 Define option described 5 4 7 3 B 10 Defining non Progress data export formats 7 8 Defining reports 3 21 Delete option 3 14 described 4 5 B 8 Deleting a WHERE clause 3 54 Deleting data export formats 7 5 Deleting label definitions 6 3 Deleting labels 6 6 Index 3 Progress Results User s Guide for UNIX Deleting records 3 14 Deleting reports 3 27 Deleting totals and subtotals from reports 3 39 Deploying application with customized interface 10 24 Directory entries maximum D 1 Display formats character data types C 3 date C 8 decimal and integer data types C 4 defaults C 2 data types C 2 European C 2 overriding C 9 European numeric 3 11 3 33 logical data types C 8 numeric C 4 European B 18 C 5 testing C 9 DLCRES environment variable 2 2 E E startup parameter 2 3 3 11 3 33 Editing k
24. 9 15 Terminal Color Settings Screen llllllieslleisssrn 9 21 Terminal Color Settings Example 0000e eee eeeee 9 22 Tables Table 2 1 Table 2 2 Table 3 1 Table 3 2 Table 3 3 Table 4 1 Table 4 2 Table 5 1 Table 9 1 Table 10 1 Table 10 2 Table 10 3 Table 10 4 Table B 1 Table C 1 Table C 2 Table C 3 Table C 4 Table C 5 Table C 6 Table C 7 Table E 1 Table F 1 Table F 2 Results Function Key Defaults llli Other Editing Keys Database Copy Command 0 00 cece eee eens Starting Results with the mysports Database Field Information for New Record 00 eee eee eee Query Module Main Menu Options 00 ee eens List of Comparison Operators 0 000 cee eee Report Layout Markers Values for IDLISTs Module Values Video Attribute Shared Variables 0 00 000008 Calculated Field Symbols Totals Symbols Key to Module Options Default Display Formats for Data Types 0 200 0 Character Display Format Symbols 0000 cee eae Character Display Format Examples 0 00000 eeaee Numeric Field Display Format 000 e eee eee eee Numeric Format Examples lesse eee Logical Display Formats Date Display Formats Formats for Filenames Precedence of Functions and Operators 0
25. B 19 Progress Results User s Guide for UNIX B 20 by adding fields or text Press GET F5 or CTRL G to get a list of fields to insert Field names included in the automatic layout are set up in the Administration module Method 2 If you follow the menu driven process to lay out the labels you choose the fields from a list Again you can add fields or text after the labels are laid out Then you can press GET F5 or CTRL G to display a scrolling list of available fields to insert Method 3 To bypass the list press END F4 or CTRL E in the field list Then you can press GET F5 or CTRL G to display a list of available fields to insert If you are an experienced user you can enter field names text and calculations yourself Just be sure to delimit field names with the and or lt and gt characters within the label layout you can enter text directly without delimiters Settings Controls general output settings for your labels Choosing this option highlights the printer setting options in the Label Layout window By selecting this option you can assign values to the settings Omit Blank Lines Lets you specify if you want to omit blank lines in labels or not This option does not affect the total height of the label It also does not affect any blank lines you leave in the layout For example if you leave a blank line at the top of the label the line is always blank and not omitted It only o
26. Item imusports Lncal Iefault mysports rder mysports Order Line imgsportz Ref Lall imysportz Salesrep mysports State mysports 1 of 3 Relation of mysports Customer tot Enter WHERE or OF clauses leave blank to remove relation You enter second file of relation belect file to join or press F4 to exit Figure 9 3 Selecting the Second File for a File Relation In this example an asterisk marks each file that has a defined relation with the customer file You can select other files to relate to the customer file or you can remove any relation To mark any file highlight it and press RETURN Default relations use OF criteria You can define nondefault relations using WHERE criteria You can add as many as 20 lines of WHERE or OF clause information in this window Use any of the keys described in Chapter 2 General Information to edit the information in this window For example you can press GET to display a list of available fields that you can use to build the relation Once you add the relationship the reverse relation appears automatically NOTE To define a relation between files that do not have a common field you must relate each of the files to a file that has at least one field in common with each of them To delete a relation between two related files select the related file in the list then delete the WHERE or OF clause To delete the relation delete the OF clause from the
27. Move the cursor to the field you want to query For example if you want to find customers whose names begin with b move the cursor to the Name field and enter b The comparison line updates to the following Mame Equals b If you want to reset all the Query criteria and start again press INSERT LINE to remove all the existing criteria then enter the new criteria you want Enter the comparison operator you want depending on the value you want to query For example if you want to query for customer numbers greater than 25 type the greater than 2 operator in the Cust Num field The comparison line changes to include the operator you enter Cust Mum is Greater Than Enter the value you want to compare the field to and press RETURN Press GO to get the subset of records that are true for this comparison or add a comparison for another field In this example you add an additional comparison Query Module 6 Press RETURN until the cursor is in the field you want to add to the query When the cursor is in the correct field use the default comparison equals or change it 7 Type the value you want to compare with the field You can continue to build the criteria or you can press GO to get the subset of records that meet the current criteria The first record that meets the criteria appears in a subset form For example if you query for customers where the customer s state equals Massachusetts and the customer number is gre
28. Results uses the default form type for the query interface unless you use the Manual option to build your interface with Results add a new form through the Administration module or enter the name of an existing form In those cases Results uses the user form Thus you can reference the form from the query interface the f file from the Form physical filename option to define other query interfaces When you choose the Add New Query Form option and use the fields from an existing form definition filename f to define your new query interface by default the query form you define is the user type When forms have the user type your changes do not affect the actual form definition they only change the way the fields appear on the query interface If the generated form is too large to fit on a 24 by 80 screen you see a warning message The message tells you the size of the form You can continue and build the form but you receive a run time error from Progress if you try to run it on a 24 by 80 screen However you can run it on a screen large enough for the form Permissions Use this option to limit access to any query form See the Security Options section in this chapter for information about setting permissions Delete Current Query Form Use this option to remove query forms from the list of available forms Results deletes the procedure include and object files related to the query form you delete It also deletes the form definiti
29. This message appears at the bottom of the window 12 Press END to exit Total 13 Select Browse to display a summary list of all order lines for this order 14 Press END to exit this list 15 Select Exit twice to exit the order line subset and the order subset This returns you to the original customer record 16 Select Exit to return the Results Main Menu 3 19 Progress Results User s Guide for UNIX 3 4 The Reports Module This section of the tour teaches you how to use options in the Reports module to create reports For example you will learn how to define save and run reports You will also learn how to order reports and select specific groups of records to appear in the report For more information about the Report module see Chapter 5 Reports Module You can leave the tour of the Reports module at the end of any section However before you leave save your definitions That way you can retrieve the saved definition at a later date and pick up where you last stopped The report you create in this exercise shows order information for each customer in the mysports database To prepare for the Report tour select the Report option on the Results Main Menu This window appears cm Run Define Settings Clear Module User Exit Report Info Files Order Report Layout Report Midth oH Load a previously defined report Since no files have been defined for the repo
30. Toggle key 2 4 Totals in reports 3 19 3 38 defining B 12 deleting 3 39 described 4 6 B 10 using 4 15 Totals only reports 5 4 B 17 creating 5 24 marker 5 5 summarizing non numeric fields 5 26 Totals marker t B 12 Tutorial introduced 3 2 Typographical conventions xvi U U startup parameter 9 15 u browse 1 file 9 24 10 24 u export p file 9 24 10 20 u login p file 10 4 u logo p file 10 4 u option p file 9 25 10 3 Update option 4 8 described 4 5 B 8 Updating records See Records Upgrading Results and the Application Rebuild option 9 8 User directory contents 9 15 USER function B 18 User ID U startup parameter 9 15 User module configuring 10 24 User option 9 25 described 4 7 4 17 5 7 B 7 User Sample Export option 7 9 User defined Export Format option 9 24 userid qd file 9 15 Expert mode in WHERE clauses 4 13 V VALUE function B 18 Version number testing for 10 6 Vertical menus 2 9 techniques for choosing 2 10 Video attributes determining 10 8 View option described 4 5 B 8 See also Records Index W WHERE clause adding 3 42 5 19 Ask mode 5 19 deleting B 5 described 5 6 7 4 B 4 editing 4 12 examples of Expert mode 4 13 Expert mode B 5 order of evaluation 3 45 3 46 removing 3 54 using Expert mode 4 11 WHERE clause builder invoking ask mode 2 4 invoking expert mode 2 4 Where option described 4 6 B 9 Wide reports printin
31. When you start with another database this option appears if your database administrator enabled it for you 3 Select a format If you select one of the ASCII formats skip Step 3 in the Exporting Data in ASCII Format section in this chapter The export type appears in the Data Export Layout window You might see a screen similar to this one if you selected the WordStar export type Get Put Run Define FAMIS Where Order Clear Info Module User Exit Tata Export Info Files mysports Customer Order lata Export Layout Fields mysports Customer Cust Mum mysports Customer Mame 1 mysports Customer Balance mysports Customer Sales Rep Export Type WS Headerst na export names as first record Record startt Record end cr lf Field delimiter Field separator 4 Run the data export report Your report appears in the new export format The Settings option gives you as much flexibility as possible in defining an export format You can also edit any ASCII export format as described in the Using Expert Mode to Change ASCII Settings section in this chapter Progress Results User s Guide for UNIX 7 10 7 4 4 Exporting Data in ASCII Format This section describes how to export data in an ASCII format The ASCII export format consists of one record per line Each line begins with an asterisk Double exclamation points mark the beginning and end of each field and a comma
32. menu options 6 2 B 19 Landscape 9 20 Language option 9 17 Language setup for non English languages 9 2 Languages RESLANG product A 2 G 5 Last option 3 11 described 4 5 B 7 Limits Results D 1 Listing records See Browse option Logging out A 5 Logical data types display formats C 8 login p procedure editing for security 9 16 Logo sign on See Sign on Logo startup 10 4 M Mailing labels 6 2 Main menu 1 9 Manual organization of xiv Manual syntax notation xvii Margins adjusting in labels 6 11 Markers amp hide repeating values B 16 c counter B 13 d date B 16 e stacked array B 10 n numeric expression B 14 B 15 Index p percent of total B 13 r running total B 12 s string expression B 14 a average B 12 count B 12 n minimum B 12 t total B 12 x maximum B 12 Math expressions adding to reports 3 29 defining B 13 Maximum export formats per user D 1 fields for ordering records D 1 fields in a scrolling list D 1 fields on query form D 1 files in a scrolling list D 1 indexes on fields D 2 label reports per user D 1 lines in mailing labels D 1 marker x B 12 number of columns D 2 number of files joined D 1 number of joins on a system D 1 printing devices on a system D 1 query forms on a system D 1 reports per user D 1 Menu options B 2 common across Results B 3 Menus horizontal 2 9 vertical 2 9 Messages displaying
33. mysports Order Line Line num mysports Item Item Mame mysports Order Line ty mysports Item Price gbf 007 export names as first record Change type format or layout of current export This window shows the default Microsoft Word settings For example it shows the characters that denote the end of a record In this case the default is cr If carriage return line feed It also shows that the fields are surrounded by double quotes and separated by commas 3 53 Progress Results User s Guide for UNIX 3 54 5 64 Run this definition on your terminal The data appears in Microsoft Word export format mysports Customer Name mysports Order rder nun mysports Order Line Line Bulls Eye Sporte 42 1 Swim Goggles 17 18 305 Bulls Eye Sports 42 2 bet Suit 57 225 12825 Bulls Eye Sports 42 3 Sweat suit 28 42 1176 Bulls Eye Sports 42 4 Basketball 55 14 27 827 55 Bulls Eye Sports 42 5 Hockeu puck 72 7 43 5393 28 Bulls Eye Sports 45 1 Ski Gloves 88 23 2024 Bulls Eye Sports 38 1 Ice Skates 34 51 5734 This listing is different than if you ran it in Progress format In this format a comma separates the fields in each record In Progress format a space separates each field and the line of headers does not appear at the top of the report Press END to return the Data Export screen 3 5 2 Removing a WHERE Clause This section describes how to remove a WHERE clau
34. statements that perform a desired data processing task The procedures referred to in this book contain Progress commands and statements Progress Command The command you use to start Progress Progress Procedure Editor An editing tool that enables you to create and edit Progress procedures You can also compile and test Progress procedures from the Progress editor or escape to the operating system Progress Session A Progress session begins when you start Progress and ends when you exit Progress PROPATH A Progress environment variable that defines a list of directories that Progress searches by default Progress uses the PROPATH value to determine the path to use when searching for the procedure file you name Qualification A search criteria that limits the data displayed on a report or in a query from a database Typically a qualification consists of a field name a comparison operator and a field name or constant For example a request for records where the state begins with m is a qualifier In complex qualifications logical operators are used to join several qualifications Query To access specific information in a database Query by example To select specific database records by entering selection criteria into an empty form Record A collection of items of information A file typically contains many records that contain similar information Record Termination String The set of data export characters that indicate
35. with selection lists you can choose one or more items Figure 2 4 shows an example of a selection list Bet Run Settings Clear Module User Exit Report Info Select File Invoice tmysports Item imuspartz Local Iefault imuspartas Order tmysports rder Line imuspartz Ref Call mysports Salesrep mysports State mysports i 8 Figure 2 4 Example of a Selection List NOTE Function key messages on your display might be different from what you see in the examples depending on what kind of machine you use to run Results For example if you have a VT100 terminal your screen messages will tell you to press PF4 instead of F4 You can use one of two techniques to choose an option or item from a selection list e Ifthe list is long press J or T to move up or down one screen of information at a time When you have made your selections press GO or RETURN e Type the first few letters of the option you want to select The highlight moves to the first option or item that corresponds to the combination of characters you type Press RETURN to select the option or item 2 11 Progress Results User s Guide for UNIX 2 5 2 12 Inlists where you can select only one item the selection window closes after you press RETURN In lists where you can select more than one item an asterisk appears next to each selected item In lists where the selection order is significant a number appears next to each selected item To dese
36. 1 2 3 4 5 8 This lets Results display those months next to each other in separate columns for example Mnth Quota 1 Mnth Quota 2 Mnth Quota 3 etc However you might want to change the labels of the columns to give them more meaning For example you might want to change the label for Mnth Quota 1 to January To do this select the Formats and Labels option under the Settings option See the Hiding Repeating Values and Changing Field Formats and Labels section in Chapter 3 A Tour Through Results for more information on changing column labels 5 11 Progress Results User s Guide for UNIX 5 12 5 4 4 Adding a Header or Footer to a Report To add a header or footer to a report there must be an active report in the layout windows le 24 Select the Settings option A list of setting options appears tz Totals Only Report Spacing Left Header Center Header Right Header Left Footer Center Footer Right Footer a First page onlu Header Last page only Footer There are four types of headers and four types of footers you can add to your report For more information about each of them see Appendix B Option Descriptions Select the option for the type of header or footer you want to add The windows for defining each type of header or footer are similar Enter expressions for the Center Header Line 1 M Line 2 Line 3 These functions a
37. 4GL xxii Preface Progress Master Glossary for Windows and Progress Master Glossary for Character EDOC only Platform specific master glossaries for the Progress documentation set These books are in electronic format only Progress Master Index and Glossary for Windows and Progress Master Index and Glossary for Character Hard copy only Platform specific master indexes and glossaries for the Progress hard copy documentation set Progress Startup Command and Parameter Reference A reference manual that describes the Progress startup commands and parameters in alphabetical order Welcome to Progress Hard copy only A booklet that explains how Progress software and media are packaged An icon based map groups the documentation by functionality providing an overall view of the documentation set Welcome to Progress also provides descriptions of the various services Progress Software Corporation offers Development Tools Progress ADM 2 Guide A guide to using the Application Development Model Version 2 ADM 2 application architecture to develop Progress applications It includes instructions for building and using Progress SmartObjects Progress ADM 2 Reference A reference for the Application Development Model Version 2 ADM 2 application It includes descriptions of ADM 2 functions and procedures Progress AppBuilder Developer s Guide Windows only A programmer s guide to using the Progress AppBuilder visual layou
38. A 2 starting Progress editor A 2 using one database A 3 starting with multiple copies of demo database 8 2 starting with the mysports database 3 3 results 1 file 9 2 9 17 results p A 2 results p file 3 6 3 7 10 3 resxxxxx r files E 2 Run option described 5 3 B 4 Running data export reports 7 8 Running reports 3 25 Running totals defining B 12 marker r B 12 S s string expression B 14 Saving label definitions 6 4 Saving reports 3 27 Scratch files See qd file Screen areas 2 7 Security and exiting Administration module 9 16 Security options 9 13 Selection criteria determining with shared variables 10 10 Selection lists 2 9 2 11 Servers commands shut down A 5 starting A 5 stopping A 5 Settings Data Export formats 7 8 Data Export module 7 10 7 11 defining data export B 22 reports B 16 Settings option described 5 4 Setup language 9 17 printer 9 18 Shared variables 10 6 Sign on program 9 16 Spacing in labels 3 61 6 9 Index in reports 3 49 3 50 5 5 5 14 B 17 Sports database copying 3 3 Stacked arrays marker e B 10 Stacked column labels See See also Column labels Starting Results multi user mode A 3 starting servers A 5 Progress editor A 2 using one database A 3 with multiple copies of demo database 8 2 with the mysports database 3 3 Startup commands A 4 BTOS CTOS one copy of demo database single user A 3 single d
39. Administration module which helps you control how Results functions This section discusses Creating and editing Query forms and relations between files Establishing permissions for query forms and Results options Changing the default settings Substituting your own functionality for the Browse option and adding your own application with the User option Including your own sign on logo and adding a unique data export format NOTE This chapter refers to many topics that are described in the tour of Results in Chapter 3 A Tour Through Results If you have not gone through the tour turn to Chapter 3 and review that information before you continue with this chapter Progress Results User s Guide for UNIX 9 1 General Administration This section describes general administration information including details on how to edit the results 1 file It also describes the initial build process how Results builds default forms and logs initial build information and the default options that appear when you perform an initial build For additional administrative information see Appendix G Helpful Information 9 1 1 When to Edit the results l File The results 1 file defines the default language and the default delimiters for functions and address labels in Results You edit the results 1 file to e Change the default language e Change the default delimiters for functions and address label fields The
40. Browse Join Query Where Total Order Module Info User Exit ull Set s ier Cust Numt 1 Country USA Mamet Lift Line Skiing Address 276 North Street Address City Boston State MA Postal Codez 02114 Contact Gloria Shepley Phone 617 450 0087 Sales Rep HM Credit Limit 66 700 Balance 42 568 00 Terms Metz Discount 352 Comments This customer is on credit hold Figure 4 1 Layout of the Query Window 4 3 Progress Results User s Guide for UNIX 4 2 4 4 This window has several features First it displays record information and the header at the top of the query form describes the set of records you can examine In this case it is the full set of customer records in the mysports database Similarly when you use the Browse option you see the full set of customer records When you start the Query module or select a new form using the View option you always begin working with a full set of forms When you use the Where or Query options to select a subset of records you begin working with a subset of forms and the window header changes to Subset The window also shows horizontal menu options that let you work with other records in the active file A message at the bottom of the window describes the function of the option that you have highlighted on the horizontal menu The following sections describe the menu and other Query options in more detail Query Module Main Menu A horizontal menu appears a
41. Change the first no under Total to yes This no corresponds with the Summary Line This adds a total for all the reports on the summary line at the bottom of the report Change the second no under Total to yes NOTE If you want to delete a total line from the report definition access this window again and change the yes to no Press GO to make the changes to the report The list of fields in the report appears again so you can define a total on another field 3 39 Progress Results User s Guide for UNIX 7 Press END to exit the list without defining another total Two total markers t1 and t6 appear in the Report Layout window to indicate that there are totals defined for the Price Line field agou Ord Line Customer Name Num Num Item Mame Oty Price Price Line 55529 2229 99 4 955 999 99 n amp amp tite x 20 25559 559 x 15 The t1 marker represents a total on the first order by the t6 marker represents a grand total at the bottom of the report 8 Run this report on your terminal The first page of the report appears Item Name Price Price Line Swim Goggles 18 00 1 638 00 Frisbee 13 97 139 70 Volleyball 12 79 1 240 63 Golf shoes 81 00 4 779 00 Golf balls 11 77 541 42 Football 12 50 725 00 Squash Racquet 32 00 2 368 00 Ski Gloves 23 00 1 265 00 Swimming trunks 8 77 MeN DA Whe 12 933 54 Baseball Bat 76 13 95 1 060 20 Soccer ball 73 15 51 1 132 23 Ice Skates 21 61 00 1 281 00
42. Ejects 3 37 3 4 8 Adding a WHERE Clause 0 000 cece eee 3 42 3 4 9 Adding a Header to a Report 0 02 00 3 48 3 4 10 Adjusting the Spacing in a Report 3 49 3 5 Tour of the Data Export Module 0 0 0 cee ee eee 3 51 3 5 1 Selecting a Data Export Type 00 0000 a eae 3 51 3 5 2 Removing a WHERE Clause 00000 eee eae 3 54 3 6 The Labels Module iire raaa a i a eh 3 55 3 6 1 Adding Text to a Label uuaanaaaaa anaana aaa 3 59 3 6 2 Adjusting Settings sueste aa ai a eee eee 3 61 3 7 Stopping RESultS s siest ene pe ene i I2 UIS I ene ek ces 3 63 3 8 S mma Mare raae tan eie dep e E E a dee S E ae 3 63 Query Module 2 004 a eee i ee a ee E E TE 4 1 4 1 Introduction cssc aod edie Re pedes iu bm epe tier madii des 4 3 4 2 Query Module Main Menu 0 0000 cee ee 4 4 4 3 Query Features cece cesis v tees ewe dates 4 8 4 3 1 Updating a Record 0 2c eee ees 4 8 4 3 2 Copying a Record 0 0 0 cee 4 8 4 3 3 Switching to Other Forms 00 0 cee eee ee 4 8 4 3 4 Querying for Records 00 20 4 9 4 3 5 Using Expert Mode in WHERE Clauses 4 11 4 3 6 Getting Information About the Current Set of Records 4 14 4 3 7 Moving to Another Module lessen 4 14 4 3 8 Finding the Total Number of Records in a File 4 15 4 3 9 Changing the Order of Records 000
43. Expert Mode from anywhere within the WHERE clause builder windows Expert mode also lets you change the default order of evaluation by grouping comparisons with parentheses You can use any Progress function in this clause For example you can define the following WHERE clauses e With only the customer file selected enter this clause to select all customers without orders NOT CAN FINDCFIRST order OF customer e With only the customer file selected enter the following clause to select all customers in New England LOOKUP Ccustomer st ME NH VT RI CT MA gt 0 For information about Progress functions see the Progress Language Reference manual For information about evaluating expressions see Appendix F Order of Evaluation in this manual Press GO to apply the WHERE clause If you try to run an invalid WHERE clause you get an error message and the cursor returns to the Expert Mode window If you get an error message edit the WHERE clause in the window using the correct format Because each line of the error messages begins with two asterisks Results ignores them when you run the edited WHERE clause Therefore you do not have to delete them 4 13 Progress Results User s Guide for UNIX 4 14 4 3 6 Getting Information About the Current Set of Records This section describes how to use the Info option on the Query menu to display information about a file relation and WHERE clause criteria For example t
44. For example if you order your customer information by state then define the report as a totals only report you receive one line of information for each customer Each time the value changes Results e Creates a subtotal for each numeric field For example a subtotal for all numeric fields appears each time the value of the last order field changes e Displays the field value in the last record if the field is nonnumeric For example if you include the customer name you see the name of the last customer in each state e Displays the total number of records in each group if you choose to summarize a non numeric field 5 5 1 Defining Totals Only Reports This section describes how to define a Totals only report Follow these steps to combine records within a group so that just a summary total line appears for each group l Define a report as described in Chapter 3 A Tour Through Results 2 Specify the order for the records in the report Be sure to place the field you want to use to group records as the last field in the order definition Reports Module 3 Select the Settings option then select the Totals Only Report option You cannot select this option unless you have an order defined for the report This window appears Defining a Totals Only report collapses the report to show only summary information Based on the last field in your Order list a new line will appear each time that order
45. For more information about the initial build process see Chapter 9 Database Administration For more information about the qc file see Appendix E Files that Results Creates Helpful Information G 1 5 Building in Same Directory as Application This should not overwrite anything because if a file already exists Results automatically chooses a new name for its generated code Still it is best to perform the Initial Build in a clean directory It is not possible to start Results in one directory and have it perform the Initial Build writing into another directory Initial Build writes to the current directory only Application Rebuild on the other hand rebuilds files wherever it finds them in the PROPATH G 1 6 Overwriting Customized Query Forms When you modify query forms modify the query form program p so the Application Rebuild process does not overwrite your edited form with the default form Specifically change the line form type default to form type user This prevents Results from overwriting the query form during the Application Rebuild G 2 When Query Forms Do Not Compile This section describes some common causes of query form compilation failures G 2 1 Missing Validation Files Be sure that v validation files as referenced in the dictionary are available in the PROPATH when Results is building G 2 2 Shared Variable in Validation Expression Avoid using shared variables in va
46. Guide for UNIX 3 46 This window illustrates an important feature of the Where option You can combine multiple criteria using AND or OR to build larger WHERE clauses When you use AND you select the records that are true for both sets of criteria When you use OR you select the records that satisfy either criteria For example you can build a WHERE clause that selects records for customers that have BBB or SLS as their sales representative and also have a current balance of more than 1 000 11 Select AND The WHERE clause now contains an AND Expression imusports Lustomer Sales Rep sls OR mysports Customer Sales Rep bbb A NI Because you are using the Equal comparison Results automatically places parentheses around parts of the WHERE clause so you can tell how to evaluate it For example Results first evaluates criteria within parentheses and finds the records that meet that criteria Then it compares that set of records with the remaining criteria In this case it finds the records that have either of these two sales representatives Then from that set of records Results finds the records that also meet the next AND criteria For more information about evaluating expressions see Appendix F Order of Evaluation If you want to use parentheses to group expressions when you use other types of criteria other than Equal or Not Equal you must define or edit the WHERE clause using Expert Mode
47. If you want to run Results in a non English language install the RESLANG product when you install Results For more information about languages see Chapter 9 Database Administration and Appendix A Startup and Shutdown Procedures NOTE See the Results section in the Progress Installation and Configuration Guide Version 9 for UNIX for instructions on how to install Results on your system Information about setting your path and Progress startup parameters follows in this section Set the DLCRES environment variable to the pathname of the directory where you installed Results Set your path for Results Set the Progress startup options Start Results If you are an end user you might want your database administrator to perform the steps for you The following sections provide more information about each of these steps 2 1 1 The DLCRES Environment Variable Set the DLCRES environment variable to the pathname of the directory where Results is installed Under Progress Version 6 DLCRES dlcres export DLCRES PROPATH DLCRES PROPATH export PROPATH Under Progress Version 7 and later DLCRES DLC tty prores export DLCRES PROPATH DLCRES PROPATH export PROPATH General Information 2 1 2 The PROPATH Environment Variable To run Results the directory where you installed the Results code must be in your Progress PROPATH environment variable For Results application help applhelp p to run correctly it is stro
48. Module User Exit Report Info Files mysports Customer Order BY mysports Customer State DESC BY mysports Customer Cust Num This order definition tells you that the lines in the report are in order first by sales region then by customer number within each region In each case the field name is prefixed by the name of the file and the database that contains it 5 4 7 Adding a Percent of Total to a Report This section describes how to define a percent of total field in a report For example you can add a field that displays the percent of total items represented by each line in the report l Select the Define option then select the Percent of Total option The window displays a list of all the numeric fields in the files you have selected You can use them for the Percent of Total field 2 Select the field you want to use to define a percent of total A window appears that enables you to rename the label that will appear above the column in the report It also enables you to redefine the format for the field Your window might look like this Bet Put Run Settings Where Order Clear Info Module Exit Report Info Formats and Labels Filet Percent of Total Field qbf 005 Expressions mysports Customer Balance Tupet decimal Label 8 Total Format 229 98 oo Hide Repeating Values no_ Reports Module This window contains these fields e File Displayed as Percent of Total
49. Records section 3 13 Progress Results User s Guide for UNIX 3 14 Deleting a Record Follow these steps to delete the current record that is customer 1005 le Verify that customer 1005 is the current record 2 Select Delete A window appears that prompts you to verify whether you want to delete the current record 3 Select YES Results deletes the record from the mysports database and removes it from the screen Results displays the last record in the customer file 4 Select First 3 3 3 Browsing Through Records This section describes how to use the Browse option to display summary lists of record information It also shows you how to pick the fields that temporarily appear in the summary list See Chapter 9 Database Administration for information on how to permanently change the default fields that appear in this list 1 Select Browse A partial list of the records in the customer file appears as shown in the following figure The list begins with the current record text Prev First Last Add Update Copy Delete View Iig Where Total Order Module Info Use i 11 5 Cust Mum Country Browse mysports Customer Join Query Postal Code Kingdom Kingdom Kingdom ift Line nc Urpon Frisbee Hoops Croquet Co Go Fishing Ltd atch Paint Tennis Fanatical Athletes Aerobics valine KY Game Set Match Pihtiputaan Pyora Just Joggers Limited silailu ja Biljardi Sur
50. U User Contact Riitta Hammermaki Phone 91 972 3478 Credit Limit 10 900 Balance 7 284 00 Terms N Discount 25 Comments 2 Query Module The list is different when you select the Module option from other modules For example if you select the Module option when you are using the Reports module the list does not include reports Instead it includes Query and the other available modules The Reports module is already highlighted Press RETURN to select it Get Put Run Define PASSES here Order Clear Info Module User Exit Report Info Files mysports Customer WHERE mysports Customer Cust Mum gt 10 mysportes Order Order Notice that some of the information defined in the Query module has been transferred to this module For example the file selection and WHERE clause defined in the Query module are now in this module You can base a report on the file relation information that you just transferred to the Reports module or expand the report or delete the default information For information about creating reports see Chapter 3 A Tour Through Results and Chapter 5 Reports Module 4 3 8 Finding the Total Number of Records in a File The Total option quickly counts the records in a full set or subset of records Simply select the Total option A message appears at the bottom of the window Number of records in current set or subset This message tells you how man
51. WHERE clause builder windows by pressing GET F5 or CTRL G Expert Mode enables you to enter selection criteria directly without having to go through the set of scrolling lists you normally use to build a WHERE clause Expert Mode also enables you to change the default order of evaluation by grouping comparisons with parentheses See Appendix F Order of Evaluation for more information about evaluating expressions in WHERE clauses Make sure you use field names instead of labels when you define WHERE clauses in Expert Mode To delete the WHERE clause definition press END F4 or CTRL E when the WHERE clause builder windows appear Repeat the process for each WHERE clause you want to delete Progress Results User s Guide for UNIX Order Orders the information in the report by up to five fields This option works the same way in the Reports Labels and Data Export modules In Reports it has an additional feature that you can use in conjunction with the Totals and Subtotals option to create totals for break groups sections For more information about that see the Order option description in Chapter 5 Reports Module When you select this option a scrolling list appears that shows all the non array fields from the active files You cannot order records by array fields When you select a field to order on the screen marks it with a number to represent its place in the ordering sequence When you select a field that is already m
52. You can access this file from the Progress Procedure Editor You can change the default option from eng English to any of the languages available on your system The languages available on your system are listed in the results 1 file They also appear in a list on the screen when you select the Language option from the Administration module Main Menu Multiple languages are only available if you installed the RESLANG product There are multiple versions for some languages French and Greek because these languages need to support different character sets For example French supports seven bit and eight bit character sets and Greek supports 928 and 437 code page versions Be sure to select the appropriate language version 9 4 2 Printer Setup Use the Printer Setup option to define output devices such as TERMINAL FILE and PRINTER You also use it to add new printer definitions This section describes the menu choices listed in the Printer Setup option Add New Output Device Use this to define a new output device When you choose it it prompts you for this information Desc for listing This is the prompt to select an output device This is for display only Device name This is the logical system name of the output device For example the usual default system printer name for Windows is prn or Ipt and UNIX is Ip or lpr If you are using the default printer you enter those names here If you are defining a terminal device type in
53. You can join comparisons using the AND or the OR operators When you finish building the WHERE clause a message appears prompting if you want to enter more selection criteria If you select No you exit from the WHERE clause builder To see the records that meet the criteria select the Run option If you are working with more than one active file you can select the Where option again and build a WHERE clause for each file if you want When you run the report the subset of records you get are true for all of the WHERE clauses That is they act as if they are joined by an AND operator If you choose the same file again you have three options You can build a new WHERE clause you can delete the WHERE clause or you can edit the WHERE clause using Expert Mode unless the WHERE clause uses Ask Mode To perform any of these processes select the Where option again If you have WHERE clauses defined for more than one active file highlight the WHERE clause you want to work with To build a new WHERE clause enter the new criteria when the windows appear The new criteria will overwrite the existing criteria Repeat the process for each WHERE clause you want to overwrite To edit a WHERE clause press GET F5 or CTRL G to enter Expert Mode before you select any fields If you select fields first you delete the existing WHERE clause Repeat the process for each WHERE clause you want to edit You can access Expert Mode from anywhere within the
54. a sample text report label etc Once you have saved it you can use the Contents of a User Directory option in the Administration module to look up the actual filename Results used to save your work For this example assume you have generated a report program that Results saved in the operating system as rep00001 p If you look at the rep00001 p file you see that Results generated the Progress 4GL source code to run your report To run the 4GL source by itself however you first have to define the output destination For example you can define the output destination as Ipr DEFINE NEW SHARED VARIABLE qbf total AS INTEGER INITIAL 0 NO UNDO OUTPUT THROUGH lpr PAGED RUN rep00001 p Many reports require you to use a PAGED output destination For example if the header within your source contains a field use a PAGED output destination NOTE Results cannot run any report label or data export program as a stand alone procedure if it uses Ask mode in the WHERE clause builder For all modules the shared variable qbf tota1 returns the number of labels printed or records exported or reported 10 9 Designing Your Own Export Format Although Results offers very flexible data export formats you might need an export format that Results does not currently offer Therefore you can design one and include it as a menu select under the Data Export Settings option You can include your own export format by enabling it through the User Defi
55. a terminal type from your Progress PROTERMCAP file or leave it blank to use your current terminal settings Maximum Width The maximum number of characters that the output device can print horizontally Use this option to print reports wider than 80 characters Reports will wrap if you output them to devices that are not wide enough to show all their information Database Administration Type The type of output device as selected from the Device Types list on the screen You can enter one of the following e term This does an output to terminal paged Use if the device you are adding is a terminal If wy60tw is a valid terminal type listed in your PROTERMCAP file you can display output in the tall and wide format For example the text appears smaller and more columns of text fit on the width of one page To setup a WYSE60 terminal for tall and wide format enter wy60tw as the device name and 132 as the maximum width e to Useto send information directly to an output device without sending it through a spooler or filter For example use this for DOS printer devices like LPT2 or LPT3 or to print directly to a UNIX device bypassing a spooler e thru Use if you want your operating system to manage the information through a spooler or filter This option is only supported when you run Results on an OS 2 or UNIX operating system Users enter the device name just as they would from the command line For example if you enter
56. about groups of records Reports Module For example if you create a report that lists customer records and puts the records in order by sales region you can define this report as a Totals Only Report that shows a summary of sales regions Thus the report shows one line of information for each sales region and the line contains the total of all the record information in the region A dollar sign marks the summary fields To use this option you must have an order definition for the report Once you enable the Totals Only Report option you pick the fields you want to summarize When you summarize character date or logical fields the system counts them For all fields that are not summarized not marked or Totals Only the last record in that group appears Spacing Specifies spacing for the report This option enables you to spread out information to make it more readable This option enables you to set the following values The width in spaces of the left margin The number of spaces to insert between columns The line to start on The number of lines to allow on each page The type of line spacing to use in whole numbers The number of lines to leave between the header and the body of the report The number of lines to leave between the body of the report and the footer Left Header Defines up to three lines of left header information A header is text function and field information that
57. and To use the WHERE clause everything from 1 to inclusive must be replaced with a literal value Between these braces Results stores several fields the data type followed by a comma the field name followed by a comma a relational operator followed by a colon and the user question For example qbf where 1 for the customer file might contain this code sports customer St character sports customer St Equal Enter state for report 10 10 Integrating Results into Existing Applications This means Extract all records where the field sports customer St is equal to a user supplied character value and prompt the user with the question Enter state for report Then place the user supplied value into qbf where in the place of character report e The OF clause stores the relation It begins with OF or WHERE except for qbf of 1 which is usually empty You can use the following code to combine the qbf of and qbf where variables DEFINE VARIABLE c AS CHARACTER NO UNDO DEFINE VARIABLE i AS INTEGER NO UNDO PUT UNFORMATTED FOR DO i 1 TO 5 WHILE qbf file qbf i lt gt c IF qbf where i THEN qbf of i ELSE IF qbf of i THEN WHERE qbf where i ELSE IF qbf of i BEGINS OF THEN qbf of i WHERE qbf where i ELSE qbf of i AND qbf where i IF c lt gt THENc c PUT UNFORMATTED EACH qbf db i qbf file i c NO LOCK IF i 5
58. appears Next Prev First Last Add Update Copy Delete View NER Join Query Where Total Order Module Info User Exit Full Set mysports Customer Browse mysports Customer HH Cust Num Country N Postal Code Sales Rep E c United Kingdom High Tide Finland Antin Metsastysase Buffalo Shuffleboard 13142 Espoon Pallokeskus 1200 Pedal Power Cycles 02145 esport katiska 30100 Jazz Futis Kauppa 28100 La Boule Lyonnaise 69010 United Kingdom Bulls Eye Sports KSTZ 8TS Austria Bumm Bumm Tennis A 1020 Finland Luistin ja Pyora Oy 66400 U Bug in a Rug by 97148 Fast Flipper Pinball 27371 Press F5 to set different browse fields The Sales Rep field is a temporary addition to the browse list The browse list defaults back to its original fields when you exit the Query module If you want to change the default fields for the list see your database administrator 7 Press END to exit Browse 8 Select Total and the total number of records in the customer file appears at the bottom of the window otal records available is 8 9 Press END to exit Total A Tour Through Results 3 3 4 Joining Files In this section you join the order file to the customer file so that you can see the orders for Thundering Surf For information on how to establish join relationships for files see Chapter 9 Database Administration 1 4 Select Browse 24 Select the Thundering Surf Inc record customer number 16
59. appears so you can enable the Totals Only feature When you select the ENABLE option a list appears that contains the fields you selected for the report You can mark the fields you want to summarize with an asterisk By default Results marks numeric non indexed fields as summary fields Numeric fields are integer and decimal fields It does not mark indexed fields because they are usually fields you do not summarize If you mark character date or logical fields as summary fields the system counts them For all fields that are not marked for Totals Only the values in the last record for that group appears Spacing Specifies how many spaces wide to make the left margin how many spaces to insert between columns what line to start on how many lines to allow on each page what type of line spacing to use how many lines to leave between the header and the body of the report and how many lines to leave between the body of the report and the footer The window lists the option the current setting and the default setting This option enables you to spread information out to make it more readable Left Header Defines up to three lines of left header information A header is text such as a title that appears at the top of the page on a report You type text information into a window You can insert values such as PAGE TODAY TIME USER etc into the header section if you delimit them with curly brace and characters You can
60. because Results generated it It is not contained in any database file e Field The name Results automatically assigns to the field you are creating this field name will be in the list with the other field names once you add the new field e Expression Displays the field and the database and file it came from that is used as a basis for the percent of total e Type The data type In this case the data type is in decimal format e Label Shows the default text that appears above the column in the report which is Total by default in this case You can change the label to a more descriptive name for your report e Format Shows the default display format In this case the default format is gt gt gt 9 9 For more information about formats see Appendix C Field Display Formats Enter a new label and format and hide repeating values Press GO to enter the new field into the Report Layout window The new field appears in the layout window and a p marker under the format indicates that it is a percentage field 5 17 Progress Results User s Guide for UNIX 5 4 8 Getting Information About the Current Report Follow these steps to display information about the current report in the Report Layout window l Select the Info option A window opens that shows you information about the current report For example bet Put Run Define Settings Where Order Clear Module User Exit Elapsed time of last Runt 0 00 3
61. can use a slash or a hyphen as a separator The default date format is mm dd yy and is shown as 99 99 99 Results determines where to put the month day and year values based on any Date Format d startup option you might have used This startup option lets you specify a date format for your application You set the date display format with the d option However this is just the display format It is not the way Progress stores the data It stores dates in the default format month day year Field Display Formats Therefore when you enter date values in Progress expressions in Expert mode in any Results module enter them in the month day year format Table C 7 shows some examples of how Results displays a date value using different formats When you want the user to enter a date in a report it is best to use the default date display format Table C 7 Date Display Formats FORMAT VALUE DISPLAY 990999 310190 o 10 1990 031090 o 10 90 C LE NE 10 2090 EN 10 2090 99 99 99 3 10 1990 03 10 90 999999 3 10 1990 031090 999999 03 10 90 031090 99999999 03 10 1990 03101990 In this example the value of 3 10 2090 is too large to fit into the display format The year part of the display format is 99 while the value being displayed is 2090 which requires a year format of 9999 If you enter a single digit as the year in a date field Results uses the current decade with the single digit C 7 Howto Test and Override De
62. cat my report Ipr Plw then use Ipr Plw as the device name If you use Ip s dlabel2 lt report x then use Ip s dlabel2 as the device name view Use if you want to send the output of a report label or export definition to a file and then automatically have an operating system access that file and display it on the screen The operating system program is usually an editor or a listing program that lets you to scroll through the file You specify the program in the Device Name field For example you might use one of the following the public domain utility list on DOS or view on UNIX These operating system programs are examples only Use the appropriate commands for your system If you need to run a program to print a file you can use view instead of thru For example if you are on DOS and you want to print using the DOS spooler you could use PRINT as the device name CAUTION PRINT must be run once before Progress is started to install the resident portion since PRINT is part TSR and part command e file Use to prompt for the output destination filename This option sends output to a text file It also appends the output to an existing file If the file already exists Results prompts you to append to the file If you do not append it Results overwrites the file 9 19 Progress Results User s Guide for UNIX 9 20 The default text filename is report txt in the Reports module label txt in the Labels module and expo
63. default language is English If you change the default language you see screens and messages in another language for example German or French when you perform an initial build for a database You can use the Language option in the Administration menu to reset the language after the initial build However some defaults do not change when you switch languages with the Language option For example you must use the options in the Administration menu to change the default address field settings in the Labels module and the name of the User Sample Export option in the Data Export module For more information about editing the default language see the Language section in this chapter NOTE When you set Results to run in a non English language set the PROMSGS environment variable to the same language so that Progress messages appear in that language By default Results uses curly braces and to delimit functions in report headers and footers It also uses braces to delimit the fields in address and other labels Because seven bit character sets use the curly braces for special characters you can use angle brackets gt instead You can change these default settings by editing the results 1 file before you perform the initial build For example you can change the curly braces to angle brackets gt Under certain conditions you can use other unmatched symbols You cannot use two slashes because they are the same sym
64. e Lesserof Two Strings e Greater of Two Strings e Length of String e UserID e Current Time You select the elements to build the string expression from a list For string expressions that involve more than one element the process enables you to select the first element in the expression then the operator then the second element For example you might want Results to combine fields and make them one string on your report to save space So you can select the Combine Two Strings option from the list and the two fields that you want to combine This option inserts the column into the Layout window the same way as Running Totals except that in the Reports module the default label is String Value and the s marker shows that this is a string expression field Option Descriptions Numeric Expressions Defines a numeric expression and inserts it as a column in the report When you select this option a window displays a list of operations you can perform e Constant or Field e Smaller of Two Numbers e Greater of Two Numbers Remainder Absolute Value Round Truncate Square Root e Display as Time You select the elements to build the numeric expression from a list For numeric expressions that involve more than one element the process enables you to select each element separately This option inserts the column into the Layout window the same way as Running Totals except that in the Reports module the default lab
65. example if you edit a WHERE clause that uses Ask mode error messages appear in the Expression window and you cannot continue without deleting the WHERE clause or returning the WHERE clause to its original condition You can access Expert mode from anywhere within the WHERE clause builder windows by pressing GET If you want to edit an existing WHERE clause you must enter Expert mode from 4 41 Progress Results User s Guide for UNIX the Choose a Field window Otherwise you overwrite the existing WHERE clause when you start to build a new clause using the selection windows To use Expert mode to define or edit a WHERE clause follow these steps l Select the Where option from the Query Main Menu The windows that help you to build the WHERE clause appears If you already have a WHERE clause defined it appears in the Expression window You use Expert mode to edit the WHERE clause You can also delete the WHERE clause or define a new WHERE clause to override the existing one For a description of how to delete a WHERE clause see Chapter 3 A Tour Through Results for instructions on how to overwrite one simply define a new WHERE clause 2 Press GET to access Expert mode The cursor jumps to the Expression window to let you bypass the other windows and enter a WHERE clause directly For example the following figure shows a previously defined WHERE clause Next Prev First Last Add Update Copy Delete Browse Join Total m Choose a F
66. field value changes field changes Make this a Totals Only report For this report a new line will appear each time the mysports Customer State ENABLE 4 Select ENABLE to define this report as a totals only report A window similar to the following appears Get Put Run Define Where Clear Info Module User Exit r Feport Info If you select a numeric field to summarize a subtotal for that field will appear each time the mysports Customer Sales Rep field value changes If you select a nonnumeric field a count showing the number of records in each mysports Customer Sales Rep group will appear If uou do nat choose to summarize a field then the value contained in the last record in the group will appear Choose Fields d TE 3 State mysports Customer Balance mysports Customer aCredit Limit mysports Customer 1 of 4 Report Width 55 The window on the left describes how this option works for different types of field information The window on the right lists the fields in the reports By default Results marks non indexed numeric integer and decimal fields as summary fields It does not mark indexed fields because they are usually fields you do not summarize For example some common indexed fields are Cust num and phone number these are fields you normally do not summarize If you mark character date or logical fie
67. for the VALUE function an error message appears When you run the report with Results set to default to European numeric format Results automatically converts the American format for VALUE to European numeric format For more information about the E startup option see Appendix C Field Display Formats Center Header Specifies up to three lines of centered header information Right Header Defines up to three lines of right header information Left Footer Specifies up to three lines of left footer information A footer is text such as a page number that appears at the bottom of the page on a report Center Footer Inserts up to three lines of centered footer information Option Descriptions Right Footer Inserts up to three lines of right footer information NOTE When you define three types of headers or footers for a report they print in different ways depending on the available header space If there is enough room to fit all three values across they print three across Otherwise the center header prints first then the left and right headers appear on the next two lines First page only Header Defines a header that appears only on the first page of the report This type of header is centered near the top of the page If you have another type of header defined the First page only header appears after it Last page only Footer Defines a footer that appears only on the last page of the report This type of fo
68. forms a title at the top of each page on a report Center Header Specifies up to three lines of centered header information Right Header Defines up to three lines of right header information Progress Results User s Guide for UNIX Left Footer Specifies up to three lines of left footer information A footer is text such as a page number that appears at the bottom of the page on a report Center Footer Inserts up to three lines of centered footer information You can insert the same values as in the Left Header option Right Footer Inserts up to three lines of right footer information You can insert the same values as in the Left Header option NOTE The special functions you can use in headers and footers are described in Where Appendix B Option Description Also when you define three types of headers or footers for a report they print differently depending on the available header space If there is enough room to fit all three values across they print three across Otherwise the center header prints first then the left and right headers appear on the next two lines First page only Header Defines a centered header that appears only on the first page of the report If you have defined another type of header the first page only header appears after it The first page only header does not appear in the Report Layout window but does appear when you print or display the report Last page only Footer Defi
69. have access acct Only users that begin with acct allowed List users by their login IDs and separate them with commas Ills may contain wildcards Use exclamation marks to exclude users Press F1 to save F4 to undo changes Figure 9 4 Module Permissions Example In the IDLIST shown the Administration module is available for users with a user ID that begins with mis or for users with the ID of bill kathy tony or irene Database Administration If you want to prevent access to the Update option in the Query module you might enter the following IDLIST in the Query Permissions window as shown in Figure 9 5 Administration Query Permissions Next Copy t Where Prev t Delete t Total Select a function from First i View 1 Order lt the list at left to Last 1 Browse Module set permissions for Add Join i Info Po Query User Permissions Update lacct acctmnor ll All users are allowed access lt user lt user etc Only these users have access Iduser gt Cuser gt All except these users have access acct Only users that begin with acct allowed List users by their login IDs and separate them with commas Ils may contain wildcards Use exclamation marks to exclude users Press F1 to save F4 to undo changes Figure 9 5 Query Option Permissions Example In the example the IDLIST prevents all users whose user ID begins with acc
70. how to pick fields for the label how to add fields and text and how to adjust the settings For more in depth information about these modules see their respective chapters Progress Results User s Guide for UNIX 3 1 3 2 Introduction This tutorial takes you on a tour of the user modules in Results It starts with the Query module then moves on to the Reports Data Export and Labels modules The information you learn builds from one section to the next so follow the sections in the order presented You can stop the tour and exit Results at the end of any Query module section In the tours through the other modules you can exit at the end of any section if you save your definitions When you want to start again retrieve the saved definition and start where you ended your last session To take this tour start Results with a copy of the sports database called mysports See the following section for details Results Tour Preparations To take the tour you must first create a copy of the Results sports database and then start Results This section outlines the tasks you must perform and directs you to subsections for further instructions 1 Set up a directory specifically to practice using Results This directory must be different than the one where Results and Progress are installed When you are done with the practice session you can delete the files and the directory If you do not know how to create a directory see your
71. i Swim Goggles 2 Met Suit 3 Sweat suit 4 Basketball 5 Hackeu puck 1 Ski Gloves Price Line 12 825 00 1 175 00 927 55 533 28 2 024 00 6 Return to the Reports screen and save the report over the old definition of Order Line Report Fage um A Tour Through Results 3 5 Tour of the Data Export Module Use the Data Export module to format files so you can export them to other software packages For example you can format them for use in word processing packages or spreadsheets In this tour you learn how to use the Data Export menu features so you can export record information in various formats Before you leave the Data Export module at the end of any section save your definitions When you want to start again retrieve the saved definition and pick up where you ended your session 3 5 1 Selecting a Data Export Type 1 Select Module on the Reports menu The Reports Info window appears Report Info Files mysports Customer WHERE imusports Lustomer Sales Rer sls OR mys i musportz rder mysports Order Line L Labels t mysports Item D Data Export Order BY mysports Customer Name The list displays all the modules you can transfer out to from the Reports module This list is different when you select the Module option from other modules For example if you select the Module option when you are in the Query module the list includes Reports and the other available modules 3 51
72. identical field name with identical data to relate tables to each other it is called a relational database With relationships between tables established you can perform extensive searchers or queries For example you can query all the customers whose orders are promised before November 2001 or the number of outstanding orders by sales region Imagine how tedious this search can be if you are using a paper filing system Relationship far Second Skin 10 79 Farrar Ave 11 28 01 Yuma Shipping Date AZ Net30 ZIP Code 85369 Shipped Not Shipped Customer Record Order Record Figure 1 4 Relationship Between Customer and Order Records By default Results relates two tables if one of the tables has a unique index and all fields in that unique index appear in the other table For information on defining relationships between tables see Chapter 9 Database Administration Results Overview 1 4 An Overview of Results When you start Results the Main Menu appears as shown in Figure 1 5 The Main Menu contains modules which you can access by using any one of these techniques e Press the key that corresponds to the first letter of the modules For example press q for Query press r for Report etc e Press the up or down arrow keys or SPACEBAR to move the highlight bar to the module you want Press RETURN To find out what each module lets you do highlight the module using the up or down arr
73. include the following functions COUNT TODAY PAGE TIME NOW USER and VALUE Progress Results User s Guide for UNIX The VALUE variable enables you to include field information in headers and footers Use the format VALUE database file field format Or you can press the GET key F5 or CTRL G to pull up a list of fields to insert in the header When you select one of the fields in the list Results automatically puts it in the VALUE format for you For example you could use the following function in a header VALUE mysports customer Sales region x 20 This places the sales region for the first record on the page in the header For example Central appears in the header if the first customer record on the page is in the Central sales region You can substitute angle brackets lt gt to replace the curly braces around any function Also your database administrator can edit the results 1 file to change the default symbols for the VALUE option That way when you use the GET key and pick a field from the list the default symbols automatically appear NOTE Always enter the numeric format for the VALUE function in American format even when Results is set to default to the European numeric format using the European Numeric Format E startup option In American format a decimal point marks the decimal location in fields and a comma acts as a place holder If you enter a European numeric format
74. it interprets this expression as being equal to 18 St MA OR St CA Results evaluates the expression inside the AND Cust num gt 10 parentheses first Therefore this expression finds records in Massachusetts or California whose customer number is greater than 10 Name BEGINS p OR Results evaluates the AND before the OR Name BEGINS P AND Therefore this expression finds the records State MA where the name begins with 1 that are in Massachusetts and groups them with all the records where the name begins with p To find the records in Massachusetts where the names begin with or p you must use Expert Mode to group the expression with parentheses For example Name BEGINS p OR Name BEGINS T AND State M A Helpful Information This appendix contains helpful information for database administrators Progress Results User s Guide for UNIX G 1 Common Problems During Initial Build This section describes some problems you might encounter during the initial build process It also includes the solutions to these problems For more information about the initial build process see Chapter 9 Database Administration G 1 1 444 Error You might see the following error message during the initial build process Attempt to expand record beyond the maximum allowed size There are too many files for Results to handle or there are too many joins Since program variables are stored i
75. number 1 appears next to the field 3e Press GO Now you can put the records in ascending increasing or descending decreasing order by the field you chose Get Put Run Define Settings Where WBE Clear Info Module User Exit Files mysports Customer For each component type a for mysports Order ascending or d for descending mysports rder Lin t mysports Item Bsc mysports Customer Name 3 37 Progress Results User s Guide for UNIX 4 Press RETURN or GO to accept the default ascending order The order definition appears in the Report Info window Get Put Run Define Settings Where ONE Clear Info Module Exit Report Info Files mysports Customer t mysportes Order mysports Order Line 1 mysports Item Order BY mysports Customer Name The order definition indicates that the report is ordered by the Name field in the customer file within the mysports database Now when you run the report the records are in alphabetical order by customer name Adding Total Lines In this section you add a Total Line to show the total cost for all the orders for each customer This Total Line creates a break group which breaks the report into sections by customer Follow these steps to add a Total Line to your report l Select Define in the Reports module 2 Select Totals and Subtotals A list of the fields in the report appears Get Put Run Settings Where Order Report Info F
76. of menus in Results vertical menus and horizontal menus Results also has selection lists These appear in different locations and have different characteristics The following sections describe them in more detail NOTE Press ENDKEY to exit the current menu or action You can use this key to back out of pull down menus and windows However within a module s Main Menu you must choose Exit to back out of the module 2 4 1 Vertical Menus Results sometimes uses vertical menus to display menu options The Results Main Menu shown in Figure 2 2 is an example of a vertical menu where options are lined up one above the other PROGRESS RESULTS Query Reports Labels Data Export User Administration Exit Figure 2 2 Example of a Vertical Menu Progress Results User s Guide for UNIX You can use one of two techniques to choose an option from a vertical menu e Press the SPACEBAR TAB or any cursor key to scroll through the menu or list and highlight a selection Press GO or RETURN to select the option e Type the letter next to the option you want to select 2 4 2 Horizontal Menus Each user module in Results has a horizontal menu in which the options are lined up from left to right at the top of the window You use these options to decide how you want to work with the data For example you can choose an option that imports a previously defined report into the Reports module As you highlight a m
77. on are controllable through the Administration module If you choose the Query option while already using a subset the existing Query criteria appear and you can edit them If you want to reset all the Query criteria and start again press INSERT LINE to remove all the existing criteria then enter the criteria you want Where Builds a WHERE clause enabling you to select a subset of records using selection criteria that is more complex than you can specify with the Query option The Where option in the Query module works the same way as it does in the other modules with a few important exceptions For example e You can only have one active file so you do not have to select an active file e There is no Ask Mode e After you build the WHERE clause the subset of records appears automatically You do not have to run a report to see a subset of records Fora complete description of the Where option see the description in the Common Menu Options section in this appendix Progress Results User s Guide for UNIX B 4 Total Displays the total number of records available in the current working file or subset Order Reorders the data currently being displayed using the ordering sequence dictated by another Progress index When you choose this option a list appears of all the fields indexes you can use to reorder the data in the active query form Horizontal Menu Options for the Reports Module Define Selects files and fiel
78. order number and for each customer 11 Press END to return to the Report Layout window 3 36 A Tour Through Results 3 4 7 Adding Break Groups Totals and Page Ejects This section explains how to define totals and subtotals to show the total cost for each customer and the total for all customers The total line for each customer creates a break group A break group divides a report into sections To add break groups to your report you define order criteria for the lines in the report and add totals and subtotals For example in this section you show the total cost of items ordered by each customer You also add page ejects which force the information for each customer you start on its own page To create a break group in a report you define the order criteria first then define subtotals for the group So far the lines in Order Line Report have been in their default order by customer number even though customer number is not a field in the report Now you put them in alphabetical order by customer name Changing Order of Records Follow these steps to change the order of your records l Select Order in the Reports module A window opens that displays all the fields you can use to order the report You can choose as many as five fields to order your report All fields from the active files are available except array fields you cannot order records by array fields 2 Select the Name field from the customer file The
79. other defaults for example file relations printer settings terminal colors and permission If your database contains many files that do not require query forms the MANUAL option saves you time because you only build the query forms you need During the initial build and during subsequent form definitions for the Query module Results automatically places the procedure files include files and form definition f files in the current working directory You can later move them anywhere in the PROPATH For more information about PROPATH see the Progress Installation and Configuration Guide Version 9 for UNIX 9 1 3 Default Forms If you select the AUTO build option or the SEMI build option Results automatically determines all defaults However after the initial build completes you can change defaults using the Administration module This section describes how Results determines default settings Results assumes a screen size of 80 characters wide by 24 lines high with 17 of the 24 lines available to users When you build your query interface form it must fit within these constraints If you select AUTO during an initial build Results builds an interface according to the following rules e Results drops any field with a display format greater than 76 characters Results uses two spaces for attribute characters and two for the box frame edge so it interprets any field wider than 76 characters as wider than 80 that is 76 4 Th
80. particular format C 4 Numeric Display Formats As with character data the format you specify for a numeric value determines how Results displays that value but not how it stores that value When specifying a numeric data format you must use at least one of the following characters 9 z or gt You can use many different symbols to describe the display format of decimal and integer fields 2 9z DR CR and DB For example the default display format for a decimal field is gt gt gt gt 9 99 and the default display format for an integer field is gt gt gt gt gt gt 9 If you use the European Numeric Format E startup option numbers on your screen appear in European numeric format So the default format for decimal numbers is gt gt gt gt 9 99 and the default format for integers is gt gt gt gt gt gt gt 99 That is because when you use the E startup option Results uses a comma to mark the decimal location in fields and periods to mark thousands When you use the E startup option European format is just the way Results displays Field Display Formats the data not the way Progress uses the data Therefore when you enter literal Progress expressions in the Expert Mode in any Results module or in a VALUE function in report headers or footers use a period to represent the decimal point NOTE When you use the VALUE function in report headers and footers always use American format If
81. predefined function keys that let you perform useful operations with a single keystroke or a combination of keystrokes Table 2 1 lists the function keys that you use in Results Table 2 1 Results Function Key Defaults GO F1 Runs the highlighted menu option or accepts an entered field value HELP F2 or CTRL W Enters the Results Help system To exit from Help press END F4 CTRL E or ESC MODE F9 or CTRL T or INS Switches between insert and overstrike modes In insert mode each character you type inserts itself where the cursor is positioned The cursor and the character under it move one space to the right In overstrike mode each character you type replaces the character at the position of the cursor Overstrike is the default mode NOTE In some lists pressing this key toggles to other information For example in lists of field names this key toggles between the field names and the field descriptions END F4 or CTRL E or ESC Exits from the window or operation without saving entries or edits If you are in the middle of a database operation such as updating a record and you press this key the system will discard your changes If you press this key within a module s Main Menu you must select the Exit option to exit from the current module GET F5 or CTRL G Invokes the expert mode in the WHERE clause builder In the Labels Editor and in expert mode this key allows you to insert a field at the cursor positi
82. program File namet i p assumed Form physical File name needs extension Frame name for 46L code Description Press F4 when done updating Figure 9 2 Defining Forms for the Query Module Use this option if you want a file or field added after the initial build to appear in the query forms you built You must select Add New Query Form or Choose Query Form to Edit before you can specify update information After you add or edit a query form and press END to exit Results prompts you to compile the changed form now or to perform an application rebuild later These are the options under the Form Definitions for Query option Add New Query Form Select this option then select the file you want to use to build a query interface The list contains only the files you can read that is you have CAN READ permissions established in the Progress Data Dictionary An asterisk marks any file that has query interfaces built on it Once you select a file you must enter the following information or accept the default information e Query program filename This is the name of the Progress procedure that Results generates from the file definitions you supply If you add a new query procedure and give ita name that already exists you receive a warning that Results will overwrite the existing procedure You can change the program name at this prompt e Form physical filename This is the name of the operating system file that co
83. qbf phi and qbf plo Scrolling lists You can use these shared variables so your own programs include the same video attributes as the current Results application See the Using Results Dialog Box Procedures in Your Applications section in this chapter for more information about these dialog boxes 10 6 4 Determining the Name of the Originating Program Use the following shared variable in your Progress procedures to determine the name of the selection the user was running when they selected the User option DEFINE SHARED VARIABLE qbf name AS CHARACTER NO UNDO The shared variable qbf name contains the name of the report label or the export procedure the user was running when they chose the User module Note that Results saves the procedure name whenever the user saves and names a definition report label or data export definition For example if a report is defined but not saved the system does not assign qbf names to it Integrating Results into Existing Applications 10 6 5 Determining the Order Criteria Defined Use the following shared variable in your Progress procedures to determine the defined order criteria inside Results DEFINE SHARED VARIABLE qbf order AS CHARACTER EXTENT 5 NO UNDO This shared variable has these characteristics The shared variable qbf order contains BY clauses e Fach element contains one of the order by fields e Results sets each unused array entry to the empty string and place
84. record information 1 4 5 User Transfers to a customized module This module is hidden by default If this module appears on your menu it means that a developer designed an application and added it to your package If you have it see the documentation provided by the application developer for more information 1 4 6 Administration Gives database administrators more control over the interface users have within the Results modules For example you can establish table relations define printer and terminal settings establish security definitions and modify module interfaces 1 4 7 Exit Allows you to exit to the Progress Editor or the operating system prompt depending on where you started Results See the Stopping Results section of Chapter 3 A Tour Through Results for details Progress Results User s Guide for UNIX 1 5 Accessing Help Results provides online help for the modules in the Main Menu as well as for most of the options within each module To find out what a module or option does highlight it and press HELP F2 or CTRL W see the Results Keystrokes section of Chapter 2 General Information A window appears that describes the feature and provides suggestions about what to do next Figure 1 6 shows the help message you see when you highlight the Get option in the Reports module and press HELP Run Define Settings Clear Module User Exit PROGRESS RESULTS The Get option enables you to sel
85. subset of files from the SEMI connected databases RESULTS generates query forms only for the selected files AUTO RESULTS generates all query forms automatically If you select AUTO Results automatically creates query forms for each of the files in the connected database s If you select SEMI Results builds query forms for the files you select from a list After you select the files Results builds the default forms NOTE For more information about the AUTO and SEMI options see the Default Forms section in this chapter If you select MANUAL you can define your own form for each query interface through a series of screen prompts When you choose MANUAL the Form Definitions for Query submenu appears Follow the same process to define query forms when you choose MANUAL as you follow when you choose the Form Definitions for Query option from the Administration Main Menu The Form Definitions for Query section in this chapter describes how to define and modify query forms Once you select an option a status screen lists the names of the files as they load from the database into Results The program names in this screen are created using the first eight characters of the filename If a program is already used by another procedure Results assigns the name qryxxxxx p where xxxxx represents a unique integer value Database Administration Even when you define forms manually Results automatically sets all
86. such as run a report or display another menu See also Horizontal menu and Vertical menu Menu Option One choice in a menu listing A menu option can display another menu produce a report answer a query or exit from the application See also Menu Message Area of Screen An area at the bottom of the screen where system messages and help messages appear Operating System Software that controls and manages the execution of computer programs and services Operator A symbol or word used to make comparisons or perform calculations For example LESS THAN lt EQUALS GREATER THAN gt or MINUS Output Destination See Output device Output Device The output destination of a report label or data export definition For example an output device can be a terminal a printer or a disk file Overstrike Mode One of two text entry modes in Results In Overstrike Mode each character you type replaces the character at the position of the cursor Overstrike Mode is the default The MODE F9 or CTRL T key enables you to toggle between the text entry modes See also Insert Mode Parsing A process that breaks the command string into its elements to examine and interpret it Pathname Specifies the complete name of a directory or file by starting at the root directory or disk volume and tracing the hierarchy of the file Glossary Procedure The steps taken to perform a task A series of programming language commands and
87. system You must invoke the help supplied with Results when the qbf module variable shown in the source code contains text The Determining the Originating Module section in this chapter describes the qbf module variable 10 5 Progress Results User s Guide for UNIX 10 6 Using Shared Variables 10 6 The following sections describe shared variables that you can define in your Progress procedures When you call your procedure from Results these shared variables let you look at the context the user is currently using 10 6 1 Testing the Version Number Use the following shared variable in your Progress procedures to see the Results version number your users are running DEFINE SHARED VARIABLE qbf vers AS CHARACTER NO UNDO The shared variable qbf vers contains the product version number The product version number consists of two digits separated by a decimal point and followed by a letter For example 1 2A could be a version number Check the version number to verify that the environment you used to develop your programs matches the version of Results the user is running For more information about version numbers and their meanings see the Application Rebuild section in Chapter 9 Database Administration If the versions do not match programming interface changes between Results versions could cause erratic behavior For example error messages similar to the following might appear when users try to run the User progra
88. the Reports module Multiple Databases with Results 8 3 3 Adding Fields to a Report This section describes how to add fields from different databases to a report For more information about creating reports see Chapter 5 Reports Module l Select the fields you want in the report For example you can add these fields to your report Field Names Database and Filenames Order num sports1 order Line num sports1 order line Item num sports1 order line sports1 order line 2 Press GO to apply the changes to the Report Layout window Your screen might look like the following figure Get Put Run Define Settings Where Order Clear Module User Exit File 1 sports Customer File 23 sportel Order Relation OF sports Customer File 31 sports1 Order Line Relation OF sportel Order Field 12 Dust Mum integer 22223 Expression sports2 Customer Cust Num Field 23 Mame character x 20 Expression sports2 Lustomer Mame Field 3 rder num integer gt gt gt gt 9 gt Expression sports1 Order Order num Field 4 Line num integer 223 Expression sportsl rder Line Line num 3e Run this report to your terminal The report appears on your screen The following report displays information from three files in two databases 8 7 Progress Results User s Guide for UNIX 8 4 8 8 This report does not display the source files fields and databases Use
89. to a new line 10 7 1 Error Message Box You can call s error p in Results from within your user file using the following code RUN s error p Some character string expression Where the character expression is the text you want displayed in the error message box For example after you run a test for permissions you can call this routine RUN s error p You do not have permission to run this option The s error p function creates the box displays an error message box similar to the following then returns You do not have permission to run this option 10 7 2 Logical Choice Box You call this procedure in Results from within your user file using the following code RUN s box p CINPUT OUTPUT 7ogicalvariablename String expression for first true box String expression for second false box String expression for text at top of box 10 17 Progress Results User s Guide for UNIX Where the character expression is the text you want displayed in the error message box For example after you define a logical variable you can call this procedure Include the name of the logical variable in the procedure Also include text strings for the first choice the second choice and the text that appears at the top of the box For example RUN s box p CINPUT OUTPUT qbf 1 Do you want to over write the existing report If you use a question mark as the character string for the first box and second bo
90. two examples of how you can use the User option 10 2 Running Results from Your Own Progress Application You can provide your users with several ways to start Results For example you might want your users to start Results from the operating system from the Progress Procedure Editor or from an option provided by your application software The name of the main procedure for the Results product is results p Results starts immediately when you run this procedure from inside your application or from the Progress Procedure Editor 10 3 Progress Results User s Guide for UNIX 10 3 Tailoring the Startup Logo When you customize the Results product you might want to tailor the startup logo to reflect the name of your application or company You integrate that logo using the Administration module You can also initialize shared variables required by your own procedures run a login procedure display logos etc For example the default startup logo is u 10go p You can replace it with a login procedure that runs u login p The u login p procedure prompts the user for their login name and password and checks the values they enter and compares them to those stored in the appropriate database files The source code for u 10go p and u login p are included with Results See Chapter 9 Database Administration for information about the Sign on Program Product Name option 10 4 Adding Your Own Menu Options to Results 10 4 Besides con
91. window The next time you view the file relation list files will no longer be marked with an asterisk When you exit from the Administration module Results updates the QC configuration file The next time you choose the Join option in the Query Reports Labels or Data Export modules you will see the new relationships along with the existing relationships Database Administration 9 3 Security Options The Administration module has five security options e Contents of a User Directory e How to Exit Application e Module Permissions e Query Permissions Sign on Program Product Name Use Contents of a User Directory option to look at the contents of a user s directory the Module Permissions and Query Permissions to establish security for your application and the How to Exit Application and Sign on Program Product Name options to change the Results exiting and startup interface With the security options you can establish permissions for each Results module and for each option in the Query module You set permissions for specific files and fields using the Progress Data Dictionary For more information see the Progress Database Administration Guide and Reference This section describes how to change the sign on program and determines what appears when the user exits Results operating system Progress etc Later in this chapter the Sign on Program Product Name section describes how to modify your login p file when you have
92. with IBM Corp Progress is a registered trademark of Progress Software Corporation and is used by IBM Corporation in the mark Progress 400 under license Progress 400 AND 400 are trademarks of IBM Corporation and are used by Progress Software Corporation under license Java and all Java based marks are trademarks or registered trademarks of Sun Microsystems Inc in the United States and other countries Any other trademarks and or service marks contained herein are the property of their respective owners May 2001 SECUREDE Product Code 4514 Item Number 81082U 9 1C Contents Preface 2 lcu rl ll bid m eli Te i eW v e IER X SR LE EE xiii Purpose iaa emo ELO e ee e tk nk ane URP A as e o Pe f ds xiii AUCIONCE Lya es TTE xiii Organization of This Manual sslssesee eh xiv How to Use This Manual 000 eee eee XV Typographical Conventions 00 00 cee Xvi Syntax Notation peaaos anoe eani a O rr xvii Progress Messages 0 0 cette tees Xx Other Useful Documentation lisse xxii Getting Started 0 0 eee xxii Development Tools 0 0 00 xxiii Reporting Tools 0 r a a ee eee xxiv AG TREAT ERREUR ER XXV Database ue e e a aa PR retia Rd ge DIE XXV DataServerszc iens b S UR IP AD RIDGE S pedal eU eda xxvi SQL 89 Open Access 0 600 tees xxvi SE EEE AA EENS AG usd dde o E e ee ee dh xxvii Deployment ekle eed aed pel ma he a dre eae xxvii WebSpeed
93. you can make to numbers 5 21 Progress Results User s Guide for UNIX 5 22 4 5 6 7 Select Equal in the Comparisons window If you select the wrong operator press END to return to the Comparisons window and select another operator The comparison symbol in this case is then added to the WHERE clause and prompts you to enter a value to compare to the field you chose as shown in the following figure Name mysports Customer Enter a Value Phone mysports Customer Postal Code mysports Customer Sales Rep mysporte Customer Hame 11 of 16 a Expression mysports Customer Name Press PUT to enter a prompt that will appear when users run the report For example you can provide a prompt for a value to compare against the Name field Anyone running the report could decide what value they want the WHERE clause to select A prompt window appears You can use the default prompt or you can enter your own prompt up to 76 characters Enter the following prompt as shown in the window and press RETURN or GO Ask For Character Value At run time ask the user for a value Enter the question ta ask at run time Show information for customer with what name Expression mysports Customer Name The WHERE clause in the Expression window displays more information Results also prompts you to enter more values for the field Continue to build t
94. your header When you include one or more functions Results displays the values the functions represent when you run the report You can substitute angle brackets lt gt for the curly braces around the functions Also your database administrator can edit the results 1 file to change the default symbols for the VALUE function That way when you use the GET key and pick a field from the list the default symbols automatically appear For more information about the VALUE function see Appendix B Option Descriptions Place your cursor on the first line of the layout area Then type Order Line Report and press RETURN Type Page PAGE in the second line of the layout area to insert the page number function in the header A Tour Through Results 5 Press GO to insert the new centered header into the Report Layout window Report Layout Order Line Report Paget PAGE Ord Line Customer Mame Mum Num Item Mame Price Price Line 22208 208 xt 22729 2223 33 2 222 223 33 n t1tBb 6 Run this report on your terminal The page number automatically replaces PAGE when you run this report To make this report easier to read you can adjust the spacing For example you can adjust the spacing between the header and the body of the report 3 4 10 Adjusting the Spacing in a Report Follow these steps to adjust the spacing in your report 1 Select Settings option then the Spacing option This window appe
95. 0 Integrating Results into Existing Applications 9 25 Progress Results User s Guide for UNIX 9 6 Summary This chapter provided general database administration information as well as descriptions of all the options in the Administration module s Main Menu 9 26 10 Integrating Results into Existing Applications This chapter is intended for application developers It provides information for integrating the Results product into other applications to provide the end user with a toolset that closely matches the look and feel of their own application This chapter also provides information about Understanding the User module e Running Results from your own application e Tailoring the startup logo e Adding your own menu options to Results e Using customized help messages e Using shared variables to pass information between Results and your application e Using Results dialog box procedures in your applications e Using the code Results generates for reports labels and data exports e Designing your own export format e Designing your browse program for Query e Deploying applications that include a tailored Results interface Progress Results User s Guide for UNIX NOTE You should complete or review the tutorial in Chapter 3 A Tour Through Results The Query module and the Reports module sections are particularly important to understanding this chapter 10 2 Integrating Results into E
96. 0 ee aee 4 16 4 3 10 The User Option lselselseleeles 4 17 4 4 SUMMAN st pape vg dta tees d eva e EE GRE A bg ae Searle ed 4 17 Reports Modul amp 2 2l c lee Be ee ee xri eye 5 1 5 1 Introd ction usse seem DERE de eee Rr RE ed s 5 3 5 2 Reports Module Main Menu 000 cee eee 5 3 5 3 Report Markers 0 00 cee cee te teens 5 8 5 4 Report Features 0 a cee eee 5 9 5 4 1 Adding Fields to a Report 0 00 00 eee eee eee 5 9 5 4 2 Deleting Fields from a Report 00 eae 5 10 5 4 3 Defining Array Fields for Reports 005 5 10 5 4 4 Adding a Header or Footer to a Report 5 12 5 4 5 Adjusting Spacing in a Report 1 eee ee 5 14 5 4 6 Changing the Order of Records ina Report 5 15 5 4 7 Adding a Percent of Total to a Report 5 16 5 4 8 Getting Information About the Current Report 5 18 Contents vi 5 4 9 Deleting a Report 0 0 0 cee eee 5 4 10 Adding a WHERE Clause with Ask Mode 5 5 Creating Totals Only Reports wee 5 5 1 Defining Totals Only Reports llle cee eee 5 5 2 Summarizing a Non numeric Field 000 5 5 3 Expanding a Report Using the Totals Only Report 5 6 Sutitfiay 2 o2 Sum Ls d era PA nisu cM oet d doit Labels Module eu art os ei Re eI ee eee Se ea be a wie ee eS 6 1 Itrod ctlon uie eret a aE aeo qu ee tea dP ON 6 2
97. 0000e aes Examples of Expressions Contents 2 4 2 5 3 3 3 3 3 13 4 9 5 8 9 14 10 7 10 8 10 13 10 14 B 2 C 2 C 3 C 4 C 5 C 6 C 8 C 9 E 4 F 3 F 4 xi Contents xii Procedures reSults ezan ee e assit or dott fe c ERAN dete E By Kot eK M M arid 9 3 les 9 17 POGUE RE ER E ERE 9 17 FESUITS 1 xe x et eke Ae A ein E cami td iesu 9 18 U CXPOIL D Sse Shah alee DTITTEU 10 20 Preface Purpose Audience This guide introduces you to the character text mode version of Progress Results Results is an interactive menu driven tool that lets you query report and maintain information stored in Progress supported databases This guide is an end user manual that explains how to use the default Results application If you purchased Results through a third party application vendor the vendor might have modified Results These modifications might include adding or removing features or even incorporating Results into another application If you have a modified Results application your vendor might modify the help system to reflect these changes or provide you with additional documentation Progress Results User s Guide for UNIX Organization of This Manual Chapter 1 Results Overview Describes the product in general terms and summarizes the options on the Main Menu Chapter 2 General Information Describes the hardware and software requirements for running the product on your sys
98. 1 Users Must Have Their Own Directories Since the reports labels and exports do not contain user specific characters in their filenames each user must have a separate file system directory Also each Results session creates temporary files qbf p and _qbf d These are also placed in the current directory and if several users share a directory the files overwrite each other There is an exception to this For CTOS Results all temporary files are placed in the directory denoted by Scr which is the system scratch or temporary directory E 3 2 Important Lines in the qd File The important lines in the qd file are the config version and the export label and report lines These can be edited Do not worry about the numbering As long as the first report line describes rep00001 p and the second describes rep00002 p it does not matter what the number is that goes before the The version must be 1 3C or later Results is version sensitive and contains special code to read in any files based on their version Changing the version arbitrarily in this file can cause Results to act unpredictably Chapter 9 Database Administration contains more information about the qd file Files that Results Creates E 4 Scratch Files Results creates various scratch files that it uses to temporarily store generated procedures and data All scratch files begin with the prefix _qbf For example _qbf2 p is an example of a scratc
99. 10 vii Contents viii 10 6 7 Determining the Fields Selected for Reports 10 7 Using Results Dialog Box Procedures in Your Applications 10 7 11 Error Message Box 0 cece eee 10 7 2 Logical Choice Box 1 2 2 0 0 eee 10 8 Using the Generated Report Labels and Data Export Code 10 9 Designing Your Own Export Format 0 00000 eee eee 10 10 Designing Your Own Print Menu llle 10 11 Designing a Browse Program for Query lisse esses 10 12 Deploying an Application A Tailored Results Interface 10 12 1 Configuration Information liliis 10 12 2 Query Form Information 0 0000 cee eee eee Startup and Shutdown Procedures eeusle u A 1 Running Results in Non English Languages 04 A 2 Starting Results from the Progress Procedure Editor A 3 Starting Results with One Database llli A 4 Starting Results with Multiple Databases lees A 5 Starting a Server for the Database 0 0 00 e eee eee A 6 Shutting Down a Server for the Database 000000s A 7 Stopping Results ieu eR RR esu ea E edd eh Option Descriptions 22 lA IE ete ce dee x S B 1 Menu Options sii iosi a E a eaei A a e aa aAa ee B 2 Common Menu Options 000 ce a B 3 Menu Options for the Query Module 0 00 eee eee eee B 4 Horizontal Menu Opti
100. 2111 USA Attn Michael Traitser UP and CUR TOWN to navigate F4 when done You can add as much text to the labels as you want Just be sure that you leave enough room on each line for the field information Text does not wrap onto the next line if you include a field with a long format on a line with text Notice that even though you set the Omit Blank Lines option to yes Results did not remove the blank line between the address and the contact s name That is because that option does not affect any blank lines you leave in the layout It only omits lines where all the field information for the line is missing For example it omits the line reserved for Address2 information when the line is blank 5 Return to the label creation screen when you finish examining the labels Suppose you want to print two copies of each label and print labels two across The next section describes how to do this A Tour Through Results 3 6 2 Adjusting Settings This section describes how to print two copies of each label two across and omit blank lines within each label through the Settings option l Select the Settings option The fields you can adjust using the Settings option are highlighted or underlined depending on your monitor Label Layout Omit Blank Lines Fes Total Height 6 Text to Text Spacing _ 0 width Copies of Each _ 1 Top Margins _ Left Margin Indent o tmysports Customer Name Lab
101. 3 33 Progress Results User s Guide for UNIX 3 34 3 4 6 Hiding Repeating Values and Changing Field Formats and Labels This section describes how to e Hide repeating values so that the report displays each customer name and each order number once e Change field formats e Change field labels You can perform the above by using the Formats and Labels option on the Settings submenu l Select Settings in the Report module 2 Select Formats and Labels A list of the fields in the report appears Get Put Run Define Where Order Clear Info Module User Exit Report Info Files mysports Customer Choose a Field Name musports Customer Order num mysports Order Line num nysports Order L ine Item Name mysports Item Qty Cmysports Order L ine Price nysports Order L ine Price Line Numeric Expr n This list shows the field labels in order as they appear in the report Results lists the new field by the label you assigned to it You can press MODE F9 to toggle to the field names Remember the labels print in the reports so you might recognize them more easily than the field names It does not matter if you select the field from this label list or the field name list They list the same fields just under different names 3 Select the Name field The Formats and Labels window appears 4 5 6 7e 8 A Tour Through Results In the following steps you change the label and format
102. 3 8 Summary Select Exit from the horizontal menu of any user module At the Results Main Menu select Exit to return to the Progress editor or to your operating system depending on where you started Results This message appears Are you sure that you want to exit PROGRESS RESULTS now Yes Po Select Yes An option in the Administration module determines whether you exit to the Progress Editor or quit to your operating system If you exit to the Progress Editor you can use the editor to restart Results or exit to the operating system Type quit and press GO to leave Progress and exit to your operating system If you want to restart Results from inside the Progress Procedure Editor enter this command RUN results p Press GO This chapter provided a tour through Results and showed you how to use many of the features in the Query Reports Labels and Data Export modules Some of the features in one module appear in one or more of the other modules For more information about these modules see Chapter 4 Query Module Chapter 5 Reports Module Chapter 6 Labels Module and Chapter 7 Data Export Module 3 63 Progress Results User s Guide for UNIX 3 64 Query Module In Chapter 3 A Tour Through Results you learned some basics of the Query module Specifically you learned how to query and modify a database This chapter provides more inf
103. 6 minutestseconds File 1 mysports Customer File 2 mysports Salesrep Relation OF mysports Customer Where mysports Salesrep Region east Order By mysports Salesrep Region and Bu mysports Customer State Field 1 Mame character x 200 Expression mysports Customer Name This window shows a number of things e The name of the report if the report has been saved e The amount of time it took run the last time if it has been run e The names of the files and any WHERE clause criteria e The defined order criteria 1f any e The names of the fields in the report Also the labels names and formats for the fields in the report 2 Press END to return to the Reports Main Menu 5 4 9 Deleting a Report This section describes how to clear a report from the layout window It also describes how to delete a saved report Follow these steps to delete a report l Select the Clear option If there is an active report in the reports windows Results prompts you to verify that you want to clear the current report definition from the window Reports Module 2 Select Yes to remove the report information from the window If you select Clear again you can choose to delete any existing reports 3 Select the Clear option again A list of all the reports in your directory appears You can delete any of these reports 4 Mark any reports that you want to delete To mark a report highlight it and pres
104. 9 4 1 Lariguage is cues peni vni EY Xe DELptEE eiu dud 9 17 9 4 2 Printer Setup 0 0 00 cee eects 9 18 9 4 3 Terminal Color Settings 0 00 leise 9 21 9 5 Modules Options 000 c eee 9 23 9 5 1 Browse Program for Query 0000 eee eee eee 9 24 9 5 2 Default Report Settings 0 0 00 cece eee eee 9 24 9 5 3 User defined Export Format 0 2 cee eae 9 24 9 5 4 Label Field Selection 0 0 00 cece eee eee 9 24 9 5 5 User OptioDi 4d oe oe e g ls Pr EE UIPB E ELI EG 9 25 9 6 SUMIMALY ned ta ei Ee DAE EGG ER bale S ERE 9 26 Integrating Results into Existing Applications sees 10 1 10 1 Introduction essea esate s Cae eg t EARS epe dd 10 3 10 2 Running Results from Your Own Progress Application 10 3 10 3 Tailoring the Startup Logo saaana cece eese 10 4 10 4 Adding Your Own Menu Options to Results 0 000 10 4 10 5 Using Customized Help Messages esses 10 5 10 6 Using Shared Variables 0 tee 10 6 10 6 1 Testing the Version Number 0000 eee eee 10 6 10 6 2 Determining the Originating Module 10 6 10 6 3 Determining the Video Attributes 0 10 8 10 6 4 Determining the Name of the Originating Program 10 8 10 6 5 Determining the Order Criteria Defined 10 9 10 6 6 Determining Files and Selection Criteria 10
105. 9 99 Decimal gt gt gt gt 9 99 l Integer gt gt gt gt gt gt 9 Logical yes no 1 Jf you use the European Numeric Format E startup option the default format for decimal numbers is gt gt gt gt 9 99 and the default format for integers is gt gt gt gt gt gt gt 99 For more information about European numeric formats see the Numeric Display Formats section in this appendix The display format of a field indicates how Results displays the data in that field it has nothing to do with the actual data that is stored in the database For example a name field could be 40 characters long in the database but if the display format is x 20 only the first twenty characters out of forty display Field Display Formats C 3 Character Display Formats If the default display format for a character field is x 8 this means that any characters after the first eight are dropped if you do not supply an explicit format The x represents an alphanumeric character position and the 8 represents the number of characters Results should display You can override this format in the Settings option in the Reports and Data Export modules You can use several different symbols to define a character format X N A and 9 You can also add characters to the display such as parentheses around an area code in a phone number Table C 2 defines the symbols you can use to define character field display formats Table
106. AM stream UNLESS HIDDEN and NO ERROR are optional SYNTAX DISPLAY STREAM stream UNLESS HIDDEN No ERROR xvii Progress Results User s Guide for UNIX xviii In some instances square brackets are not a syntax notation but part of the language For example this syntax for the INITIAL option uses brackets to bound an initial value list for an array variable definition In these cases normal text brackets are used SYNTAX INITIAL constant constant ESAMI NOTE The ellipsis a indicates repetition as shown in a following description Braces d around an item indicate that the item or a choice of one of the enclosed items is required In this example you must specify the items BY and expression and can optionally specify the item DESCENDING in that order BY expression DESCENDING o lt z gt X In some cases braces are not a syntax notation but part of the language For example a called external procedure must use braces when referencing arguments passed by a calling procedure In these cases normal text braces are used amp argument name o lt Z gt X A vertical bar indicates a choice In this example EACH FIRST and LAST are optional but you can only choose one o lt Z gt x PRESELECT EACH FIRST LAST recora phrase Preface In this example you must select one of logical name or alias SYNTAX
107. AND qbf file i 1 lt gt THEN PUT UNFORMATTED SKIP ELSE PUT UNFORMATTED SKIP END NOTE Code similar to this is used in the u export p sample export format program in the Designing Your Own Export Format section in this chapter Use this program listing in conjunction with the qbf file qbf where and qbf of shared variables to produce a Progress 4GL selection statement similar to the following FOR EACH sports customer EACH sports order OF sports customer EACH sports order line WHERE sports order order num sports order line order num This program is important because you use these entry points to determine the files and selection criteria already defined when the User module was selected Note that when there is a join operation Results shows all parent relationships not just the immediate parents 10 11 Progress Results User s Guide for UNIX 10 6 7 Determining the Fields Selected for Reports Use the following shared variables in your Progress procedures to determine the selected fields in the report or export session These variables also enable your program to access any calculated fields end users define DEFINE SHARED VARIABLE qbf rc INTEGER NO UNDO DEFINE SHARED VARIABLE qbf rcn CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf rcc CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf rca CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf rcl CHARACTER EXTENT NO UNDO DEFINE SHARE
108. AS INTEGER NO UNDO elapsed time ETIMECTRUE OUTPUT TO PRINTER NO ECHO RUN VALUE program to run OUTPUT CLOSE HIDE MESSAGE NO PAUSE MESSAGE Actual elapsed time ETIME 1000 seconds RETURN Or it could be more complicated like the u print p program that is supplied with Results Integrating Results into Existing Applications For example your printer menu program might look like this DEFINE INPUT PARAMETER program to run AS CHARACTER NO UNDO DEFINE SHARED VARIABLE qbf module AS CHARACTER NO UNDO DEFINE VARIABLE thru name AS CHARACTER NO UNDO DEFINE VARIABLE menu AS CHARACTER EXTENT 7 NO UNDO If called from Labels module then go straight to labels spooler IF qbf module 1 THEN DO OUTPUT THROUGH lpr Plabel2 NO ECHO PAGE SIZE O0 RUN VALUE program to run OUTPUT CLOSE RETURN END Select which printer from the menu PAUSE O0 DISPLAY 1 Letter Quality Printer 2 Laser Printer portrait 3 Laser Printer landscape menu 1 SKIP menu 2 SKIP menu 3 SKIP 5 Dot Matrix Printer 6 Line Printer menu 5 SKIP menu 6 SKIP 4 Color Laser Printer menu 4 SKIP 7 Local Draft Printer menu 7 SKIP WITH FRAME print menu NO LABELS ROW 4 CENTERED DO ON ENDKEY UNDO LEAVE CHOOSE FIELD menu AUTO RETURN WITH FRAME print menu HIDE FRAME print menu Now set the spooler name For this installation each user has a local printer name
109. C 2 Character Display Format Symbols ee allowed NN Represents a digit A blank is not allowed Represents a number indicating how many times to repeat the previous format that are to display in uppercase x 3 the displayed value is abc fillchar Represents a fill display You can use any character or characters you want to fill a display For example if you display the value abc with a format of To use X N A or 9 as a fill character you must precede that character with two tildes To use a left parenthesis as a fill character after a non fill character you must precede it with one tilde For example if the field value is 123 and you enter a format of x999 the displayed value is x123 Progress Results User s Guide for UNIX Results does not store fill characters in the database they are supplied when the field is formatted for display This permits a field to be displayed with different fill characters in different contexts Table C 3 shows some examples of how to display a character value using different formats Table C 3 Character Display Format Examples em a 111 9999 abcd1234 ABC 1234 999 999 9999 6176635000 617 663 5000 Tf you enter the characters abc1234 into a field defined with the format 9999 then Results displays ABC 1234 on the screen and stores ABC1234 in the field The hyphen is a fill character that appears only when the data is displayed in this
110. Customer Cityt tmysports Customers dmysports Customer Postal Codet I I I n Label Text gt and Fields gt Number of Labels Across 2 mysports Customer Countryt Attnt mysports Customer Contact n Change type format or layout of current label 7 Run the labels on your terminal The following labels appear on your screen Lift Line Skiing Lift Line Skiing 276 North Street 276 North Street oston MA 02114 oston MA 02114 USA USA Attn Gloria Shepley Attn Gloria Shepley Urpon Frisbee Urpon Frisbee Rattipolku 3 Rattipolku 3 Valkeala Uusimaa 45360 Valkeala Uusimaa 45360 Finland Finland Attn Urpo Leppakoski Attn Urpo Leppakoski Hoops Croquet Co Hoops Croquet Co Suite 415 Suite 415 40 Grove St 40 Grove St Hingham MA 02111 Hingham M 02111 LISA USA Attn Michael Traitser Attn Michael Traitser Fage 10 UFI and C TOWN to na 2 F4 when done 8 Return to the label creation screen when you are done looking at the labels 9 Save this as a new label program called Customer Labels 10 Select Exit to return to Results Main Menu For more information about the Labels module see Chapter 6 Labels Module 3 62 A Tour Through Results 3 7 Stopping Results The following steps describe how to exit from Results to the Progress editor or to your operating system le 2 3 4 5 6 7
111. D VARIABLE qbf rcf CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf rcw INTEGER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf rct INTEGER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf dtype CHARACTER NO UNDO These shared variables have the following characteristics e The qbf rc variable represents the number of report columns in use e The qbf rcn variable is an array of column names or other information It contains one element for each report column The contents of this field vary depending on qbf rcc If qbf rcc begins with e or is blank then this is the field name Otherwise it is a calculated variable name of the form qbf where represents a three digit number Also depending on the value of qbf rcc it might have other contents see the description for qbf rcc for details However using the ENTRYC1 qbf rcn function always returns the column name e The qbf rcc value is an array used for calculated fields and stacked arrays Stacked arrays display the information in a vertical format If the first character is blank this is not a calculated field or a stacked array 10 12 Integrating Results into Existing Applications Table 10 3 describes the calculated field for each symbol Table 10 3 Calculated Field Symbols Character Memmi Running total ENTRY 2 qbf rcn contains the field for which the EN total is defined Percent of total ENTRY 2 qbf rcn contains the field for whi
112. For more information about Expert Mode see Chapter 4 Query Module 12 Build the following WHERE clause information Balance is Greater Than 1000 If you make a mistake press END to back out of the windows When you are done with building the WHERE clause Results prompts you to enter more selection criteria A Tour Through Results 13 Select No Results clears the screen and displays the Report Info window The WHERE clause appears in this window Get Put Pun Define Settings MEE Order Clear Info Module Exit Report Info Files mysports Customer WHERE mysports Customer Sales Rep sls OR mys mysports Order t mysports Order Line mysports Item H Order BY mysports Customer Hame The entire WHERE clause is too wide to fit on the screen If you want to see the entire WHERE clause select the Info option 14 Run the report on your terminal This report appears Ord Line Customer Mame i Price Line Swim Goggles Wet Suit 225 00 12 825 00 Sweat suit 42 00 1 176 00 Basketball 14 27 927 55 Hockey puck 7 43 533 28 Ski Gloves 23 00 2 024 00 Ice Skates 61 00 5 724 00 Tennis Shorts 13 33 1 179 41 Hoops 14 78 532 08 Buoyancy Vest 125 00 7 125 00 Cycle Helmet 75 00 1 125 00 Ski Poles 27 50 2 750 00 Golf shoes 81 00 1 377 00 Shuttle cocks 3 99 343 14 Buoyancy Vest 125 00 8 500 009 Fage 10 IN to navi IF41 when done The records in the report are for
113. If you want an exclamation point to show in your label use two exclamation points 10 Select the Line num field and change its label to Line Num Select the Price field and change its format to 2229 99 3 35 Progress Results User s Guide for UNIX 9 When the list of fields to pick appears again press END to return to the Report Layout window Report Layout Ord Line Customer Name Num Num Item Name Qty Price Price Line 555 9 5559 99 555 2 59 99 n x 20 25559 2559 x 15 amp amp An ampersand amp marks each field where you set Hide Repeating Values to yes 10 Run this report on your terminal The first page of the report appears Ord Line Num z fa s Customer Mame Item Mame Qty Price Price Line Swim Goggles 67 18 00 1 206 00 Swim Goggles 12 18 00 216 00 Lacrosse Stick 34 34 00 1 156 00 Ski Max Red 20 2 75 55 00 Frisbee 13 13 97 181 61 Sweat Band 62 2 55 158 10 Hockey puck 80 7 49 599 20 Ski mask 5 4 99 24 95 Sneakers 60 31 00 1 860 00 Shin pads 2 4 86 3 72 Bowling ball 34 00 782 00 Golf clubs 317 00 28 847 00 Golf clubs 317 00 21 873 09 Swim Goggles 18 00 1 458 00 418 50 Lift Line Skiing amp 1 2 3 4 5 1 2 1 2 3 4 5 6 1 2 Press CCURSOR UP and CCURSOR DOWN to navigate F4 when done In this report you do not see repeating values for the Customer Name and Order num fields This makes it easier to see where the information changes for each
114. Installation and Configuration Guide Hard copy only A booklet that describes how to install the Progress EDOC viewer and collection on UNIX and Windows Progress Installation and Configuration Guide Version 9 for UNIX A manual that describes how to install and set up Progress Version 9 1 for the UNIX operating system Progress Installation and Configuration Guide Version 9 for Windows A manual that describes how to install and set up Progress Version 9 1 for all supported Windows and Citrix MetaFrame operating systems Progress Version 9 Product Update Bulletin A guide that provides a brief description of each new feature of the release The booklet also explains where to find more detailed information in the documentation set about each new feature Progress Application Development Environment Getting Started Windows only A practical guide to graphical application development within the Progress Application Development Environment ADE This guide includes an overview of the ADE and its tools an overview of Progress SmartObject technology and tutorials and exercises that help you better understand SmartObject technology and how to use the ADE to develop applications Progress Language Tutorial for Windows and Progress Language Tutorial for Character Platform specific tutorials designed for new Progress users The tutorials use a step by step approach to explore the Progress application development environment using the
115. Labels Module Main Menu 0 00 eee eee eee eene 6 3 Labels Features ee vies ar em ene REA HUE E ERU are 6 3 1 Saving Label Definitions llle esee 6 3 2 Getting Label Definitions llle 6 3 3 Copying Label Definitions lessen 6 3 4 Running Label Definitions 2 00000 eee eee 6 3 5 Clearing and Deleting Label Definitions 6 3 6 Defining Labels Manually 00020 e eee eee 6 3 7 Adding Text to Labels 6 3 8 Adding Fields to Labels liliis 6 3 9 Adjusting Label Settings llli 6 4 SUMMARY 6 riie ETC ET Data Export Module 00 cee eee eee eee n nnn 7 1 Introduction ca dco ce eerte E wR Pa Rey E E 7 2 Data Export Module Main Menu lessen 7 3 Layout Window Settings 0 006 c eee eee ee 7 4 Data Export Features oenen cerei cece ees 7 4 1 Adding Fields to a Data Export Report 7 4 2 Exporting Reports in Progress Format 7 4 8 Exporting Data in Non Progress Format 7 4 4 Exporting Data in ASCII Format 000005 7 4 5 Using Expert Mode to Change ASCII Settings 7 5 S mmani aa a Er d MLAS A S etc Ma pre E Mar dos Multiple Databases with Results 00 20 eee eee eee eee eee 8 1 Introd ctlon ssepe erp ee ea oe dee ERN Lei dx 8 2 Accessing Multiple Databases llselle esses 8 3 Starting
116. NO UNDO DEFINE SHARED VARIABLE qbf of AS CHARACTER EXTENT 5 NO UNDO When using these shared variables e Results currently supports up to five joins between files in all modules 6699 e Results sets each unused array entry to contain an empty string and places it at the end of the array so that no gaps appear in the qbf file and qbf db arrays For example qbf file 1 customer qbf file 2 qbf file 3 order cannot process because there is an unused entry shown as between array entries one and three Instead the array contains qbf file 1 customer qbf file 2 order where the unused entry appears at the end of the array The WHERE clauses contained in the qbf where variable can be blank or contain the WHERE expression The value contained within each array element does not begin with the keyword WHERE If the qbf where element is blank it means that there is no WHERE criteria for the corresponding file However there might be a corresponding relation in qbf of The qbf where variable might also contain the questions for Ask mode These are the prompts users see when they run a WHERE clause that uses Ask mode They prompt users for a value at runtime If INDEX qbf where is greater than 0 then you must do additional processing before you can use the WHERE clause For example Results stores the run time ask information in the WHERE clause between double sets of curly braces
117. Options There is a horizontal menu of options at the top of each window in the Query Reports Labels and Data Export modules Certain options such as Where and Order appear on all the horizontal menus provided that they are active on your system These options let you select subsets of records and define the order of the records as described in Chapter 3 A Tour Through Results and Chapter 4 Query Module Note that even though the same horizontal menu options appear in the Reports Labels and Data Export modules some modules have different pull down menu options For example in each module the Settings option has a pull down menu Thus when you select Settings in the Reports module you get a pull down menu that lets you define headers footers spacing etc However when you select Settings in the Data Export module you get a pull down menu that lets you pick from a list of export formats The pull down options that are unique to each module are fully described in Appendix B Option Descriptions 2 3 2 Information Window In the Reports Labels and Data Export modules the information window displays information about the database files selection criteria and the order sequence of the records used in the current definition 2 3 3 Layout Window In the Reports Labels and Data Export modules the layout window displays layout information about the current report label or data export definition This window displa
118. Press CCURSOR UP and LCURSOR DOBHN I to navigate F4 when done Use lt and gt to scroll report left and righ Defining a Page Eject You can define page ejects on any field you use to order your report In this case you ordered the report only by the Customer Name field Therefore you can define a page eject so that Results starts a new page each time the customer name changes 1 Select the Settings option then select the Page Ejects option The Page Ejects window appears 3 40 A Tour Through Results 2 Select mysports Customer Name to create a page eject each time the customer name changes Get Put Run Defi mysports 0 mysports 0 mysports I H i Order BY mysport Files mysports Customer Fage When a value in one fields changes the automatically go on Pick the field from where you want this Where Order Clear Report Info Info odule User Exit Ejects of the following report can to a new page the list below to occur lt sdon t page eject Customer Mame D mer Name 3e Run the report on your terminal Results displays the first page of your report Ord Line Customer Name Item Name Price Line Suim Goggles 1 538 00 2 Frisbee 133 70 Volleyball 1 240 53 Golf shoes 4 773 00 Golf balls 541 42 Football 725 00 Squash Racquet 2 358 00 Ski Gloves 1 265 00 Swimming trunks 12 833 54 TO This screen shows you the total co
119. Progress applications and extend Progress functionality Progress Internationalization Guide A guide to developing Progress applications for markets worldwide The guide covers both internationalization writing an application so that it adapts readily to different locales languages cultures or regions and localization adapting an application to different locales Progress Language Reference A three volume reference set that contains extensive descriptions and examples for each statement phrase function operator widget attribute method and event in the Progress language Progress Programming Handbook A two volume handbook that details advanced Progress programming techniques Database Progress Database Design A guide that uses a sample database and the Progress Data Dictionary to illustrate the fundamental principles of relational database design Topics include relationships normalization indexing and database triggers Progress Database Administration Guide and Reference This guide describes Progress database administration concepts and procedures The procedures allow you to create and maintain your Progress databases and manage their performance XXV Progress Results User s Guide for UNIX xxvi DataServers Progress DataServer Guides These guides describe how to use the DataServers to access non Progress databases They provide instructions for building the DataServer modules a discussion of program
120. Results with Multiple Databases lesse 8 3 1 Querying Multiple Databases 0 000 8 3 2 Joining File Information 6 ee 8 3 3 Adding Fields to a Report 0 0 c eee eee eee 8 4 Sumtnaby 523 5 eei eet nce wae RAL RI Go REATO RR e E das NODANDAOAAAKRANDND P 8 7 10 Contents Database Administration sse nn 9 1 9 1 General Administration llis 9 2 9 1 1 When to Edit the results File 00000 9 2 9 1 2 Description of the Initial Build llle 9 3 9 1 3 Default Forms 00 A E eae 9 5 9 1 4 Where Results Places the QC File 000 9 6 9 1 5 Logging Initial Build Information 044 9 6 9 1 6 Default Options 0 ee 9 6 9 1 7 After the Initial Build lille 9 7 9 2 The Administration Module 0 00 eee 9 7 9 2 1 The Files Options 0 0 0000 EA a a KR 9 8 9 2 2 Form Definitions for Query 00 0c eee eee 9 9 9 2 3 Relations Between Files 0 000 9 11 9 3 Security Options aisse hea a es 9 13 9 3 1 Contents of a User Directory 00 0000 less 9 15 9 3 2 Exiting the Application 00 00 eee eee eee 9 16 9 3 3 Module Permissions 0 0000 e eee eee eee 9 16 9 3 4 Query Permissions 6 kee 9 16 9 3 5 Sign on Program Product Name 00e0 ee aee 9 16 9 4 The Configuration Options aaaeeeaa eee 9 17
121. User Exit Feport Info Files mysports Customer i c Select Related File Order mysports Ref Call Cmysports Order Salesrep imusportz State mysports Name 1 of 5 H H 3 Select the Order file The window displays customer and order in the list of files and displays an additional window of files related to the order file Get Run Settings Clear Module User Exit Report Info Files mysports Customer mysports Order m Select Related File I Order Line Cmysports Ref Call mysports Salesrep mysports State mysports Hame 1 af 5 4 Select the Order Line file Another window appears displaying files related to the order line files 5 Select the Item file 3 22 6 Press END You will see a list of fields from which you can choose ar Module User Exit Choose Fields Riddressz mysports Customer Allocated Cmysports Item Backorder mysports Urder Line Balance mysports Customer Carrier mysports Order Cat Description mysports Item Cat Page mysports Item City mysports Customer Comments mysports Customer Contact mysports Customer Country mysports Customer Nane i es err tit 0 2 tof 43 A Tour Through Results This list shows in alphabetical order the fields you have permission to view from the selected files You can include any of these fields in your report Some field
122. a Export Module The data appears in the new ASCII format In this format commas separate the fields in each record In Results format a space separates each field 6 Save the export format NOTE When you set the export type to Fixed width ASCII SDF you can use the Width Format of Fields option under the Define option to change the width and format of any field or defined column in the current Data Export Layout window You can select this option only when the export type is set to Fixed width ASCII SDF The width and field format defines how Results exports the field data For example it defines the width of a character field or the number of decimal places in a numeric expression For information on field display formats see Appendix C Field Display Formats 7 4 5 Using Expert Mode to Change ASCII Settings This section describes how to define data export settings using Expert mode For example you might need to tailor the export settings because the settings you need are not available in one of the Settings options l Select the Settings option 2 When the list of export formats appears select any of the ASCII options The format grid appears again 3 Press GET to toggle to Expert mode A table of ASCII symbols appears When entering codes these methods may be used and mixed freely x literal character enclosed in single quotes x interpreted as contral character h one or two hex digits f
123. a dollar amount or how many decimal places appear For information on formats see Appendix C Field Display Formats This option also enables you to hide repeating values An ampersand amp marks each field where you defined Hide Repeating Values You can hide repeating values for most different types of fields including calculated fields But you cannot hide repeating values for a totals field since all the values must appear in the report in order for Results to total them If you want a label to have more than one line stacked separate each line of the label with an exclamation point If you want an exclamation point to show in your label use two exclamation points together Option Descriptions Page Eject Enables you to start a new page for each new section of a report You can only use this option when you have an order definition for the records in your report Just select the Page Ejects option and define a page eject on an order by field The page ejects on a change of value in the order by field Totals Only Report Enables you to collapse the report so that the report displays only summary information about groups of records You must have an order definition for the report before you can run this option If you try to run this option when there is no order defined for the report Results displays a message that reminds you to define order criteria for the report When you select this option a window
124. abase record information You can stop and exit Results at anytime in this module For more information about the Query module see Chapter 4 Query Module Follow these steps to select query forms 1 Type q to select the Query module from the Main Menu as shown in this figure PROGRESS RESULTS Q Query Reports Labels Data Export User Administration Exit Progress Results User s Guide for UNIX A list appears as shown in Figure 3 1 This list displays the Query forms you have permission to view Query Select Query Form i on This contains transactions for the Receivables s Item File Local Default Order header information Order line information Ref Call Sales representatiue information Table of state abbreviation with sales regions Jesc 1 of 3 Press F1 when done F9 to toggle desc file pragram Figure 3 1 Query Form Results can list the query forms in one of three ways e By Description The marker in the lower left corner of the window tells you that this is a list of form descriptions The counter in the lower right corner shows you how many forms there are in the list For example L el tion This contains transactions for the Receivables s Item file Local Default Order header information Order line information Ref Call Sales representative information Table of state abbreviation with sales regions Desc 1 af 3
125. alues marker amp B 16 amp hide repeating values B 16 Horizontal menus 2 8 2 10 How to Exit Application option 9 16 IDLIST 9 13 Include files See i file Index defined 1 3 primary defined 1 3 Indexes maximum on fields D 2 Info option described 4 7 5 7 B 6 using 4 14 5 18 Initial build defined 9 3 Initialization string 7 6 ASCII 7 10 Insert mode 2 4 Installing Results 2 2 INTEGER data type display format C 4 Integrating Results with Progress applications 10 3 Interface Results customizing 10 24 Index 6 Italic typeface as typographical convention xvi J Join option 3 17 described 4 5 B 9 for multiple databases 8 4 Join relationships maximum D 1 K Keys editing 2 5 functions 2 4 Keystrokes xvi L Label Field Selection option 9 24 Label reports maximum per user D 1 Labels adding fields 6 9 adding text 3 59 6 8 adjusting height 6 11 adjusting left margin 6 11 adjusting number of columns 6 12 adjusting text to text spacing 6 11 adjusting top margin 6 11 clearing layouts from screen 6 6 copying 6 6 creating manually 6 7 defining in reports 5 4 defining reports B 16 deleting 6 3 6 6 establishing auto select fields 9 24 mailing maximum lines D 1 omitting blank lines 6 10 printing 6 6 printing multiple copies 6 10 rules for adding text 3 60 saving 6 4 stacked columns 3 35 B 16 Labels module 3 55 described 6 2 features 6 4
126. an be updated If you enter No the field becomes read only Query Determines if the Query option is enabled on this field during a dynamic lookup Browse Determines if the field appears in a browse list Sequence Determines the order in which fields appear in the form Frame name for 4GL code If you use your own Progress form and you named a frame in the form definition you must enter that frame name here For information about designing Progress forms see the Progress Programming Handbook Description A line of text that describes the information contained in the query form This description is what the user sees when selecting from the query form list Choose Query Form to Edit Presents a list of existing forms After you choose a form to edit you can set the General Form Characteristics General Form Characteristics Use this option to change the frame name that your Progress form references and the description of the form that appears in the Query Form List when the user selects the Query option Which Fields on Form Use this option to select the fields to display on the query interface the fields that can be updated or queried the fields that appear on the browse list and the order in Database Administration which the fields appear When you select this option the fields appear that you selected with the Choose Query Form to Edit or the Add New Query Form option Results uses two form types default and user
127. ant and revoke access to the system and select options for users Date Data Type A property of a field or variable that determines that the stored data is a date For example a date data type might contain a date and time from 1 1 32768 B C through 12 31 32767 A D Decimal Data Type A property of a field or variable that determines the stored data is a decimal Descending A decreasing order of field values For example numbers listed from the largest to the smallest Deployment The process necessary to port applications developed with one system to another system Developer The person who creates an application for the end user The developer is typically a programmer Device See Output device Directory A structure that organizes files and possibly other directories Display Format The way data appears on screens and in printed reports Results automatically supplies a default display format for each data type but you can change it You specify display formats through the Data Dictionary or with the Formats and Labels option Edit area The area between the two horizontal lines in the Progress screen where you enter and edit Progress code Editor See Progress Procedure Editor Glossary 3 Progress Results User s Guide for UNIX Glossary 4 End user The person who uses the application Expert Mode A feature available in some windows that enables you to override a menu driven process and enter information
128. ariables that make the assignment to b below easier to follow ASSIGN a qbf rca i c STRING j b IF INDEX a a c gt 0 THEN SUB AVERAGE ELSE IF INDEX a n c gt 0 THEN SUB MINIMUM ELSE IF INDEX a x c gt 0 THEN SUB MAXIMUM ELSE IF INDEX a c c gt O THEN SUB COUNT ELSE IF INDEX a t c gt 0 THEN SUB TOTAL ELSE This section searches for attributes using the symbols in Table 10 4 and builds the aggregate expression You can use this code as an example when you write your own code The comments in this code will help guide you 10 16 Integrating Results into Existing Applications 10 7 Using Results Dialog Box Procedures in Your Applications This section describes how to use two Results procedures in your applications The two routines show you how to produce dialog boxes in your applications Dialog boxes provide error messages or logical yes no choices There are two dialog box routines that you can run from within your procedures s error p and s box p The s error p routine creates an error message box and s box p creates a logical choice box When you call the routines you specify the text and choices you want to appear In both cases the box adjusts vertically to accommodate the text you include and the text wraps from one line to the next However anywhere in the text string that you include a carat the text breaks
129. arked the screen unmarks it and resequences the other number markers automatically You can order the information by a field not in the layout When you finish selecting the fields you want and press GO F1 or CTRL X another window pops up with the selected fields in it The field names are prefixed by filenames this shows what file the field comes from In this window you define whether each field will be in ascending increasing or descending decreasing order Clear Info Clears the settings in the information and layout windows and return to the default settings If there are settings on the screen a dialogue box appears that prompts you to confirm if you really want to delete the current settings You must clear any existing settings from the screen before you can create a new definition If there are no settings on the screen this option enables you to delete any existing definitions If you select Clear when there are no settings on the screen but there are definitions saved a window appears with a list of definitions you can delete You mark the reports you want to delete by highlighting them and pressing RETURN You can unmark a definition by selecting it again Displays the database name filename any selection criteria you used to define the current working set or subset of data as well as order definition for the records Module B 6 Switches to a different Results module without going back to the Main Menu I
130. ars Spacing Option Current Default Left margin T1 Spaces between columns db Starting line li Lines per page Be 66 Line spacing 2 BEN Lines between header and body Oo n Lines between body and footer This window displays the current settings and the default settings for the report The current settings are underlined or highlighted depending on your monitor type 3 49 Progress Results User s Guide for UNIX 3 50 2 Type2inthe Line spacing field to double space the body of the report Line spacing does not affect the header or labels of the report Your database administrator can define different default settings For more information see Chapter 9 Database Administration NOTE TheLines per page field shows the default settings and the current settings for the number of lines per page in a report when you send it to a printer or some other paged device The number of lines per page on a terminal is different When you send your report to your terminal it automatically adjusts the paging according to the size of your terminal 3 Inthe Lines between header and body field type 1 and press RETURN to define that you want one space between the header and the body of the report 4 Press GO to make the changes to the report 5 Run the report on your terminal again This page of the report appears Order Line Report Page 1 Ord Line Customer Name Mum Hum Item Mame
131. ases There are several ways to start Results with more than one database See the Starting Results with Multiple Databases section in Appendix A Startup and Shutdown Procedures To follow the examples in this chapter you must start Results with sports1 and sports2 Appendix A contains information on starting Results using database s in single user or multi user mode By default Results creates relations between files in the databases you use when you start it In this chapter you use the default relations to join files to related files To establish other file relations see Chapter 9 Database Administration or see your database administrator Multiple Databases with Results 8 3 1 Querying Multiple Databases This section describes how to use the Query module to look at information in two or more databases at one time When you select the Query option from the Results Main Menu a list of the Query forms for your connected databases appears The forms can be listed by description filename or program name Press the MODE key to toggle among the lists The lists you see when you start with sports and sports2 are e By Description The marker in the lower left corner of the window tells you that this is a list of form descriptions The counter in the lower right corner shows you how many forms there are in the list This contains transactions for the Receivables s Item file Local Default Order header information O
132. at shows that it is a stacked array field where n is a number representing the extent of the array Case 2 If there is information defined in the Info or Layout windows for example there are active files and fields in the report a window appears with a list of options These options enable you to define the following for a report Option Descriptions Fields This option enables you to select or change the fields that appear in the report When you select this option a list of field names from all selected files appears If you have any expressions or calculated fields defined these also appear in the list For reports you can pick any number of fields as long as they fit within a width of 255 spaces In the Data Export module you can select an unlimited number of fields Select and deselect fields from this list the same way you select and deselect them in Case 1 Once you select all the fields you want for the report and press GO F1 or CTRL X the fields appear in the Layout window In the Reports module the window shows labels and formats Also the total number of characters widthwise that the current field list requires appears in the lower right edge of the Report Layout window If you select more fields than can fit in the layout window a more gt gt message appears at the side of the window and the following message appears at the bottom of the screen Use and to scroll report left and right You ca
133. atabase single user mode A 3 two copies of demo database A 4 DOS one copy of demo database single user A 3 single database single user mode A 3 two copies of demo database A 4 OS 2 one copy of demo database single user A 3 single database single user mode A 3 single user mode A 3 UNIX one copy of demo database single user A 3 single database single user mode A 3 two copies of demo database A 4 VMS one copy of demo database single user A 3 single database single user mode A 3 two copies of demo database A 4 Startup logo 10 4 Startup options Database Name db A 4 Index 11 Progress Results User s Guide for UNIX European Numeric Format E B 18 C 4 C 6 Single User 1 A 4 Startup parameters Date Format d 2 3 European Numeric Format E 2 3 3 11 3 33 User ID U 9 15 Stopping Results 3 63 A 5 String expressions defining B 14 marker s B 14 Subset information See Info option Subsets selecting See Query option Summary reports See Totals Only reports Switching modules See Module option Syntax notation xvii T t total report marker 5 8 B 12 Table relationships defined 1 8 Tables related 1 3 relationships 1 8 Terminal color settings 9 21 D 2 types 9 19 D 2 Termination string See Record termination string Terminology database 1 3 Text to text spacing adjusting in labels 6 11 Tilde See TIME function B 18 Index 12 TODAY function B 18
134. ater than 10 you would see this window mm Prev First Last Add Update Copy Delete Browse Join Query Total Module User Exit File 1 mysports Customer Where Customer Cust Num gt 10 AND Customer State MA The title at the top of the customer form tells you that this is a subset of the customer file Thus when you do a browse of this set you see the subset of records that meet the criteria In this case you see the customers where customer number is greater than 10 and state equals Massachusetts 4 3 5 Using Expert Mode in WHERE Clauses Unlike the Query option the Where option lets you define more than one set of criteria for the same field That is you can get a set of records that have a customer number less than 10 or greater than 40 This section provides guidelines for using Expert mode to build and edit WHERE clauses If you are an experienced Progress programmer you might prefer to build WHERE clauses using Expert mode In Expert mode you enter selection criteria directly without having to go through the set of selection lists It also enables you to change the default order of evaluation by grouping comparisons with parentheses For information about evaluating expressions see Appendix F Order of Evaluation You can use Expert mode to build or edit WHERE clauses in the Query Reports Data Exports and Labels modules However do not use Expert mode to define or edit WHERE clauses that use Ask mode For
135. ature Chapter 2 General Information discusses the basic system requirements for running Results as well as the keystrokes that have special meaning in Results s Progress Results User s Guide for UNIX General Information This chapter provides the background information you need to install and run Results This chapter discusses Instructions for installing and accessing Results These include environment variables and startup parameters Information for copying the sports database and starting Results with a single database For information about starting Results with multiple databases see Appendix A Startup and Shutdown Procedures Procedures for switching from Results to Progress Steps for logging in and out of Results Definitions of Results keystroke functions Descriptions of the window layouts and display interfaces in the user modules NOTE Results is a Progress application The functionality of your Results interface depends on the Progress product used to build it For example your version of Results may not have the Add Copy Update or Delete options in the Query module See Chapter 9 Database Administration for more details about Results functionality Progress Results User s Guide for UNIX 2 1 Installing and Accessing Results Follow these steps to install and access Results le 2 6 Verify that you have the required hardware and software Install Results on your system
136. bel move the cursor to the Top Margin field and type the value you want Changing the Text to Text Spacing By default Results sets the text to text spacing for labels to zero character spaces However when you print more than one label across a page you must set the Text to Text Spacing value wide enough to leave space between the columns of labels If you do not do this the next label across prints on top of the first label instead of in the next column To change the number of spaces from the start of the far left to the far right of each label move the cursor to the Text to Text Spacing field and type the quantity you want Changing the Left Margin Indent By default Results sets the left margin indent to zero spaces You can change this setting so you can leave space on the left side of the page of labels This setting only affects the spacing on the left side of the page not the text to text spacing To change the number of character spaces at the left margin move the cursor to the Left Margin Indent field and type the quantity you want 6 11 Progress Results User s Guide for UNIX Changing the Number of Labels Across By default Results prints one column of labels You can change this setting to print multiple columns of labels across the page When you print more than one column of labels you must adjust the text to text space setting so that labels do not print on top of each other To change the number of columns of labe
137. bol You can use square brackets as long as there are no arrays You cannot use parentheses because they interfere with the label write code Database Administration You can edit the following lines in your results 1 file before you use the initial build to change the default delimiters results l left delim right delim 9 1 2 Description of the Initial Build When you first run Results against a database you see the following message The file dbname qc was not found This means that you need to do an Initial Build on this database Do you want to do this now Yes No In this message dbname is the name of the database you are using to start Results If you are starting Results with more than one database dbname is the name of the first database you specify The initial build creates a file called dbname qc that contains the Results default settings for example file relationships form interfaces for the query module and output destinations Results cannot run without the query configuration QC file Therefore if you are running Results for the first time against a database or group of databases you must perform the initial build to create this file The QC file is named for the first database connected so remember the order of the databases when you start Results with more than one database For example if you perform an initial build on the databases dbna
138. cation Use the How to Exit Application option to determine how users leave the Results Main Menu You determine whether users quit to the operating system or return to a calling procedure when they select the Exit option from the Results Main Menu If you select the RETURN option users return to a calling procedure or to the Progress Procedure Editor if they started Results from the Editor If you select the QUIT option users quit to the operating system regardless of how they accessed Results 9 3 3 Module Permissions Use this option to define permissions by user ID for each module When you select this option a window appears that lets you select any Results module After you select a module you enter the IDLIST that determines who can and cannot run that Results module 9 3 4 Query Permissions Use this option to hide specified menu options from users in the Query module Permissions are dynamic and based on user IDs That is if you prevent a user from using a menu option the option does not appear on the user s screen When you select this option Results displays a list of the menu options available in the Query module If you want to change an option s permission select it from the list After you select an option a four line update form appears inside the information window in which you enter a list of user IDs 9 3 5 Sign on Program Product Name Use this option to name the sign on logo that appears when you start Re
139. ch the percent is defined Counter INTEGER ENTRY Q qbf ren is starting point INTEGER ENTRY 3 qbf ren is increment Stacked array The e is followed by the of the array for example e12 for customer mnth sales String calculated column This refers to the data type of a calculated column It is not necessarily the same as the data type of the menu option For example if you select string you can pick the numeric string length and get the n symbol in the layout Numeric calculated column As with the s symbol this refers to the data type of a calculated column and is not always the same as the data type of the menu option Logical calculated column As with the s symbol this refers to the data type of a calculated column and is not always the same as the data type of the menu option Date calculated column As with the s symbol this refers to the data type of a calculated column and is not always the same as the data type of the menu option For calculated field types s n 1 and d ENTRY 1 qbf rcn is the column name and SUBSTRING qbf rcn INDEX qbf rcen 1 contains the expression You cannot use ENTRY 2 to get the expression since it may have embedded commas The qbf rca value is an array that contains totals information If it contains just an ampersand amp the field hides repeating values Otherwise it contains a string If the last character in the string is a dollar sign th
140. clauses that use Ask mode 1 Select the Where option If there is more than one file in the list of files a highlight bar appears so you can select the file you want to use to build the WHERE clause as shown in the following figure Get Put Run Define Settings Order Clear Info Module User Exit Report Info nu p mysports Order mysports Order Line mysports Item BY musports Customer Name 2 Select the Customer file where you are defining a WHERE clause Several windows appear that help you build the WHERE clause This figure shows the fields in the customer file Get Put Run Define Settings FEE Order Clear Info Module User Exit m Choose a Field Comparisons 34 Address2 ports Customer Balance ports Customer City ports Customer Comments ports Customer Contact ports Customer Country ports Customer Credit Limit ports Customer Cust Num ports Customer Discount ports Customer Name ports Lustomer Enter a Value Phone ports Customer Postal Code ports Customer Sales Rep ports Customer Nane 1 of 16 Expression Press F1 when done F9 to toggle F4 to exit ii If you are an experienced user you can press GET to enter Expert mode and type in the WHERE clause expression yourself unless you want to use Ask mode In this exercise let the WHERE clause builder guide you 5 20 3 Select the Name fie
141. cluded an option program to perform an action If you have this option see supplemental documentation provided by the application developer that describes this function Exits the previous level For example you can exit from a subset of records to the full set From the full set of records you can then exit to the Results Main Menu These options are enabled for the mysports database so that you can try them When you run Results against your own Progress supported database these options might not appear on the menu They are only included if your database administrator has enabled them 4 7 Progress Results User s Guide for UNIX 4 3 Query Features Chapter 3 A Tour Through Results gives you basic information for querying and modifying a database This chapter describes more features and options in the Query module If you have the Update and Copy options on your horizontal menu continue with the next section If not skip to the Switching to Other Forms section 4 3 1 Updating a Record Follow these steps to update records in a file l Select the Update option Depending on your monitor type this highlights all of the fields that you can update in the current record 2 Update the fields you want to change 3 Press GO to store the changes to the record in the database or END to cancel any changes mode 4 3 2 Copying a Record Follow these steps to copy a record l Select the Copy option This h
142. command to access Results from the Progress Editor RUN results p 2 4 Press GO NOTE If you see an error message see your database administrator Results must be in your PROPATH before you can run it When you run Results with a new database Progress prompts you to perform an initial build on the database NOTE You should not get this prompt if someone has already run Results against the database for example if someone installed and customized the application software If you get this prompt see your database administrator The file dbname qc was not found This means that you need to do an Initial Build on this database Do you want to do this now Yes No Here dbname is the name of the Progress database you specified when you started Progress 3 Follow Step 3 in the Starting Results with a Copy of the Sports Database section A Tour Through Results 3 2 3 Moving Between Results and Progress l Press END at the Results Main Menu to access the Progress Editor from Results 2 To return to the Main Menu from the Progress Editor enter this command RUN results p 3 Press GO A logo screen appears Status messages also appear on the bottom of the screen as some system information loads into Results At the end of the process the Results Main Menu appears 3 3 The Query Module This section of the tour introduces you to some Query features which let you examine dat
143. cribes the options in the Query Reports Labels and Data Export modules Appendix C Field Display Formats Describes how Results handles display formats for fields Appendix D Results Limits Lists Results s internal limits such as maximum number of files that can be joined total number of query forms etc Appendix E Files that Results Creates Describes the file extensions used by Results Appendix F Order of Evaluation Describes how Results evaluate expressions in WHERE clauses Appendix G Helpful Information Describes and offers solutions to some common problems in database administration Glossary How to Use This Manual You need not read the entire manual in detail A good strategy might be to skim through once quickly then go back and read for detail only those chapters relevant to your situation and needs XV Progress Results User s Guide for UNIX Typographical Conventions This manual uses the following typographical conventions e Bold typeface indicates Commands or characters that the user types That a word carries particular weight or emphasis e Italic typeface indicates Progress variable information that the user supplies New terms Titles of complete publications Monospaced typeface indicates Code examples System output Operating system filenames and pathnames The following typographical conventions are used to represent keystrokes Sma
144. cursor to the end of the line CTRL CURSOR RIGHT or ESC CURSOR RIGHT 2 5 Progress Results User s Guide for UNIX 2 6 Table 2 2 Other Editing Keys 2 of 2 LEFT END Moves the cursor to the beginning of the CTRL CURSOR LEFT or line ESC CURSOR LEFT HOME F7 or ESC H Moves the cursor to the last available line if the cursor is on the first page otherwise it moves the cursor to the first line on the first page The CTRL keys listed are terminal specific and may not be the same for all terminals General Information 2 3 Window Areas The windows in the Reports Labels and Data Export modules are divided into three areas the horizontal menu the information window and the layout window The window in the Query module has two areas the horizontal menu and the form window Figure 2 1 shows you these areas More detailed descriptions of these areas follow UN Prev First Last Add Update Copy Delete View Browse Join Query Where Total Order Module Info User Exit Full Set sports Customer Cust Mumz 1 Country USA amet Lift Line Skiing Address 276 North Street Address2t Cityt Boston State MA Postal Code 02114 Contact Gloria Shepley Phone 617 450 0087 Sales Rept HsH Credit Limit 66 700 Balance 42 568 00 Terms Metz Discount 352 Comments This customer is on credit hold Next record Figure 2 1 Areas of the Query Module Window Progress Results User s Guide for UNIX 2 3 1 Menu
145. customers whose sales representative is Spike Smith or Bubba Brawn and have a current balance of more than 1 000 15 Return to the Reports module window and save this report over the old definition of the Order Line Report 3 47 Progress Results User s Guide for UNIX 3 48 3 4 9 Adding a Header to a Report Follow these steps to add a header to a report le 2 3 4 Select Settings in the Report module Select Center Header from the Settings menu The screen displays the following windows Get Put Run Define Masies Where Order Clear Info Module User Exit Report Info Filest t Enter expressions for the Center Header Line 1 Nl Line 2 Line 3 These functions are available for use in header and footer text COUNT Records listed so far TIME Time report started TODAY Today s date t NOW Current time PAGE Current page number USER User running report VALUE lt expression gt lt formate to insert variables F5 key Report Midth 74H Press F1 to save F5 to add field F4 to undo The top window contains the header layout area It is underlined or highlighted depending on your terminal You can define up to three lines for a centered header each line can be up to 50 characters long The text in your report appears exactly the way you type it into the layout area The bottom window lists the functions that you can include in
146. d pr_ plus the first three letters of their userid thru name ENTRYCFRAME INDEX lq laser laser color draft draft pr_ SUBSTRINGCUSERID 1 3 Start the output If the user selected the laser printer select portrait or landscape mode OUTPUT THROUGH VALUE lpr P thru name NO ECHO IF FRAME INDEX 2 THEN PUT CONTROL esc to go portrait IF FRAME INDEX 3 THEN PUT CONTROL esc to go landscape RUN VALUE program to run OUTPUT CLOSE END HIDE FRAME print menu RETURN 10 23 Progress Results User s Guide for UNIX 10 11 Designing a Browse Program for Query The default browse procedure u browse i is included with Results This include file lets you use the default functionality of the Browse option in your own application It also lets you to use your own browse program in the Query module For example you create an include file in Progress and reference it in the Browse Program for Query in the Administration module For information on implementing your own browse procedure for the Query module see the source code for u browse i It contains comments that explain the necessary parameters 10 12 Deploying an Application A Tailored Results Interface 10 24 You might want to customize the Results user interface for your application and deploy it to several different sites The portion of Results that you can customize can be divided into two areas the configuration information an
147. d and type n to change the setting to no Printing Multiple Copies By default Results prints one copy of each label You can change this setting to print multiple copies of each label simultaneously To change the number of copies of each label move the cursor to the Copies of Each field and type a quantity 6 10 Labels Module Changing the Total Height By default labels have a total height of six lines You can adjust the height to suit your needs The maximum height of any label is 66 lines For example you can adjust the Total Height option to match the actual height of the labels on which you want to print the information Also if you define more than six lines in your label layout you must adjust the total height of the label to be more than six If you do not Results prompts you to choose whether you want to print the abbreviated version of the labels If you do any lines beyond the total height do not print To change the total height of labels move the cursor to the Total Height field and type the height you want Changing the Top Margin By default Results sets the top margin of each label to zero lines You can change this setting to move the text on each label down from the top edge For example if your labels have your company logo preprinted on them you can use this option to move the customer address down the label by several lines so it does not print over your logo To change the top margin of each la
148. d since all the values must appear in the report for Results to total them Page Ejects Starts a new page inserts page breaks for each new section of a report For example you can use page eject to start a new page each time the customer name changes in your report Select the Page Ejects option and define a page eject on the Name field You can only define page ejects on fields you use in an order definition Therefore you must define order criteria before you use this option to create page ejects Totals Only Report Summarizes the report so it displays only summary information about groups of records Formats and Labels Changes field labels and formats for any field or defined column in the current report This option also enables you to hide repeating values for fields including calculated fields However you cannot hide repeating values for a Total field since all the values must appear in the report for Results to total them Page Ejects Starts a new page inserts page breaks for each new section of a report For example you can use page eject to start a new page each time the customer name changes in your report Select the Page Ejects option and define a page eject on the Name field You can only define page ejects on fields you use in an order definition Therefore you must define order criteria before you use this option to create page ejects Totals Only Report Summarizes the report so it displays only summary information
149. d the Query form information To ship a customized version of Results you need to include items that fall under both of these categories with your application software NOTE For information on how to tailor the Results modules see Chapter 9 Database Administration 10 12 1 Configuration Information Each time you start Results it looks for a file called databasename qc It should be located in the same directory as the database files This query configuration QC file contains all the system information that describes query defaults permissions printer configurations mailing label defaults file relationships etc The default information in this file is determined the first time you run Results against the database This builds the Query module interface The user can choose to have a default interface generated for them or take more control and select the order of the displayed fields In either case Results generates a file called databasename q1 This query log QL file contains information on the Query interfaces that were built and what fields if any were left off the form because they did not fit You can modify all of the default system configuration information as well as the Query interfaces using the Results Administration module Any changes you make appear in the QC file Integrating Results into Existing Applications When you deploy your application to your users you must include your own customized confi
150. database administrator Although more than one user can access information in the same database users must have their own directories to hold their generated reports labels and export formats 2 Ifyou want Results to default to a non English language edit the results 1 file to set the default language you want For details on the results 1 file see the Running Results in Non English Languages section in Appendix A Startup and Shutdown Procedures Also you can set the PROMSGS environment variable to the language you want so Progress messages appear in that language For details on the PROMSGS environment variable see Running Results in Non English Languages section of Appendix A Startup and Shutdown Procedures and the Progress Installation and Configuration Guide Version 9 for UNIX NOTE A few messages and options in Results always appear in English even when the default language is not English For example in some cases you must enter yes to accept an option This is normal and does not indicate a problem with Results 3 Create a copy of the sports database See the next section for instructions A Tour Through Results 4 Start Results with the copy of the sports database See the Starting Results with a Copy of the Sports Database section in this chapter for instructions 3 2 1 Creating a Copy of the Sports Database Go to the directory where you want to use Results Enter the appropriate command at y
151. der a descriptive name You have the option of saving the definition under an already saved name or under a new name You save your definition using a description up to 48 characters long rather than an actual operating system filename In this way you can give meaning to the file description and the definition is automatically saved under an acceptable name for your operating system See Chapter 9 Database Administration for details on how Results stores your reports in the operating system directory Runs the definition as it is currently laid out in the Layout screen You can preview it on the screen print it to a file or route it directly to a printing device This option produces different results depending on if there is information defined or displayed on the screen Case 1 When no information is in the layout screen a window with a list of existing definitions if any appears and prompts you to choose one to load and run You can also load a copy from another directory if you have permission See the Get option for details Once you select a report a list of run destinations appears See Case 2 for details Case 2 When there is information in the layout screen a window opens for you to select the definition s destination For example it can list TERMINAL FILE PRINTER When you select TERMINAL Results runs the information on your screen Where Builds a WHERE clause enabling you to select a subset of records You n
152. descriptions xx Microsoft Word default settings 3 53 Minimum marker n B 12 Mode key 2 4 Module option described 4 7 5 7 B 6 using 4 14 Monospaced typeface as typographical convention xvi Index 7 Progress Results User s Guide for UNIX Moving files E 2 E 4 Multiple databases accessing 8 2 Multi user mode A 3 Mysports database creating See Demonstration Database N n minimum report marker 5 8 B 12 n numeric expression B 15 Next option 3 11 described 4 4 B 7 Not Equal comparison 3 45 NOW function B 18 Numeric display formats C 4 default C 5 European B 18 C 5 expressions defining B 15 marker n B 14 B 15 types B 15 Numeric display formats European 3 11 3 33 O 1 Single User A 4 Operators See Comparisons Options adding to Results menus 10 4 Main Menu 1 9 OR operator 3 45 Order criteria determining in User module 10 9 Index 8 Order of evaluation 3 45 3 46 F 2 Order of operations F 2 Order of records in reports 3 37 Order option described 4 6 5 7 B 6 B 10 Reports module 3 37 using 4 16 5 15 Originating module determining 10 6 Originating program determining name 10 8 Overstrike mode 2 4 P p percent of total B 13 p file E 3 Page breaks See Page ejects Page ejects 5 4 B 17 creating 3 40 PAGE function B 18 Page spacing 3 49 adjusting in reports 5 14 defaults in reports 5 14 in reports 5 5
153. dex into qbf dtype to translate to the actual Progress data types for each column in the report For example 1 represents character data type 2 represents date etc The qbf dtype value is a comma separated list of data types set to character date logical integer decimal raw recid This variable is set by Results and qbf rct is a pointer to one of the types Use these shared variables to determine the fields users selected in their report or export session and to access any calculated fields defined in the report 10 15 Progress Results User s Guide for UNIX This is a sample code that lists the subtotal attributes for fields in a report This sample code lists the subtotal attributes assigned to each field in the report definition DEFINE SHARED VARIABLE qbf rc amp AS INTEGER NO UNDO DEFINE SHARED VARIABLE qbf rcn AS CHARACTER EXTENT 64 NO UNDO DEFINE SHARED VARIABLE qbf rca AS CHARACTER EXTENT 64 NO UNDO DEFINE SHARED VARIABLE qbf order AS CHARACTER EXTENT 5 NO UNDO DEFINE VARIABLE a AS CHARACTER NO UNDO DEFINE VARIABLE b AS CHARACTER NO UNDO DEFINE VARIABLE c AS CHARACTER NO UNDO DEFINE VARIABLE i AS INTEGER NO UNDO DEFINE VARIABLE j AS INTEGER NO UNDO FORM WITH DOWN NO ATTR SPACE loop through all fields DO i 1 TO qbf rc Loop through each possible value 1 to 5 for subtotal levels 6 for summary line at end of report DOj 1TO6 a and c are scrap v
154. directly For example there is an Expert Mode in the WHERE clause builder Expression A combination of constants variables operations and parentheses used to perform a calculation An expression can consist of anything from a single constant or variable to a complicated arrangement of operators and functions that produce a value in a single program statement Extent See Array extent Field A specific item of information A record typically contains several related fields Field Delimiter String The set of data export characters used to denote the beginning and end of each field value Field Separator String The set of data export characters that separate each field value within a record File A collection of records containing similar information For example a customer file is a collection of customer information records Footer Information located at the bottom of each page of a report A footer typically contains a page number Form A screen layout used in the Query module to display record information Format See Display format Function Keys Special keys that perform certain actions For example the GO key F1 or CTRL X Glossary Header Text such as a page number title or date placed on the top of each page of a report Horizontal Menu A strip menu of options you can select from a horizontal line that runs across the screen The options are lined up next to each other Include File A separate file c
155. ds for the report This option produces different results depending on if there is any report definition information displayed in the Report Info or Report Layout windows Case 1 If you select this option when there are no files selected on the screen this option presents a scrolling list of files you can choose When you choose a file the screen displays a list of related files you can join to the current file You can make a maximum of four joins If you do not want to join to another file press END F4 or CTRL E Once you select the active files the files you select appear in the Report Info window and the screen displays a list of all the fields in the selected files You can select any of these fields by highlighting them and pressing RETURN The fields automatically number in the order you select them If you select a field by mistake you can unmark it by selecting it again If you want to resequence the selected fields or insert a new field into the middle of the numbered list highlight the field you want or want to move and type the order number next to it The remaining numbers adjust automatically When you finish selecting fields press GO F1 or CTRL X to insert the fields into the layout window The files you selected appear in a list in the Info window and the fields you selected appear with their labels and formats in the layout window If you select a stacked array field an en marker beneath the field form
156. e Results evaluates the expression from left to right If the operators are not of equal precedence Results evaluates the operator of higher precedence first For example Results evaluates AND before it evaluates OR Also you can use parentheses to change the default order used to evaluate an expression Order of Evaluation Table F 1 shows the precedence or order of processing of functions and operators Table F 1 Precedence of Functions and Operators UNARY NEGATIVE 7 highest UNARY POSITIVE MODULO DIVISION MULTIPLICATION DATE SUBTRACTION SUBTRACTION DATE ADDITION CONCATENATION ADDITION MATCHES LT OR LE OR lt GT OR gt GE OR gt EQ OR NE lt gt BEGINS Rules When using an operator you must leave a space to the left and to the right of that operator For example here is a valid use of an operator x y Whereas this is an invalid use of an operator Xt y Progress Results User s Guide for UNIX Examples Table F 2 provides examples to help illustrate how Results evaluates expressions Table F 2 Examples of Expressions By default Results performs the multiplication first then the addition Therefore it interprets this expression as being equal to 16 2 7 2 Results performs the operation inside the parentheses first Therefore it interprets this expression as being equal to16 2 742 Results performs the operation inside the parentheses first Therefore
157. e Copy Delete View lE Join Query Where Total Order Module Info Exit Full Set mysports Cus Cust Num 16 Country USA Mame Thundering Surf Inc Choose Fields i W Postal Code 79763 Address mysports Customer 1804 Sales Rep JAL Balance mysports Customer Terms Met30 City mysports Customer Comments mysports Customer Contact mysports Customer 2 Country mysports Customer Credit Limit mysports Customer 1 Cust Mum Cmysports Customer Discount mysports Customer Name mysports Customer Mame 1Bsr 16 Press F1 when done F3 to toggle F4 to exit The numbers next to the field names indicate fields that have been selected in the order that they appear in the browse list 3 15 Progress Results User s Guide for UNIX 3 16 To add a field to the browse list you highlight it and press RETURN To delete a selected field highlight it again and press RETURN Notice that there are 16 fields you can choose They do not all fit in the window Use the cursor keys to scroll up and down the list to see these fields 5 Select the Sales Rep field and press RETURN A number 5 appears next to the field This field will appear as the fifth field in the browse list Note that if you select too many fields or a field too large to display across one line the list reverts back to the default selected fields 6 Press GO to insert the Sales Rep field into the browse list The modified browse list
158. e Reports module In fact when you select the Define option in the Data Export module you see all the submenu options that you see when you select it in the Reports module except the Totals and Subtotals option Instead of that option you see the Width Format of Fields option For more information about the Width Format of Fields option see Chapter 7 Data Export Module In this exercise you will change the settings to put this report in the format for Microsoft Word 3 Select the Settings option 4 These options appear PROGRESS Export Generic ASCIT ASCII with Field name header Fixed width ASCII SDF Comma separated value CSV DIF SYLK HordStar Microsoft Word Microsoft Word for Windows HordPer fect CTOS BTOS OfisMriter User Sample Export A Tour Through Results This list shows all the export formats you can select The last item on this list is a default option that appears when you run Results against a copy of the sports database By default its name is in the language used for the initial build Your database administrator can change its name or functionality through the Administration module Select Microsoft Word The following settings appear in the Data Export Layout window lata Export Layout Record start Export Type WORD Headers ues Record end cr lf Field delimiter Field separator r mysports Customer Name mysports Order rder num
159. e form for Query and a different one for Add Update Copy G 2 4 Problems Running a Defined Report If there are problems running a defined report check the permissions on the current directory because this problem occurs when the user does not have write permissions on the current directory To test this have the user get into the Progress Procedure Editor Type in something and then attempt to PUT that to the current directory Then clear the buffer and GET it If it does not work the user has a permissions problem writing to the current directory Helpful Information Language Errors This section describes some common causes of problems when you run Results in non English languages G 3 1 Progress Messages are Not in Correct Language Set the PROMSGS environment variable to the language you want to use This sets the Progress messages to the language you want Note that you must have the PROLANG product installed to use PROMSGS For more information about PROLANG and PROMSGS see the Progress Installation and Configuration Guide Version 9 for UNIX G 3 2 Results Not Defaulting to Correct Language The default language is the language that is set in the results file when you perform the initial build Note that you must have the RESLANG product installed if you want to use a non English version of Results For more information about RESLANG refer to the Progress Installation and Configuration Guide Version 9 for UNIX For details o
160. e the Define descriptions in Horizontal Menu Options for the Reports Module section in this appendix When you use the Define option to create a new field math date or string expression for example you can redefine the format for the field In the Reports module you can also redefine the label and specify if you want Results to hide its repeating values Width Format of Fields Enables you to change the width and format of any field or defined column in the current Data Export Layout window You can only select this option when the Export Type is set to Fixed width ASCII SDF The width and field format defines how Results exports the field data For example it defines the width of a character field or the number of decimal places in a numeric expression For information on formats see Appendix C Field Display Formats B 21 Progress Results User s Guide for UNIX B 22 Settings Determines the export format When you select this menu entry you see a scrolling list of the following possible export formats Progress Generic ASCII format ASCII with Field name header Fixed width ASCII SDF Comma separated value CSV DIF SYLK WordStar Microsoft Word Microsoft Word for Windows WordPerfect CTOS BTOS OfisWriter and User Sample Export NOTE The User Sample Export option appears by default when you start Results with a copy of the Progress sports database When you start with another type of database you see thi
161. e value for the column When you select an aggregate value a character symbol appears beneath the field area in the report layout window to mark its inclusion For example when you pick Total for a field a t character appears in the report layout beneath the field area Other character symbols used a for average n for minimum x for maximum and c for count If you select this option after you define a sort order using the Order option you can provide totals for break groups sections Running Total Inserts a column in the report that displays the running total of any numeric field or expression A running total increments for each line of data So the value displayed in that column on any line of the report equals the sum of the field value for that line and all previous lines in the column When you select this option you see a list of all of the fields in the current active files that have numeric values In the Reports module you also see any defined numeric expressions In the Reports module when you select a field for a running total a window opens that enables you to redefine the default label and format for the running total By default the labelis Running Total and the default format is the same as the format for the totaled field In the Data Export module you can redefine the format only For information on formats see Appendix C Field Display Formats When you insert a running total i
162. ect any of the saved reports in your directory that you created using the current database s Or if you have permission you can copy a report definition from someone else s directory When you select this option a window opens that lists descriptions of all the saved reports in your directory An asterisk marks the definitions that you can load with your connected database s You can toggle this list to show the following the descriptions you gave the report definitions the database s used to create the reports and the program name for the reports definition You can select the report definition you want by highlighting it and pressing RETURN or CGO The report information then appears on the screen All users have their own list of saved reports You cannot access other users reports without permission If you need more information see your database administrator BPO a RUM i Report Mi dth Press space bar to continue B Figure 1 6 A Help Window Also as you work brief help messages appear at the bottom of each window to provide information about your current cursor location and define the operations that you are performing For example when you highlight the Next option in the Query module you see this message Nexe records O O O Results Overview 1 6 Summary This chapter introduced you to e Basic database terminology The Results Main Menu e The Help fe
163. ee Appendix A Startup and Shutdown Procedures When you run Results with a new database Progress prompts you to perform an initial build on the database NOTE You should not get an initial build prompt if someone has already installed the Results package and performed the initial build for you If you do get this prompt see your database administrator The file musports qc was not Found This means that uou need to da an Initial Build on this database Do you want to do this now 2 Type y for YES to do an initial build The following prompt appears There are three ways to build query forms for PROGRESS RESULTS At any time after RESULTS builds query forms you can manually tailor them MANUAL You want to manually define each query form After you pick a subset of files from the connected databases RESULTS generates query forms only for the selected files RESULTS generates all query forms automatically 3 Press ENTER to accept the default value of AUTO to generate the procedures automatically Results then uses its algorithms to determine default settings If you want to use SEMI or MANUAL see your database administrator See Chapter 9 Database Administration for details on the MANUAL SEMI and AUTO selections A Tour Through Results A status screen appears that lists the names of the files as they load from the database int
164. eed to have at least one active file before you can define a WHERE clause criteria In the Query module you need a form on the screen In the other user modules use the Define option to select active files See the description of the Define option for details The Where option in the Reports Data Exports and Label modules works the same way asit does in the Query module with a few important exceptions For example in the Query module you do not have to select active files and there is no Ask Mode See the Menu Options for the Query Module section in this appendix for details on these exceptions The WHERE clause builder windows appear on the screen The first one Choose a Field is a scrolling list that prompts you to select a field to start the WHERE clause expression This list contains the field names of all the fields in the active file You can toggle between field names and field labels by pressing the MODE key F9 or CTRL T Option Descriptions Once you choose a field a scrolling window appears that displays all of the allowable operators for the field type Operators can include Equal Not Equal Begins etc Select an operator and then enter a value to compare with the field In all modules except Query you can invoke Ask Mode by pressing PUT F6 or CTRL P and entering a prompt that will display when you run the report You can continue to add values to compare or enter additional selection criteria on other fields
165. el Definitions This section describes how to use the Get option to retrieve a label that you saved It also describes how to get a copy of a label definition from someone else s directory if you have permission You use the same steps to get definitions in the Reports and Data Export modules le 2 Select the Get option If there is any data in the information or layout windows Results prompts you to clear the current windows If you have not saved that information it will be lost if you select Yes If the window is clear a window appears that enables you to load existing labels You can load and run any of the labels marked with an asterisk The asterisk means that the label was created using the currently connected databases To see the name of the databases press MODE Press MODE again to see the program names If you created your labels with an earlier version of Results a question mark marks the labels to show that Results did not save the names of the databases used to create the labels If you created them with the current database s retrieve them to save the database names with the label names At this window you can load a label program from another directory if you have permission load the label you defined or press END to cancel the Get operation To successfully copy a label format from someone else s directory the label must have been created using the database you are using If it was created u
166. el Text gt and Fields gt o lal imysports Customer Address l l mysports Customer Addressz I mysports Customer City tmysports Customer n tmysports Customer Postal Code I imusports Customer Country I Labels Attn tmysports Customer Contact I Across 1 o Number of Shift lower lines up when line is blank In this tutorial you adjust the Text to Text Spacing the Copies of each and the Number of Labels Across You leave the default setting as yes in the Omit Blank Lines field 2 Press RETURN to accept the default setting for Omit Blank Lines 3 Type 2 in the Copies of each field and press RETURN 4 Type 40 in the Text to Text Spacing field This allows 40 spaces or characters from left to right on each label Set the Text to Text Spacing value wide enough for the number of labels you want to print across otherwise the next label across prints on top of the first label instead of in the column next to it 5 Type 2 in the Number of Labels Across option to specify that you want two columns of labels 3 61 Progress Results User s Guide for UNIX 6 Press GO to accept the settings Label Layout Omit Blank Lines yes Total Height 6 Text to Text Spacing 40 width Copies of Eacht 2 Top Margin 0 Left Margin Indent 0 o mysports Customer Name I I mysports Customer Address o dmysports Customer Address2 l I tmysports
167. el is Numeric Value and the n marker shows that this is a numeric expression field Date Expressions Defines a date calculation and inserts it as a column in the report When you select this option a window presents a list of all the date expressions you can define Current Date e Add Days to Date Value Subtract Days from Date Value Difference between Two Dates Earlier of Two Dates Progress Results User s Guide for UNIX Later of Two Dates e Day of Month Month of Year Name of Month Year Value e Day of Week e Name of Weekday You select the elements to build the date expression from a list For date expressions involving more than one element for example the difference between two dates the process enables you to select each element separately This option inserts the column into the Layout window the same way as Running Totals except that in the default label is Date Value and the d marker shows that this is a date expression field Settings Controls general report settings such as headers and spacing When you choose this option the screen presents a menu with the following options Formats and Labels Enables you to change field labels and formats for any field or defined column in the current report The field labels are the titles that appear above the column in the report The formats define how the field data appears on the screen for example whether a dollar sign prefixes
168. elds Figure 1 3 shows an example of a simple and a compound index Simple Index gt Records Sorted sme Ja n with This Index Last Abel 123 Main St City Grovewood MA Zip Code 02176 Compound Index gt Records Sorted with This Index Jan Last Abel Abel Jan 123 Main St City Grovewood MA Zip Code 02176 Ball Ed lt Ball Gene Figure 1 3 Simple and Compound Indexes You can define several indexes per table but you can define only one primary index for a table For information on defining indexes see the Progress Language Tutorial for Character Progress Results User s Guide for UNIX 1 8 1 3 1 Table Relationships The most powerful advantage an electronic filing system has over a paper filing system is that it can process data based on the relationship between database tables The relationship is based on shared data For example let us take a look at a database table that contains information about orders placed by customers Each record in the order table might contain fields such as the number of the order the promised delivery date etc as shown in Figure 1 4 However to relate the Order table to the Customer table the order table must contain one field that is already in the Customer table Since the customer number field uniquely identifies each customer it is the most appropriate field When a database uses common data
169. eled Name in a record Each record in the Customer table has a Name field Progress Results User s Guide for UNIX Figure 1 2 illustrates the structure of a database Database be Table Record Customer Figure 1 2 Structure of a Database The last component of an electronic filing system is called an index When you open the drawer of a filing cabinet and thumb through the tabs on the folders you re using a kind of index What s on the paper tab represents the information found in the folder For example you d expect the tabs in the customer filing cabinet to contain the name of the customer whose information is in that folder Similarly an electronic index is a component defined for a specific database table that serves as the basis for faster searching sorting or otherwise processing the records in that table Results Overview In a database an index is a list that contains a value for each record in the table When you define an index you choose the field or fields used to derive the index value for each record For example if you choose the Name field as an index then Progress creates an index for the Customer table that consists of a list of customer names just like the list of tabs in the paper filing system A simple index is based on the value of one field while a compound index is based on two or more fi
170. en it is a totals only string The rest of the contents of the field contains a series of one or more pairs of characters where each pair is a letter followed by a number The letters can be any of the following t c a n or x 10 13 Progress Results User s Guide for UNIX 10 14 The digits can be any number from 1 through 6 inclusive Table 10 4 lists the values that each of these characters represents Table 10 4 Totals Symbols EL INE NNNM C NN The qbf rc1 value is an array of column labels Stacked column labels are supported In stacked column labels an exclamation point breaks column labels into more than one level If there are more than two levels Results just shows only two levels on the Report Layout screen However they generate properly when users run the reports The qbf rcf value is an array of formats for report columns All Data Dictionary formats are supported See Appendix C Field Display Formats for information on dictionary formats The qbf rcw value is an array of column widths within the Report module Use this in conjunction with qbf r attr 1 left margin and qbf r attr 3 between column spacing to do the report layout This takes into account format label widths and stacked labels Integrating Results into Existing Applications e The qbf rct value is an array of numbers that corresponds to the data types stored in the shared variable qbf dtype You can use this as an in
171. enu option a description line at the bottom of the window provides information about the option For example Figure 2 3 shows the horizontal menu for the Query module and the description line for the Next option UN Prev First Last Add Update Copy Delete View Browse Join Query Where Total Order Module Info User Exit Full Set sports Customer Cust Mumz 1 Country USA Mame Lift Line Skiing Address 276 North Street Addresse City Boston State MA Postal Code 02114 Contact Gloria Shepley Phone 4617 450 0087 Sales Rep HEH Credit Limit 66 700 Balance 42 568 00 Terms Metz Discount 352 Comments This customer is on credit hold Next record Figure 2 3 Example of a Horizontal Menu You can use one of two techniques to choose an option from a horizontal menu e Press the SPACEBAR TAB or any cursor key to scroll through the menu or list and highlight a selection Press GO or RETURN to choose the option General Information e Type the first letter of the option you want to choose To leave the horizontal menu and return to the Main Menu select the Exit option If any report information is in the window in the Reports Labels or Data Export modules and you want to exit the module Results prompts you to confirm your exit 2 4 3 Selection Lists Sometimes Results displays a list of items that you can choose from These lists look like vertical menus but are different With vertical menus you choose a single item
172. er mode mresults dbname If you have not performed an initial build on this database the system displays a message that there is no qc file for the database you specified In that case you need to perform an initial build For information about the initial build process see the Description of the Initial Build section in Chapter 9 Database Administration NOTE You should not get an initial build prompt if someone has already installed the Results package for you If you do see your database administrator Be sure to shut down the server process when you are done and ready to turn off the computer See the section in this appendix called Shutting Down a Server for the Database for more information A 3 Progress Results User s Guide for UNIX A 4 Starting Results with Multiple Databases This section describes how to start Results from your operating system using more than one Progress Atlas database in single user and multi user modes For more information about the issues involved with using multiple databases see the Progress Programming Handbook There are two things you should know about multiple databases e Before you can start databases in multi user mode you must start servers for them To start servers for the databases see the Starting a Server for the Database section in this appendix This section describes how to use multi user startup commands for Results e When you finish using databases i
173. erefore any field interpreted as greater than 80 characters wide is dropped e If all the fields do not fit in the format Results sorts them in descending order by size Size is determined according to this formula field width label width extent of array After determining the size of the fields Results drops the largest field with the highest order value as taken from the Progress Data Dictionary For example if your last two fields have an order value of 60 and 70 and field 60 contains 35 characters while field 70 contains 15 characters Results drops the field with the order value 60 If this field is an array element it drops the whole array To see if Results dropped any fields while building a form look in the query log QL file See the Logging Initial Build Information section in this chapter for more information about this file Progress Results User s Guide for UNIX For each query form Results creates a procedure file that contains the actual query procedure an include file called by the procedure and a form definition file for the query It places these files in the current directory but you can move them anywhere in the PROPATH By default the output filenames are filename p filename and filename f where filename is the first eight characters of the filename If there is a procedure anywhere in the PROPATH with the same name the new output file takes the name qryxxxxx p qryxxxxx i and qryxxxxx f whe
174. erface to take advantage of any new features or changes If the first digit of the version number changes the internal processes of the Results system have changed You must review any user modules you have programmed and perform an application rebuild If the second digit changes you must rebuild the query forms and might need to revise the user modules and procedures Again you need to perform an application rebuild Finally if the letter changes all user programs should run unchanged However to take advantage of any new features or changes that may have been added perform an application rebuild If you add or change a field in a database file a message appears when you start Results that prompts you to perform an application rebuild If you add a field or file and want it to edit or create the corresponding query form use the Form Definition for Query option See the Description of the Initial Build section in this chapter for more information about the Results QC file Database Administration 9 2 2 Form Definitions for Query Use the Form Definitions for Query option to define and modify query forms When you select the option the screen in Figure 9 2 appears Administration Form Definitions for Quer A Add New Query Form Choose Query Form to Edit General Form Characteristics Which Fields on Form a Permissions Delete Current Query Form Database file name Form type idefault user Query
175. eries of menu options It also provides two options that let you select subsets of records the Query option and the Where option The Query option enables you to enter as much information as you want into a blank record then it finds all the records that fit the criteria you entered Results automatically combines the selection criteria you enter with the AND operator For example you can use the Query option to e Find all customers in Massachusetts e Find all customers who have a customer number greater than 10 AND credit limit greater than 1 000 The Where option enables you to build WHERE clauses to select record subsets You can build WHERE clauses for any type of selection that is you can combine selection criteria using the AND or OR operator For example you can build WHERE clauses that e Find all customers in Connecticut New Hampshire or Massachusetts that have credit limits greater than 1 000 Each query form can be generated automatically for all fields in a file or generated from a user selected subset of the fields within a file When you select the Query module from the Main Menu Results displays a list of forms that you can work with Press MODE to toggle between descriptions filenames and programs You can select forms from any of these lists Once you select a form for example Customer information the first record in that file appears as shown in Figure 4 1 EN Prev First Last Add Update Copy Delete View
176. et Which folder or card Where to look in the folder or on the card When you use Results the terms used are different but the logical sequence of string and searching for data is similar 1 3 Database Basics When setting up a paper filing system you keep all related information about a subject in a filing cabinet For example you might store information about customers in a file cabinet called Customer Inside this cabinet you would keep data about each individual customer in folders You might then store all related filing cabinets together in a common area or room Progress Results User s Guide for UNIX In Progress you store data electronically However the logic of storage is similar to the paper filing system You store data about each individual customer in an electronic folder called a record Then you put all the related records into an electronic filing cabinet called a table Finally you put all these tables in a database which you can think of as an electronic area or room For example if you are running a business called All Around Sports you might have a sales and inventory database that contains information about your customers the kinds of products they have ordered the quantity they have ordered and your overall product inventory Figure 1 1 illustrates the relationship of the sales order and inventory paper filing system to a database Tables Customer Customer Information Folders
177. ets the Progress messages to the language you want Note that you must have the PROLANG product installed to use PROMSGS For more information about PROLANG and PROMSGS see the Progress Installation and Configuration Guide Version 9 for UNIX 2 Edit the results 1 file to set the default language you want Results to use You can switch to other languages within Results using the Language option in the Administration module Note that you must have the RESLANG product installed if you want to use a non English version of Results For more information about RESLANG see the Progress Installation and Configuration Guide Version 9 for UNIX For details on the results 1 file see the Language section in Chapter 9 Database Administration A 2 Starting Results from the Progress Procedure Editor The following steps describe how to start Results from inside Progress When you start Results from the Progress Editor it starts with the databases and modes you specify when you start Progress NOTE Results must be in your PROPATH before you can run it Check with your database administrator if you are not sure If it is not error messages appear after step 2 1 To access Results from the Progress Procedure Editor enter the following procedure RUN results p Enter PROGRESS procedure Press F1 to run 2 4 Press GO If you have not performed an initial build on the first database you specified when you started Progress the sys
178. eys 2 5 Environment variables DLCRES 2 2 PROPATH 2 3 Equal comparison 3 45 Error messages displaying descriptions xx in Expert mode 4 13 Establishing auto select fields 9 24 European date format See Date European numeric format C 5 numeric format B 18 Index 4 European Numeric Format E startup parameter 2 3 3 11 3 33 Evaluating expressions F 2 Exit option 3 19 described 4 7 B 7 Exiting Results 3 63 A 5 multi user mode stopping servers A 5 Expert mode date format C 9 error messages 4 13 European numbers format C 5 in WHERE clauses examples 4 13 invoking in WHERE clause builder 2 4 using in WHERE clauses 4 11 using to change ASCII data export settings 7 11 WHERE clauses described B 5 Export formats maximum per user D 1 Export types 7 5 fixed width ASCII SDF 7 6 Expressions evaluating F 2 F f file E 3 Fast load E 2 files E 2 Field delimiter string 7 6 ASCII 7 10 Progress 7 7 Field formats changing in a report 3 34 Field labels changing 3 34 Field separator 7 6 ASCII 7 10 Field width defining for data export fields 7 11 Field defined 1 3 Fields adding to labels 6 9 adding to reports 5 9 changing formats 3 32 3 34 3 35 defaults in labels See Labels deleting from reports 5 10 maximum for ordering records D 1 maximum on query form D 1 scrolling lists maximum D 1 selected for reports finding 10 12 selecting B 11 selecting for query
179. f Lautaveikkoset Biljardi ja tennis Paris 5t Germain Browse displays a list of customer records with the default fields Cust Num Country Name and Postal Code t Top Fh to set different browse fields 2 3 4 A Tour Through Results The position marker at the bottom of the window tells you the position of the current record relative to the list of records in the window For example when the window shows the whole list the position marker is All Shown When you are at the top or bottom of the list the position marker is At Top and At Bottom respectively When you are in the middle of a list that is too long to fit in the window the marker is empty Use the cursor keys to scroll through this list You can use Browse to help you find a record among a small number of records For example if you do not know the customer number of Thundering Surf you can easily locate the record using the browse feature Move through the list until you find Thundering Surf Inc customer number 16 and select it All the fields in the Thundering Surf Inc record appear Select Browse again The summary list of the customers in the customer file appears again A message at the bottom of the window tells you to press GET if you want to set different browse fields If you want different default fields see your database administrator Press GET This list of fields appears Next Prev First Last Add Updat
180. f the window if the file is large Order Reorders the data in the current form using the ordering sequence dictated by another Progress index When you choose this option a list appears of all the fields indexes that you can use to reorder the data in the active query form For example if customer records are in order by customer number you can change them to be in order by zip code Query Module Table 4 1 Query Module Main Menu Options 4 of 4 1 Switches to any other Results module except Data Administration without going back to the Main Menu You can also transport file field and WHERE clause criteria information to other modules For example suppose you build a query to select all customers in the West sales region Then you decide you want to print a report using that information You use the Module option to take the WHERE criteria over to the Report module then run a report based on the criteria This saves time because you do not have to rebuild the WHERE clause Displays the database name file name any selection criteria you used to define the current working set or subset of data as well as order definition for the records For example you may have selected the Where option to define a subset of customer data and put the records in order by zip code This option displays that information Transfers to a customized option This option is hidden by default you see it only if an application developer has in
181. fault Display Formats The formats you define in Results are local to Results To change the formats in the database you must use the Progress Data Dictionary To test different display formats create and run a report and observe the results If you want to change the format of fields in reports select the Settings option in the Reports module and select the Formats and Labels option This option enables you to change formats and labels in reports Change the formats for a couple of fields and run the report again If you like the results better save the report In the Data Export module you can change the format of fields in Fixed width ASCII SDF format reports using the Width and Format of Fields option Progress Results User s Guide for UNIX Results Limits This appendix lists the limits that exist within Results The limits are e Maximum number of files that can be joined together 5 e Maximum number of join relationships you can store 1024 e Maximum number of fields in a WHERE clause 48 e Maximum number of query forms 512 for each qc file regardless of how many an individual user can see e Maximum number of files in a scrolling file list 512 e Maximum number of fields in a scrolling field list 1024 The total number of fields includes the fields in files plus any calculated fields and fields in joins Note that if you join five files and each has 200 fields then the scrolling field list is equal t
182. fault settings for reports It also enables you to adjust spacing within your report For example it enables you to set the number of character spaces for the left margin and between each column Your database administrator can define different default settings For more information see Chapter 9 Database Administration Move the cursor to the field you want to change Type the new value in the field For example if you want to leave three spaces between each column of the report enter 3 in the Spaces between columns field If you want to put a blank line between each line in your report to make it easier to read enter 2 in the Line spacing field Line spacing does not affect the header or labels of the report NOTE The Lines per page field shows the default and current settings for the number of lines per page a report has when you send it to a printer or other paged device The number of lines per page on a terminal is different When you send your report to your terminal it automatically adjusts the paging according to the size of your terminal 4 Reports Module Press GO to make the changes to the report Notice that the Report Width changes if you changed the left margin or the number of spaces between columns 5 4 6 Changing the Order of Records in a Report This section describes how to change the order of records in your report You can order records by as many as five fields le 2 3 4 5
183. fields and a period point acts as a place holder For example with your format set for European display the format gt gt gt gt gt gt 9 99 appears as gt gt gt gt gt gt 9 99 For more information about field formats and the E startup option see Appendix C Field Display Formats 9 Press GO or RETURN The new field appears in the Report Layout window Note that the report layout is too wide to display on the screen Use the gt and lt keys to scroll to the left and right of the Report Layout window to see all the field format The n marker tells you that this is a numeric expression field In this case it is a math expression field Bet Put Run DEMS Settings Where Order Clear Info Module Exit a geport Info Files mysports Customer mysporte Order t mysports Order Line i mysports Item Orders Report Layout rder num Line num Item Mame Oty Price MES 20 228 88 5 222 228 83 n epart Midth B83 10 Run the report to your terminal Again use the gt and keys to scroll left and right across the page to see all the field values There are a couple of things you can do to make this report easier to read and more meaningful You can change the label and format of some of the fields so they fit within the screen You can also hide repeating values so you do not see the customer name or order number more than once 11 Press END to return to the Report Layout window
184. fo User Exit Cust Numt 2 Fi t Urpon Frisbee Address Rattipolku 3 Address2t City Valkeala State Uusimaa Postal Code 45360 Contact Urpo Leppakoski Phone lt 60 532 5471 Sales Rep DKF Credit Limit 27 600 Balance 17 156 00 Terms Metz Discount 35 Comments Ship all products 2nd Day Air 8 11 Progress Results User s Guide for UNIX You see customer number 2 because the records are in order by customer number If you select Prev Previous the screen displays the record for customer number 1 again If you choose Last you see the last record in the file When you select First you see the first record in the file If you have the Add Update Copy and Delete options on your horizontal menu continue with the next section If not skip to the Browsing Through Records section 3 3 2 Adding and Deleting a Record This section describes how to add a record to a file and delete a record from it Adding a Record 1 Select Add A blank record appears so you can add values to create a record The fields you can edit are highlighted or underlined depending on your monitor type Notice that the Cust Num field contains the number 1005 as shown in the following screen This number is created automatically by Progress via the Sequence feature in the Data Dictionary The default initial value of the sequence has been set to 1000 and the incremental value to 5 That s why when you select Add the number 1005 appear
185. forms 9 10 width defining for export fields B 21 File defined 1 3 Files active B 11 deleting relations 9 12 joins maximum D 1 moving E 2 E 4 relations between 9 11 scrolling file list maximum D 1 Files options 9 8 Fill characters display formats C 3 First option 3 11 described 4 5 B 7 Fixed width adjusting B 21 Fixed width ASCII SDF export type adjusting width 7 11 Fixed width ASCII SDF export type 7 6 Footers adding to reports 5 12 creating 5 6 defining B 18 last page only 5 6 B 19 Form files See f file Index Formats defaults B 12 defining data exports B 21 report fields B 16 defining for report fields 5 4 display character C 3 date C 8 logical C 8 numeric C 4 C 5 See also Display formats testing C 9 display defaults data types C 2 overriding C 9 Formats and labels defining reports B 16 Forms See also Query forms switching 4 8 Function delimiters 3 48 5 12 B 18 B 18 Function keys 2 4 Functions headers B 18 in headers 3 48 5 12 G Get option 3 28 described 5 3 B 3 using 6 5 Getting label definitions 6 5 Getting saved reports 3 28 H Headers adding to reports 3 48 5 12 creating 5 5 Index 5 Progress Results User s Guide for UNIX defining B 17 first page only 5 6 B 19 using functions 3 48 5 12 B 18 Help accessing 1 12 integrating customized messages 10 5 keys 2 4 Progress messages xx Hide repeating v
186. four As mentioned earlier this is the default layout for a label built from the mysports file You can add other fields to this layout by pressing GET Once you exit the definition window you can get back to edit it by selecting the Define option Also your database administrator can determine the field names used when generating labels automatically For example instead of mailing labels it could automatically try to create packing labels See Chapter 9 Database Administration for details on changing the default fields for labels Notice that Results numbers the lines of the label layout Your label can be up to 66 lines long Use your cursor keys to scroll through the window A Tour Through Results 6 Press GO to accept these settings The label area returns to its original layout Label Layout Omit Blank Linest Total Height 6 Text to Text Spacing 0 width Copies of Eacht Top Margint Left Margin Indent 0 mysports Customer Names Label Text gt Amysports Customer Address and Fields gt imuysparts Customer Address2 mysports Customer Postal Code Number of dmysports Customer Country Labels lal l I lal mysports Customer Cityt tmysports Customer lal Across l l 7 Run the labels on your terminal Again the tilde shows that the Postal code field belongs on the line with the City and State fields In some cases an ellipsis shows that the f
187. g 9 18 Width format defining export fields B 21 X x maximum report marker 5 8 B 12 Index 13 Progress Results User s Guide for UNIX Index 14
188. guration file with the rest of your database files If the system cannot find your file it generates a default configuration file and you loose all your customized system setup data You do not have to include the file because it just contains information about the initial build 10 12 2 Query Form Information If you permit users access to the Query module in Results you must include a procedure for each Query interface Each Query procedure consists of three files 1 A procedure file that passes parameters to a Progress include file to generate the entire query form interface 2 A form file definition that contains the forms layout for that query interface 3 An include file that contains assignment information for each particular query interface When you compile the procedure file it references the form and include files The compiler produces a single executable file called the object file The object file is a stand alone file that does not require the p i or f file information to run You only need the p i and f files if you then use the Application Rebuild and Form Definition for Query options The machine the development platform you used when you developed your application and the Results interface determines how you perform queries e Ifthe target platform for the application is the same as your development platform you used to compile your application and the Results interface you only have to include the compi
189. h file As you exit Results it automatically deletes these files But if your system crashes they could remain on your disk You automatically delete these scratch files by starting Results in that directory then exiting Or you can delete them manually Progress Results User s Guide for UNIX Order of Evaluation This appendix describes how to evaluate expressions For example it describes how to evaluate complex WHERE clauses and how grouping parts of an expression with parentheses affects the evaluation Progress Results User s Guide for UNIX F 1 Using Expressions You use expressions in the Expert Mode of WHERE clauses Expressions are used in many Progress statements and functions If the value of one or more of the components of an expression is an unknown value the result of the expression is usually an unknown value NOTE When you use expressions to perform mathematical calculations and the result of operations involving integers is larger than the largest value of an integer 2 billion Progress might end abnormally F 1 1 Evaluating Expressions When evaluating expressions Results uses precedence in determining the result Consider the following expression 3 5 42 The result of this expression is different depending on the order that you process the multiplication and addition operators For example 3 5 2 is 21 but 3 5 2 is 17 If an expression contains two operators of equal precedenc
190. he Info option enables you to recall the criteria you used to select the current set or subset of records Follow these steps to display the information for a previously defined WHERE clause le Select the Info option A window listing file relations appears on the display The following example shows the type of information you might see when you have a WHERE clause defined and two files are joined Next Prev First Last Add Update Copy Delete Browse Join Query Where Total Module User Exit File 1 mysports Customer Where cust num gt 10 File 2 mysports Order Relation OF mysports Customer In this case the window shows that there is a WHERE clause defined on the first file and the first file is joined to another file 2 Press END to return to the Query window 4 3 7 Moving to Another Module This section describes how to use the Module option to move from one module to another within Results In the process you transfer any query criteria WHERE clause criteria and join information that you have already defined to the module you selected 1 Select the Module option The list of modules to which you can transfer your query criteria appears Next Prev First Last Add Update Copy Delete Browse Join Query Total Info User Exit Subset mysports Customer Cust Num 11 Country Finland Name Keil L Labels Address Vattuniemenkuja 8 A Address D Data Export City Helsinki State Uusimaa Postal Co
191. he WHERE clause or exit the WHERE clause builder and run the report with the current WHERE clause Select No when Results prompts you to enter more values for the field Reports Module 8 Select No when Results prompts you to enter more selection criteria Results returns to the Reports window and displays the WHERE clause in the Report Info window i my P i musports rder Line t mysports Item BY mysports Customer Name 9e Run the report to your terminal to test the prompt The question you entered appears as a prompt Enter a Value Context Name is Equal some character value Show information for customer with what name The context line describes the meaning of the WHERE clause and its question 10 Type lift line skiing at the prompt and press RETURN 11 Select Terminal from the list of output devices You can run the report again entering a different value at the prompt 12 Save the report 5 23 Progress Results User s Guide for UNIX 5 5 5 24 Creating Totals Only Reports This section describes how to create a totals only report You can use the Totals Only Report option to display summary information about groups of records To use the Totals Only Report option you must have order criteria defined for the report Then you can summarize the report on the last field in the order list so that a new line appears each time the order field value changes
192. he other symbols exist for the field but you do not see them 5 4 Report Features The tour of Results in Chapter 3 A Tour Through Results gives you basic information for creating Reports For example it describes how to define files and fields in reports This chapter describes more features and options in the Reports module 5 4 1 Adding Fields to a Report You should have the report you want to edit laid out in the window Follow these steps l Select the Get option to retrieve the report you want to edit 2 Select the Define option Because you have already defined files in your report the window displays the following list of options Fields Active Files Totals and Subtotals Running Total Percent of Total Counters Math Expressions 4 String Expressions Numeric Expressions Date Expressions E A T R P C M S N D 3 Select the Fields option The list of fields reappears the fields already in the report are still marked 4 Highlight the field you want to add to the report Progress Results User s Guide for UNIX 5 Press RETURN if you want the new field to be the last field in the report Otherwise type the number that corresponds to the position where you want the field For example if you want it to be the second field in the report type a 2 next to it and press RETURN If you typed the first letter of the field to highlight it you have to select it then change its order nu
193. herwise be ambiguous braced required or bracketed optional groups clarify the groupings In this example WITH is followed by several optional items SYNTAX WITH ACCUM max length expression DOWN centered J n cocumns sipE LaAsELs J sTREAM 10 In this example ASSIGN requires one of two choices either one or more of field or one of record Other options available with either field or record are grouped with braces and brackets The open and close braces indicate the required order of options SYNTAX ASSIGN 1 1 FRAME frame 1 field expression WHEN expression Ies record EXCEPT field Progress Messages XX Progress displays several types of messages to inform you of routine and unusual occurrences Execution messages inform you of errors encountered while Progress is running a procedure for example if Progress cannot find a record with a specified index field value Compile messages inform you of errors found while Progress is reading and analyzing a procedure prior to running it for example if a procedure references a table name that is not defined in the database Preface Startup messages inform you of unusual conditions detected while Progress is getting ready to execute for example if you entered an invalid startup parameter After displaying a message Progress proceeds in one of several ways e Continues execution subject to the error proce
194. his section describes how to define a label using only menu driven features to pick fields and insert text into a label layout The examples in this section show inventory labels that list the item number unit cost description and unit weight for the items you have on hand le Select the Define option and select the files you want to use to define the labels Results prompts you to have fields selected automatically If you select Yes Results automatically tries to build address labels By default it looks for address label fields Name Address Address2 etc Field names included in the automatic layout are defined through the Administration module by your database administrator Your database administrator can change the automatic label layout and alter the defaults to lay out any type of label based on any group of field names If you select No Results leads you through a process to manually select the fields for the label Select the No option A list of all the fields in the active files appears You can select any of these fields for your labels To select a field highlight it and press RETURN Progress Results User s Guide for UNIX 6 8 3e 4 5e Select the fields in the order you want them to appear As you select each field Results numbers them in the order in which you select them If you select a field by mistake highlight it again and press RETURN to deselect it If you select a field out of order high
195. ield Comparisons Address mysports Customer Address mysports Customer Balance mysports Customer City mysports Customer Comments mysports Customer Contact mysports Customer Country mysports Customer Credit Limit mysports Customer Cust Num mysports Customer Expert Mode Bustomer cust num gt 10 or customer credit limit gt 1500 1 2 a 4 5 6 8 Now you can type or edit the WHERE clause criteria you want You can add a field without typing it in by pressing GET and selecting it from the list of available fields that appears 3 Press MODE to toggle to the Insert mode so that you do not type over existing information 4 12 4 5e Query Module Edit the existing WHERE clause or enter the one you want Results automatically enters the word WHERE in the clauses If you enter it yourself you will get error messages in the Expert mode window when you try to run the WHERE clause You do not have to capitalize the field names or the operators but you must prefix each field name with the name of the database and file that contains it You do not have to include the database name unless you started Results with more than one database If you did specify the database that contains the field you enter For more information about using Results with multiple databases see Chapter 8 Multiple Databases with Results e Press GET to access
196. ields are too wide to fit in this screen Again these abbreviations do not appear in your labels or affect the way the labels print The following page of labels appears Lift Line Skiing 276 North Street Boston MA 02114 LISA Urpon Frisbee Rattipolku 3 Valkeala Uusimaa 45360 Finland Hoops Croquet Co Suite 415 40 Grove St Hingham MA 02111 USA UP and DOMN to nawis F4 when do Notice that there are no blank lines for the Address2 field because the default value for Omit Blank Lines is yes You can add more fields and text to this label as well as adjust the layout and number of times each label prints 3 57 Progress Results User s Guide for UNIX 8 Return to the labels screen and select the Define option then the Fields option The Label Layout window becomes active again The label definition fields are underlined or highlighted depending on the monitor type Follow these steps to insert a field a few lines below the last text line 9 Move the cursor to line 7 The message at the bottom of the screen indicates that you can press GET to insert fields 10 Press GET to display a list of fields you can insert Choose Field ta Insert t er Address mysports Customer Balance mysports Customer City mysports Customer Comments Cmysports Customer Contact Cmysports Customer Country Cmysports Customer Credit Limit mysports Customer Cust Num mysports Custo
197. ighlights all the fields in the current form To make the new record unique change the value in the primary index field If you do not change that information Results displays a message indicating that a record already exists with that value 2 Press GO when you finish entering information in all of the fields you want to change 4 3 3 Switching to Other Forms To switch to a different set of records in another Query form l Select the View option A window of query forms that you can select to view appears This list of query forms can be listed by description filename or program name 2 Select the form you want to view For example you can switch from the customer form to the state form A window with the first record in that form appears Query Module 4 3 4 Querying for Records This section describes how to use the Query option to generate a subset of records from a file This option lets you quickly build simple WHERE clauses called queries where you compare one value for each field and each comparison is joined by AND With the Where option you build WHERE clauses that can compare many values to one field and you join comparisons using AND or OR For example you can perform queries to select subsets of records e Customers in California In WHERE clauses this means WHERE State CA When you use the Query option a record must meet each criteria for it to be in the subset Follow these steps to use the Q
198. ight B Text to Text Spacing _ width Copies of Each 1 Top Hargin Q Left Margin Indent tmysports Item Item num a Label Text gt tmysports Item Item Name and Fields gt o mysports Item Price n do a 2 Adjust the settings then press GO to apply them The following sections describe each of the Settings options Progress Results User s Guide for UNIX Omitting Blank Lines By default Results omits blank lines when it finds blank field information In Figure 6 2 the address labels on the left omit blank lines while the labels on the right do not Blank Lines Omitted Second Skin Scuba 79 Farrar Ave Yuma AZ 85369 Match Point Tennis 66 Homer Ave Como TX 75431 Off The Wall 20 Leedsville Ave Export PA 15632 Blank Lines Shown Second Skin Scuba 79 Farrar Ave Yuma AZ 85369 Match Point Tennis 66 Homer Ave Como TX 75431 Off The Wall 20 Leedsville Ave Export PA 15632 Figure 6 2 Omit Blank Lines Versus Show Blank Lines When you leave the Omit Blank Lines option set to yes it does not affect any blank lines you leave in the layout Instead it only omits lines where all field information for the line is missing For example it omits the line reserved for Address2 information when the line is blank there is no secondary address If you want the label to show blank lines move the cursor to the Omit Blank Lines fiel
199. iles mysports Customer Choose Field to Total Customer Name musports Customer Ord Num Cmysports Order Line Num Cmysports Order Line Item Mame Cmysports Item Qty Cmysports Order L ine Price Cmysports Order Line Price Line Numeric Expr You can define totals for any of these fields 3 38 Clear Info Module User Exit Oty Price Price Line 2 5 90 5 290 99 gt gt gt gt gt 539 99 en 3e 4 5 6 A Tour Through Results You can use the MODE key to view the listing of the fields on the report by label or by name If you are listing fields by label select the Price Line field If you are listing fields by name select the qbf 007 field The following window appears For field qbf 007 musports rder Line tuy mysports Item Price Perform these actions When these fields change value Total Count Min Max Awg na na na na Summary Line na na na na no mysports Customer Mame The Summary Line option lets you define a summary line for the Price Line field You can show the total count minimum maximum and average values for the Price Line field For example if you want a summary line at the end of the report to show the total cost of orders for all customers change the first no under Total to yes Because you defined sort order on a field you can also define totals on it For example you can show the total cost for orders for each customer
200. in a Results module using a math function For example a percent of total field Character Data Type A property of a field or variable that determines that only character data can be stored in it Characters cannot be arithmetically manipulated Column Label A label displayed above a column of data field values Command An instruction to the system Comparison Expression A combination of constants variables operators and parentheses used to compare values Constant A value that does not change Data Dictionary A menu driven utility in Progress used to maintain the structure of a database In lowercase data dictionary is a synonym for schema that is it refers to the actual database structure definitions Typically in Progress Data Dictionary refers to the Progress program while the terms schema and data definitions are used to refer to the database structure Data Format The display layout of the data in a field Different types of data have different data formats See Appendix C for more information See also Display format Data Integrity Certainty of data accuracy or validity Data Type The type of data contained in a field There are several types of data decimal integer logical character and date Database A collection of files that relate to a broad subject area Glossary Database Administrator An individual responsible for maintaining a database management system This person is authorized to gr
201. ing Totals Only reports e Deleting saved reports Progress Results User s Guide for UNIX NOTE Several of the Reports module options are described in Chapter 3 A Tour Through Results and are not described in this chapter The steps in this chapter build upon what you learned in Chapter 3 You should complete or review the tour before continuing with this chapter This chapter assumes that the Reports module is available in your Results package If it is not see your database administrator Reports Module 5 1 Introduction Use the Reports module to quickly create single section reports Reports can consist of data from one or more Atlas database files as well as calculated values and totals Once you define a report you can display it on your screen send it to a printer or send it to an operating system file If you attempt to load an existing report whose file structures have been modified since the last time you ran the report the Reports module notifies you and adjusts the report as best it can You can also modify your report layout through menu choices You have complete control over headers footers labels and spacing The Reports module window is divided into three sections horizontal menu information window and layout window The next section describes the options on the horizontal menu 5 2 Reports Module Main Menu Horizontal menu options appear at the top of each window throughout your reports process as sho
202. ing on the field you choose For example if you chose Credit Limit the Comparison window would only list comparisons you can make to numbers since Max credit is a numeric field value Select the Equal comparison If you select the wrong operator by mistake press END to return to the Comparisons window and select a different comparison The screen adds an equal 2 symbol to the WHERE clause and prompts you to enter a number to compare to Sales rep Discount imysports Customer Name mysports Customer Enter a Value Phone mysports Customer Postal Code mysports Customer Sales Rep mysports Customer Label 14 af 1B Expression mysports Customer Sales Rep If you press PUT you can enter a prompt that appears when the report runs For example you can have the screen prompt for a value to compare the sales representative field Anyone running the report could decide what sales representative they want the WHERE clause to select For more information on this prompt see the section Adding a WHERE Clause with Ask Mode in Chapter 5 Reports Module In this tutorial you enter a value to compare to Sales rep Type sls and press RETURN Results prompts you to enter more values for sales representative Enter more values for Salez Rep Yes NNNM 7e 8 9 6 A Tour Through Results If you select Yes you can add more cri
203. ing values for the output device you selected appear as defaults General Device Characteristics If you select this Results prompts you for the same information as in Add New Output Device field the description the logical name of the device the width of the output in characters and the device type as defined by the list on the screen For more information see the Add New Output Device section in this chapter Control Sequences Use this option to set printer control sequences The Initialization field enables you to send a set of control sequences to the output device ahead of your information Thus you can control the format of your document For example you can change your document position from portrait to landscape set margins and add header and footer space See your printer documentation to determine the control sequences you can use The remainder of the fields in this option Normal Print Compressed Bold ON and Bold OFF are reserved for future versions of Results Database Administration Printer Permissions Select Printer Permissions after you use Add New Output Device or Choose Device To Edit to select the output device for which you want to set permissions You set permissions by creating an IDLIST as described in the Security Options section in this chapter Delete Current Device Use this option to delete any of the previously defined output devices 9 4 3 Terminal Color Settings Use the Terminal Colo
204. ion D Default Report Settings Module Permissions E User Defined Export Format Query Permissions L Label Field Selection Sign on Program Product Mame U User Option Select an option or press F4 to exit and save changes Figure 9 1 Administration Module Main Menu The Results version number appears in the lower right corner of the window See the Application Rebuild section in this chapter for more information about the version number The following sections describe Administration module options in the order that they appear Progress Results User s Guide for UNIX 9 2 1 The Files Options There are three files options Application Rebuild Form Definitions for Query and Relations Between Files Use these options to rebuild the Results application interface build customized forms for query interfaces and establish relationships between files Application Rebuild Use the Application Rebuild option to easily port your query interface forms from one environment to another This option builds and compiles the new query interface and re establishes all the system defaults including any default overrides previously established such as form fields and menu permissions etc Use this option when you update your Results application to a new version For example when you first start a new version of Results it checks the version in the QC file and warns you to perform an application rebuild to regenerate your int
205. ith a character from a z or A Z The name can consist of alphabetic characters digits and the characters amp and _ User IDs are not case sensitive they can be uppercase lowercase or any combination of these A user ID can be blank or written as the string but it cannot be defined this way through the Data Dictionary Glossary Vertical Menu A series of options you can select from a vertical list that runs down the screen The Results Main Menu is an example of a vertical menu See also Menu WHERE Clause A phrase that enables you to qualify or limit a set of information For example you can build a WHERE clause to show information for customers WHERE the customer number is greater than ten The WHERE clause builder is available in the Query Reports Labels and Data Export modules Glossary 9 Progress Results User s Guide for UNIX Glossary 10 Symbols in field labels 3 35 B 16 summary field marker 5 8 See Totals Only reports amp hide repeating values report marker 5 8 amp marker for hiding repeating values 3 36 available report 6 6 in Report Info list 3 28 c counter report marker 5 8 d date report marker 5 8 e stacked array report marker 5 8 n numeric expression report marker 5 8 B 14 p percent of total report marker 5 8 r running total report marker 5 8 s string expression report marker 5 8 file extension 9 5 9 6 files E 3
206. ker 5 8 B 12 c counter B 13 Character data types display format C 3 Clear option described 5 7 B 6 Clearing labels 6 6 Code generated by Results 10 18 Color settings See Terminal color settings Column labels stacked 3 35 10 14 B 16 Columns maximum in reports D 2 Combining files from different databases See Join option Combining files See Join option Commands shutdown servers A 5 Comparison operators listed 4 9 Configuration file See qc file Configuration options 9 17 Connection parameters multiple databases A 4 See also Startup options Control sequences for output devices 9 20 Copy option 4 8 described 4 5 B 8 Copying labels 6 6 Copying sports database See Demonstration Database Copying records See Records COUNT function B 18 Count marker c B 12 Counters defining B 13 marker n B 13 Creating ASCII data export formats 7 10 Creating data export formats 7 7 Creating reports 3 21 Creating mysports database See Demonstration Database D d date B 16 d startup parameter 2 3 Data Export accepting defaults 3 53 Data export menu options B 21 Data export formats user defined 10 19 Data Export module 3 51 adding fields 7 7 creating non Progress formats 7 8 defining ASCII formats 7 10 defining formats 7 7 defining settings 7 4 deleting formats 7 5 features 7 6 introduced 7 2 layout settings 7 5 menu options 7 3 Progress format 7
207. ld Reports Module If you select the wrong field press END to return to the list to select another field Options appear in the Comparisons window and the beginning of the WHERE clause appears in the Expression window This figure shows both Get Put Run Define m Choose a Address Address Balance City Comments Contact Country Credit Limit Cust Num Discount Name Phone Postal Code Sales Rep Hame Settings rder Clear Field Comparisons mysports Customer mysports Customer mysports Customer mysports Customer mysports Customer mysporte Customer mysports Customer mysports Customer mysports Customer mysports Customer mysports Customer mysports Customer mysports Customer mysports Customer 11 of 1 Not Equal Less Than Less or Equal Greater Than Greater or Equal Begins Contains Hatches Info Module User Exit Enter a Value mysports Customer Name Expression Select the type of comparison to perform on the fie In the Expression window notice that the database name and the filename prefix the field name This information is very helpful when you are using multiple databases Also the Comparisons window shows all the choices you can make with the field you chose Based on the field selected this list can be abbreviated For example if you chose Credit Limit a numeric field the list only shows comparisons that
208. ld and export format information including e The fields selected for export e A description of the export format e The export type ASCII WordStar WordPerfect Progress etc e A yes or no value that indicates if Results will export the field name as the first line of the export Progress Results User s Guide for UNIX 7 4 The initialization string at the start of a record The initialization string is the set of characters that precedes the record data on each line of the export file For example an asterisk may mark the beginning of a line See the Settings option description in Appendix B Option Descriptions for more details The record termination string The record termination string is the set of characters that can indicate the end of each record in an export file See the Settings option description in Appendix B Option Descriptions for details The field delimiter string The field delimiter string is the set of characters marking the beginning and end of each field value The field separator string The field separator string is the set of characters that separates each field value within a record Data Export Features The tour of Results in Chapter 3 A Tour Through Results gives you basic information for exporting data using the Data Export module For example it describes how to export a report in a non Progress format and describes how to delete a WHERE clause This chapter describes
209. ld names that Results searches for in the user selected file and put them in the label You can use wildcard characters or for example as search strings Database Administration When you select this option ten entries appear that can have associated defaults You can enter field name defaults for Name e Addrl e Addr2 e Addr3 e City State e Zip e Zip 4 extended zip code e C SZ a field with the combined city state and zip code information e Cntry country When you finish updating the information the QBF configuration file is updated to reflect any changes By default each language version of Results has different default address fields settings These are set when you perform an initial build against a database For example if your default language is set to German when you perform the initial build Results has the German default address field settings If you use the Language option to change to a different language the German fields remain the default fields To change the fields after the initial build select the Label Field Selection option 9 5 5 User Option Use this option to define the program the User option calls from each module You create a user program with the Progress 4GL to perform a specific task The default user option is u option p You can edit this option or include your own For more information on integrating the Results package into existing software packages see Chapter 1
210. lds as summary fields the system counts them For example if you mark the State field and there are two states in the group Results places a 2 in the State field 5 25 Progress Results User s Guide for UNIX 5 Select or deselect fields so that the fields you want to summarize are marked or use the default settings 6 Press GO to apply the settings A few changes appear in the Reports window For example you might see this window Get Put Run Define SEES here Order Clear Info Module User Exit Report Info Files mysports Customer mysports State Order BY mysports State Region BY mysports Customer Sales Rep Totals Only Report Layout Balance Credit Limit xia xiz 5 222 2208 83 gt gt gt gt 22d t The dollar symbols show you the fields that are marked as summary fields and the Totals Only indicator tells you this report is a totals only report 7 Runthereport to your terminal and check the output to ensure that you get the results you expect 5 5 2 Summarizing a Non numeric Field When you mark character date or logical fields as summary fields the system counts them For example since there are two customers in Florida Results places a 2 in the Name field Mark the non numeric fields you want to summarize with an asterisk using the Totals Only Report option and press GO When a field is non numeric it cannot be added to another field Instead Result
211. lect an item highlight it and press RETURN again The asterisk or number disappears indicating that you deselected it When you have made your selections press GO to enter them and exit the selection window Where To Go From Here Now that you are familiar with the common features of the Results interface you can turn to the chapters that address your needs For details about the contents of the chapters and appendixes in this guide see the Organization of This Manual section of the Preface A Tour Through Results This chapter introduces you to some basic features in the Results modules specifically the Query Reports Labels and Data Export modules The tutorial steps describe how to access and use these features This chapter contains the following Steps to create a copy of the sports database and start Results to run the tour and try the examples in Chapters 4 through 7 A Query module section that describes how to find records add and delete records and join related files A Reports module section that describes how to pick fields for the report run and save the report and add headers It also describes how to use the WHERE clause builder to select groups of records to include in the report A Data Export module section that describes how to transfer information using the Module option It also describes how to export data to non Progress format and how to delete WHERE clauses A Labels module section that describes
212. led object file portion of the query procedures e Ifthe target platform for the application is different a different CPU or different operating system than the development platform you have to include the p f and i portions of the query interfaces and recompile them on the target platform Use the Application Rebuild option to recompile it 10 25 Progress Results User s Guide for UNIX 10 26 A Startup and Shutdown Procedures There are several ways to start Results depending on how many databases you want to use and how many users you want to access each database For example you can start Progress with one database or more than one database in single user mode or multi user mode Each method is described in this chapter This appendix describes how to start Results e From the Progress Procedure editor e With one database in single user mode or multi user mode e With multiple databases in single user or multi user modes This section includes the startup method required to follow the examples in Chapter 8 Multiple Databases with Results Choose the startup method that is appropriate for you Progress Results User s Guide for UNIX A 1 Running Results in Non English Languages If you want to run Results in a language other than English there are two things you should do before you perform the initial build against a database 1 Set the PROMSGS environment variable to the language you want to use This s
213. lidation expressions Since there is no easy way to place the DEFINE SHARED VARIABLE declaration into the query procedure these types of validation expressions cause problems If there are shared variables in the validation expressions edit the validation expression Note that you can manually edit the p file but an Application Rebuild might undo it NOTE The use of the INPUT function in the validation phase causes compile errors because there is no user input Progress Results User s Guide for UNIX G 2 3 R code Greater than 63KB The r code can be greater than 63KB for many reasons e Progress makes r code big if there are a lot of fields in the file whether the fields are referenced or not e Long validation expressions e Long help messages or validation messages TED e In decimal items with Query enabled expand to a complicated expression to support or ee as the decimal character e Complicated forms or long labels e Long formats To shrink the r code e Eliminate all Browse fields Enter no in the Brow column in Which Fields on Form in the Form Definitions for Query menu e Eliminate all Add Update Copy fields Enter no in the Upd column in Which Fields on Form in the Form Definitions for Query menu e Hliminate all Query fields and use the Where option instead Enter no in the Qry column in Which Fields on Form in the Form Definitions for Query menu e Consider using on
214. light it and type the order number next to it Results renumbers the other fields automatically Press GO to insert these fields into the Label Layout window For example you can insert your fields in this layout Get Run Settings Clear Module User Exit Label Info Files mysports Item Order Label Layout Omit Blank Lines yes Total Height 6 amp Text to Text Spacing width Copies of Each 1 Top Margins Left Margin Indent 11 Enusports Item Iten num 2 dmuysports Item tem Mamet 3 imgspartz Item Pricel n a Q The field names have the names of the files they come from as their prefixes You can add other fields to this by positioning the cursor and pressing GET Once you exit out of the definition window you can get back in to edit it by selecting the Define option If necessary use the Settings option to adjust the Total Height value Consider the height of the label and height of the label definition 6 3 7 Adding Text to Labels This section describes how to add text to a label definition To add text to a label definition the Label Layout window must be open The window opens when you create a new label and when you define new fields for an existing label Follow these steps to re create this process le 2 3 4e Select the Define option then the Fields option Position your cursor where you want to place the text Press MODE
215. ll capitals are used for Progress key functions and generic keyboard keys END ERROR GET GO ALT CTRL SPACEBAR TAB e When you have to press a combination of keys they are joined by a dash You press and hold down the first key then press the second key CTRL X e When you have to press and release one key then press another key the key names are separated with a space ESCAPEH ESCAPE CURSOR LEFT xvi Syntax Notation Preface The syntax for each component follows a set of conventions Uppercase words are keywords Although they are always shown in uppercase you can use either uppercase or lowercase when using them in a procedure In this example ACCUM is a keyword SYNTAX ACCUM aggregate expression Italics identify options or arguments that you must supply These options can be defined as part of the syntax or in a separate syntax identified by the name in italics In the ACCUM function above the aggregate and expression options are defined with the syntax for the ACCUM function in the Progress Language Reference You must end all statements except for DO FOR FUNCTION PROCEDURE and REPEAT with a period DO FOR FUNCTION PROCEDURE and REPEAT statements can end with either a period or a colon as in this example FOR EACH Customer DISPLAY Name END Square brackets around an item indicate that the item or a choice of one of the enclosed items is optional In this example STRE
216. long it took to run the report the last time if it has been run User Transfers to a customized option You only see this option if an application developer has included an option program to perform a task If you have this option see the documentation provided by the application developer Module Switches to any other Results module except Data Administration without returning to the Main Menu 5 7 Progress Results User s Guide for UNIX 5 3 5 8 Report Markers When you create reports the fields you select appear in the Report Layout Window Sometimes Results puts markers under fields to indicate the features and types of fields you select for your reports For example a d marker below a field indicates that it is a date field Use Table 5 1 as a reference when you create reports Table 5 1 Report Layout Markers E NENNEN AMNEM n these markers n is a number between 1 and 6 representing the level of the total or subtotal For example a 1 represents a total on the first order by and a 6 represents a grand total at the bottom summary line Reports Module A field can have as many of these symbols as you define for it but they cannot all appear in the Report Layout window You only see the number of symbols that fit within the width of the field For example a field could have 11 of the symbols defined for it and have a format that is 5 characters wide In that case you only see the first 5 symbols T
217. lopment guide for generating Report Builder reports using the Progress Report Engine Progress Report Builder Tutorial Windows only A tutorial that provides step by step instructions for creating eight sample Report Builder reports Progress Report Builder User s Guide Windows only A guide for generating reports with the Progress Report Builder Progress Results Administration and Development Guide Windows only A guide for system administrators that describes how to set up and maintain the Results product in a graphical environment This guide also describes how to program customize and package Results with your own products In addition it describes how to convert character based Results applications to graphical Results applications XXiv Preface 4GL Building Distributed Applications Using the Progress AppServer A guide that provides comprehensive information about building and implementing distributed applications using the Progress AppServer Topics include basic product information and terminology design options and issues setup and maintenance considerations 4GL programming details and remote debugging Progress External Program A guide to accessing non Progress applications from Progress This guide describes how to use system clipboards UNIX named pipes Windows dynamic link libraries Windows dynamic data exchange Windows ActiveX controls and the Progress Host Language Call Interface to communicate with non
218. ls move the cursor to the Number of Labels Across field and type the number of columns that you want 6 4 Summary This chapter described many of the features you can use to create and enhance your labels It described how to save retrieve copy run and delete label definitions It also described how to define labels manually add text and fields and adjust print settings Data Export Module This chapter describes the features in the Data Export module It provides you with information on e Menu options in the Data Export module e Adding fields to a Data Export report e Exporting reports in Progress format e Exporting data in non Progress format e Exporting data in ASCII format Using Expert mode to change ASCII settings NOTE Several of the Data Export module options that are described in Chapter 3 A Tour Through Results are not described in this chapter The steps in this chapter build upon what you learned in the tour of Results You should complete or review the tour before continuing with this chapter This chapter assumes that the Data Export module is available in your Results package If it is not see your database administrator Progress Results User s Guide for UNIX 7 1 Introduction The main purpose of Results is to enable you to easily access database information Because you might also need to export database information to another software package the Data Export module provides
219. m Shared variable name has not yet been created or Conflict in extent data type or undo status for shared variable name where name is the name of a shared variable Such an error can keep the user program from executing and can possibly terminate the session To avoid this you have to rebuild your application See the Application Rebuild section in Chapter 9 Database Administration 10 6 2 Determining the Originating Module Use the following shared variable in your Progress procedures to determine which Results module the user was in when they selected the User option Use this information to return the user to the originating module or another module after running your add on User module DEFINE SHARED VARIABLE qbf module AS CHARACTER NO UNDO The qbf module variable holds one of the values listed in Table 10 1 Integrating Results into Existing Applications Table 10 1 Module Values ee ee C NN NN DENN The User module was selected from the Reports module The User module was selected from the Labels module The User module was selected from the Data Export module If the User option is selected from a submenu in any module the value of qbf module is a question mark just as if it was chosen from the Main Menu Once the User module finishes processing you can change the setting for qbf module to return to another module If you do not change the qbf module value the system automatically returns t
220. m has its own unique program name so new query forms do not overwrite existing query forms that have the same name m Select in Form qruQdn11 p qruani2 p qru iz p qrydodd4d p qrydo015 p qryooo1e p qryooL p qryvooLs p qryvooLd p qryood2t p qru 21 p qru o022 p qryoooes p qryooded p qruo025 p qru o0 5 p qru d027 p Prag 8 3 2 Joining File Information This section describes how to join files from two different databases You can join a file to any file that is related to it from any database When you select the Join option you see a list of the related files you can join to your file NOTE Forinformation on establishing join relationships for files see Chapter 9 Database Administration Follow these steps to join files from two different databases l Select the query form for one of the files you want to join 2 Select the Join option Suppose you want to see the orders for Second Skin Scuba and you know this information is contained in the order file in the sports database After you select Join you see a list of the files related to the customer file 3e 4 Multiple Databases with Results For example the following window shows files you can join to the customer file Next Prev First Last Add Update Copy Delete View Browse Query Where Total Order Module Info User Exit Full Set sportsi Customer Cust Num 1 Country USA Name Lift Line Skiing Address 276 North S
221. match the qc file If the checksum is different or the version does not match Results skips the fastload line and loads the entire qc file The qc file uses a separate checksum value for each database on the database lines E 1 2 Editing Forms and Joins If you edit the join lines or form lines do not worry about the numbering because Results ignores the numbers However keep the lists in alphabetical order Files that Results Creates E 1 3 Order of Options Do not change the order of options before the fastload line However after the fastload line it does not matter whether forms come before views or permissions or printers as long as each group is together Entering the Administration module and leaving it rewrites the qc file Chapter 9 Database Administration and Chapter 10 Integrating Results into Existing Applications contain more information about the qc file E 2 The glFile The q1 file is the query log file During the initial system generation this file logs the files that have query interfaces built for them as well as any problems encountered during the build Results creates it in the same directory that contains the qc file If you move the qc file to another directory you must move the q1 file to the same directory For each query interface there are three files the p file containing the generated query procedure the i file containing the include file called by the p procedure a
222. matically verified and an error message appears if there is a problem Progress Results User s Guide for UNIX Update Updates the currently displayed record if you have permission The information entered is automatically verified and an error message appears if there is a problem Copy Copies the currently displayed record to a new record if you have permission Enables you to copy the record displayed on the screen to create a new record and then update the new record s contents The information entered is automatically verified and an error message appears if there is a problem Delete Deletes the currently displayed record if you have permission A prompt appears that you can respond to if you want to delete the record View Selects a different query form to view Browse Browses through a scrolling list of key field values in an overlay window You can temporarily add other fields to appear in the Browse list by pressing GET F5 or CTRL G When the list of fields appears select or deselect fields to tailor the list The Browse list defaults back to its original settings when you select too many fields or a field too large to display across one line The Browse list also defaults back to the original settings when you exit the Query module To permanently change the default fields see your database administrator or see Chapter 9 Database Administration for information on controlling fields in the Browse window
223. mber The number appears next to the field and the other selected fields renumber automatically 6 Add any other fields that you want to the report When you are done press GO The fields appear in the Report Layout window 5 4 2 Deleting Fields from a Report This section describes how to delete a field from an existing report To follow these steps you should have the report you want to edit laid out in the window l Select the Define option Because there are files already selected for the report you are working with Results displays a list of options you can choose 2 Select the Fields option A scrolling list of fields reappear the fields in the report are still marked 3 Use your arrow keys to highlight the field you want to remove from the report and press RETURN The number next to the field disappears and the remaining fields renumber automatically 4 Delete any other fields that you want When you are done press GO 5 4 3 Defining Array Fields for Reports There is a special type of field you can define in your reports called an array field An array field contains several elements of information within one field Each element shares the same field name and characteristics length type etc In Results array fields are followed by brackets In this example the Mnth Quota field is an array field This field contains the sales information for each month in a year months 1 12 If you select an a
224. me and dbname in that order the qc file for these databases together is called dbname1 qc If you start Results with dbname2 and dbname in that order you see a message that the dbname2 qc file was not found If you start Results with only the dbnamel database you see a message that dbname2 is needed but not connected If you want to start with only dbnamel you must do the following Start with a copy of an empty database followed by dbnamel e Delete the existing dbname1 qc file and perform an initial build on dbnamel Progress Results User s Guide for UNIX NOTE You can start Results with more databases than you used to build the qc file However if you enter the Administration module and then exit Results rewrites the qc file Then that QC file requires the additional databases when you start Results with it again If you want to start Results with databasel and another database connect the other database first For example if you already have a databasel qc file you can start Results with database3 and databasel in that order The QC file for the initial build for these databases is called database3 qc After you select Yes from the initial build prompt you see this screen PROGRESS RESULTS There are three ways to build query forms for PROGRESS RESULTS At any time after RESULTS builds the query forms you can manually tailor them MANUAL You want to manually define each query form After you pick a
225. mer liscount Cmysports Customer Name mysports Customer mysports Customer dof L6 This list contains all of the fields in the customer file The database and file containing the field are listed in parentheses You can add any of these fields to your label If you want to add more fields to a line than can fit in the Label Layout window put the field names on two lines and type a tilde at the end of the first line When you run the labels the two lines print as one 11 Select the Contact field The Label Layout window appears Label Layout Omit Blank Lines yes Total Height 6 Text to Text Spacing width Copies of Each 1 Top Margin Left Margin Indent 1l tmusports Customer Hamet l inyspartz Lustomer Address l inyspartz Lustomer Address l dmysports Customer Cityt fmusports Customer State l Amusports Customer PostalCode l l l dmusports Customer Country tmusports Customer Con l Instead of just printing the contact s name at the bottom of the label it is a good idea to send it to the attention of the contact For example Attn Jane Smith 3 58 A Tour Through Results 3 6 1 Adding Text to a Label Follow these steps to add text to a label layout 1 Move the cursor to the first curly brace in line 7 2 Press MODE to toggle to the Insert mode so that you will not type over existing information
226. ming considerations and a tutorial Each DataServer has its own guide for example the Progress DataServer for ODBC Guide the Progress DataServer for ORACLE Guide or the Progress 400 Product Guide MERANT ODBC Branded Driver Reference The Enterprise DataServer for ODBC includes MERANT ODBC drivers for all the supported data sources For configuration information see the MERANT documentation which is available as a PDF file in insta 1ation path odbc To read this file you must have the Adobe Acrobat Reader Version 3 1 or higher installed on your system If you do not have the Adobe Acrobat Reader you can download it from the Adobe Web site at http www adobe com prodindex acrobat readstep html SQL 89 Open Access Progress Embedded SQL 89 Guide and Reference A guide to Progress Embedded SQL 89 for C including step by step instructions on building ESQL 89 applications and reference information on all Embedded SQL 89 Preprocessor statements and supporting function calls This guide also describes the relationship between ESQL 89 and the ANSI standards upon which it is based Progress Open Client Developer s Guide A guide that describes how to write and deploy Java and ActiveX applications that run as clients of the Progress AppServer The guide includes information about how to expose the AppServer as a set of Java classes or as an ActiveX server Progress SQL 859 Guide and Reference A user guide and reference for programmers who
227. mits lines where there are field definitions in the layout window but there are no field values in the record Copies of Each Defines the number of copies of that you want of each label Total Height in Lines Determines the total number of lines that each label has from top to bottom Top Margin in Lines Defines the number of lines that Results should skip before printing the next label Option Descriptions Text to text Spacing Specifies the number of characters wide that you want each label to print Use this field when printing multiple labels across the page If you are printing more than one label across and you do not set the Text to Text Spacing value wide enough for one label the next label across overlaps the first label Left Margin Indent Defines the number of characters the system should indent from the left edge of the label before printing the first left hand label Number of Labels Across Specifies the number of labels across to print B 6 Horizontal Menu Options for the Data Export Module Define Defines the files and fields to export The Define option in this module works the same way as it does in the Reports module For example you select files and fields the same way Also the Define option has the same submenu options in both modules with one exception the With Format of Fields option described in this section For a complete description of the Define option and its submenu options se
228. more features and options in the Data Export module Note that most of the Define submenu options in this module are the same as they are in the Reports module However there are two differences Where you use the Reports module you define Totals and Subtotals you use a Data Export submenu option to change the width and format of fields in fixed width ASCII export definition This option lets you change the width and format of any field or defined column in the current Data Export Layout window You can select this option only when the Export Type is set to fixed width ASCII SDF When you define new fields you can redefine the format only for the new fields In the Reports module you can also redefine the label and specify whether you want Results to hide its repeating values Data Export Module 7 4 1 Adding Fields to a Data Export Report Use the same method to add fields to a Data Export definition that you used in the Reports module For more information see the Adding Fields to a Report section in Chapter 5 Reports Module 7 4 2 Exporting Reports in Progress Format This section describes how to export data in Progress export format By default Results puts export data in Progress format Figure 7 2 shows an example of records in the Progress export format Spokes Cycles SLS Shark Snack Snorkel KIK Super Golf Center IKF Golf CLub Holland BBB Flying Fat Aerobics HKM Halvin juoksukeskus DEP
229. n a record just like database fields the total each for undo and no undo variables defined in any given program is limited to 32K As a workaround mark some files as HIDDEN to skip them during the initial build After the build completes you can reset the hidden flag and manually add any missing query forms or join relationships in the Administration module G 1 2 Too Many Joins Too many joins occur when the database has a lot of fields in the schema with the same name Sometimes the join list becomes unbalanced with some file related to every other file As a workaround edit the qc file with an ASCII editor and delete the unwanted join lines G 1 3 Limit on Query Forms 63KB If Progress tries to compile a query form and the resulting r code exceeds 63KB the client fails with a fatal error There is no way to trap this error Results attempts to recover using the checkpoint file it writes but it continues to fail at the same point To work around this mark the offending file as HIDDEN and then continue the Initial Build See the R code Greater than 63KB section in this appendix for more information G 1 4 Missing qc File with Multiple Databases Results names the qc file for the first database connected If you start Results with the databases connected in a different order Results does not recognize the qc file Therefore always connect the database that the qc file is named after as the first database
230. n multi user mode and before you turn off the computer you must shut down the server process for each database See the Shutting Down a Server for the Database section in this appendix for information about shutting down servers To start Results from your operating system type the appropriate command at your operating system prompt where dbname and dbname2 are the names of your Progress Atlas databases The following command starts Results in single user mode results dbnamel db dbname2 1 The following command starts Results in multi user mode mresults dbnamel db dbname2 For example if you are starting Results to run the tutorials in Chapter 8 Multiple Databases with Results substitute sports and sports2 for dbnamel and dbname2 respectively You specify the first database in your command just as you do for a single database but you need to include the Progress Physical Database Name db connection parameter before all subsequent databases By default the first database starts in single user mode and all subsequent databases start in multi user mode To start them in single user mode include the Single User 1 connection parameter after the database name If you have not performed an initial build on the first database you specify the system displays a message that there is no qc file for that database In that case you need to perform an initial build For information about the initial build process see
231. n scroll left and right within the layout window using the greater than and less than and gt keys As you scroll right the a lt lt more message appears on the left side of the window to indicate that there are more fields to the left Active Files Changes the file s in the report When you select this option you see a scrolling list of files that you have permission to view Once you select the primary file a list of related files such as order of customer appears The list can be expanded by the database administrator through the Administration module NOTE If you have files defined for your report and then use this option to change the selected files you lose the current field selections However you can select additional files or reorder your existing files without losing your report definition Progress Results User s Guide for UNIX Totals and Subtotals Enables you to insert totals counts minimums maximums and averages for any fields in the report When you select this option a list of fields currently defined for the report appears You select a field and a window opens that enables you to define total and subtotal information This option enables you to determine what aggregate values to accumulate in a summary line for each field Total Count Min Max Avg For each value you choose a summary line appears at the bottom of the report under the column The summary line displays the specified aggregat
232. n the results 1 file see the Language section in Chapter 9 Database Administration G 3 3 Address Fields in Labels Module Default to Wrong Language Version The default address look up fields correspond to the language version of Results that is used when you perform the initial build You can edit those defaults through options in the Administration module Progress Results User s Guide for UNIX Glossary Active Field A field you can modify or enter information in or a currently selected field In Results an active field is underlined or highlighted depending on your terminal type Active File The file that is currently in use Application A set of programming language instructions that accomplish a specific task Array A field or variable containing multiple elements Each element in an array has the same data type Array Extent The number of elements contained in the array Ascending An increasing order of fields Numeric or alphabetical order For example names in ascending order are listed alphabetically ASCII Character A seven bit code representing upper and lower case letters numbers symbols and punctuation marks ASCII is an acronym for the American Standard Code for Information Interchange Break Group A section in a report For example all records for customers in a particular sales region Progress Results User s Guide for UNIX Glossary 2 Calculated Field A field you create with
233. nables you to use your own browse program in Results For more information about integrating the Results package into existing software packages see Chapter 10 Integrating Results into Existing Applications 9 5 2 Default Report Settings Default Report Settings defines default settings and headers for reports Use this option to establish the number of lines per page for default reports definitions or defaults for headers or footers for reports For example you can create a default format that puts your company s name at the top of the page and a page number and date at the bottom of the page 9 5 3 User defined Export Format Use this option to add a user designed data export program to the Data Export Settings option The name of the default procedure is u export p You can edit this procedure or include your own For more information about integrating the Results package into existing software packages see Chapter 10 Integrating Results into Existing Applications 9 5 4 Label Field Selection Use the Label Field Selection option to see the address fields Results looks for by default and to define the lookup algorithm for default fields on address labels You can define different default label types by naming fields other than address fields For example after you pick the active files in the Labels module Results prompts you to lay out the labels automatically Based on the Progress CAN DO permissions you enter a list of fie
234. nd the f file containing the form information Chapter 9 Database Administration and Chapter 10 Integrating Results into Existing Applications contain more information about the q file E33 The qdFile The qd file is the query directory file The name of the qd file is the first eight characters of the USERID plus the qd extension If the USERID is blank then the name is results qd Results takes the USERID from LDBNAME 1 which is the first connected database The qd file contains the directory that maps the descriptions of reports labels and export programs to their filenames To look at this file use the Contents of a User Directory option on the Administration module s Main Menu Each user has their own reports labels and export files Progress Results User s Guide for UNIX The filenames have the format repxxxxx p Iblxxxxx p and expxxxxx p where xxxxx represents a unique integer value For example the filenames have the formats shown in Table E 1 Table E 1 Formats for Filenames rep00001 p 1b100001 p exp00001 p rep00002 p 1b100002 p exp00002 p rep00003 p 1b100003 p exp00003 p If Results cannot find a qd file in a user s PROPATH it creates one in the current directory It also stores all saved reports exports and labels files in the same directory that holds the qd file If you move the qd file you must move the report label and export files with it They must be in the same directory E 3
235. ne e en y mda 2 8 2 3 4 Form WINdOW cdi ite a nanio fe ieee teed E AERA 2 9 2 4 Vertical Menus Horizontal Menus and Selection Lists 2 9 2 4 1 Vertical Menus cs sirae rnei errre e E a es 2 9 2 4 2 Horizontal Menus ri y e a e a r AE eee 2 10 2 4 3 Selection Lists ia aa k e ya aa D eae Ea a eE A 2 11 2 5 Where To Go From Here 0 000 cece eee eee 2 12 A Tour Through Results 2 nee ee eee ee d wr urere dez 3 1 3 1 IMtROGUCHON EE 3 2 3 2 Results Tour Preparations 2 0 00 eee 3 2 3 2 1 Creating a Copy of the Sports Database 3 3 3 2 2 Starting Results forthe Tour llli sees 3 3 3 2 3 Moving Between Results and Progress 3 7 3 3 The Query Module ilelseesesses rh 3 7 3 3 1 Finding the Next Prev First and Last Records 3 11 3 3 2 Adding and Deleting a Record 000 00a 3 12 3 3 3 Browsing Through Records 0 eee eee eee 3 14 3 3 4 Joining Files 2 0 0 0 cece ees 3 17 3 4 The Reports Module 0 0 cece eee 3 20 3 4 1 Defining Files and Fields 0 0 00 e eee eee 3 21 3 4 2 Running a Report 2 0 cece eee 3 25 3 4 3 Saving Your Report 000000 eee 3 27 3 4 4 Getting a Report ee 3 28 3 4 5 Adding a Math Expression sssusa aaua eee eens 3 29 Contents 3 4 6 Hiding Repeating Values and Changing Field Formats and Labels 3 34 3 4 7 Adding Break Groups Totals and Page
236. ned Export Format option in the Administration module The source file for a sample user defined export format is included with Results You see this as an option when you start with one or more copies of the sports database The databases you start with are copies of the sports database 10 19 Progress Results User s Guide for UNIX The following code is a copy of the u export p source code u export p u export p sample export format program this program exports data in the following fashion numeric fields are output as regular numbers dates are written in yyyymmdd format strings are surrounded by quote marks logicals are written as true or false fields are separated by commas lines are terminated by LF or CRLF depending on opsys necessary shared definitions DEFINE SHARED VARIABLE qbf where AS CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf db AS CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf file AS CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf of AS CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf order AS CHARACTER EXTENT NO UNDO DEFINE SHARED VARIABLE qbf rc AS INTEGER NO UNDO DEFINE SHARED VARIABLE qbf rcn AS CHARACTER EXTENT 64 NO UNDO DEFINE SHARED VARIABLE qbf rct AS INTEGER EXTENT 64 NO UNDO this stream is already opened for us DEFINE SHARED STREAM qbf io DEFINE VARIABLE qbf c AS CHARACTER NO UNDO DEFINE VARIABLE qbf i AS INTEGER NO UNDO write out defi
237. nes a centered footer that appears only on the last page of the report If you have defined another type of footer the last page only footer appears before it on the last page of the report The last page only footer does not appear in the Report Layout window but does appear when you print or display the report Builds a WHERE clause enabling you to select a subset of records based on specific criteria For example you can select records where sales region equals central or east Reports Module Order Orders the information in the report by up to five fields For example you can define the records to print in order by sales region and by customer number within each sales region You can use this option in conjunction with the Totals and Subtotals option to create totals for break groups sections For example if you order customer records by region you can provide a total line for each region This total line divides the records for each region Clear Clears the settings in the information and layout windows Or if there are no files or fields defined in the report Results displays a list of defined reports You can delete as many reports as you want Info Displays more information about the current active report such as the names of the current active files how they are related and any WHERE clauses and order criteria defined for the active report It might also display the name of the report if it has been saved and how
238. ngly recommended that you enter your Results directory as the first entry in your PROPATH In addition you can incorporate your own application help For more information see Chapter 10 Integrating Results into Existing Applications 2 1 3 Progress Startup Parameters If you want Results to default to European numeric format use the European Numeric Format E startup parameter If you want Results to default to a particular date format use the Date Format d startup parameter For more information about display formats see Appendix C Field Display Formats For more information about Progress startup parameters generally see the Progress Startup Command and Parameter Reference 2 1 4 Starting Results There are several ways you can start Results For example you can start Results with one or more databases The startup commands are different in each case To follow the tutorials and examples in Chapters 3 through 7 you must start Results with a single copy of the sports database Follow the procedures in the Results Tour Preparations section of Chapter 3 A Tour Through Results The other methods for starting Results include Starting from Progress using the database you specify when you start Progress Starting with databases in multi user modes Each method is described in Appendix A Startup and Shutdown Procedures Progress Results User s Guide for UNIX 2 2 Results Keystrokes Results has several
239. nition for shared variable PUT STREAM qbf io UNFORMATTED DEFINE SHARED VARIABLE qbf total AS INTEGER NO UNDO SKIP qbf total 0 SKIP write out for each statement PUT STREAM qbf io UNFORMATTED FOR DO qbf i 1 TO 5 WHILE qbf file qbf i lt gt qbf c IF qbf where qbf i THEN qbf of qbf i ELSE IF qbf of qbf i THEN WHERE qbf where qbf i ELSE IF qbf of qbf i BEGINS OF THEN qbf of qbf i WHERE qbf where qbf i ELSE qbf of qbf i AND qbf where qbf i IF qbf c lt gt THEN qbf c qbf c PUT STREAM qbf io UNFORMATTED EACH CIF qbf db qbf i THEN ELSE qbf db qbf i qbf file qbf i qbf c NO LOCK IF qbf i 5 AND qbf file qbf i 1 lt gt THEN PUT STREAM qbf io UNFORMATTED SKIP END 10 20 Integrating Results into Existing Applications These shared variables are described in the Using Shared Variables section in this chapter this builds the by clause part of the for each qbf c DO qbf i 1 TO 5 WHILE qbf order qbf i lt gt qbf c qbf c BY qbf order qbf i END IF qbf c lt gt THEN PUT STREAM qbf io UNFORMATTED SKIP qbf c PUT STREAM qbf io UNFORMATTED SKIP qbf total 1 TO qbf total 1 SKIP PUT UNFORMATTED output the field list DO qbf i 1 TO qbf rc count chosen IF qbf rct qbf i 1 THEN character qbf c gbf rcn gbf i
240. nt Deployment Guide A guide that describes the client deployment process and application administration concepts and procedures Progress Developer s Toolkit A guide to using the Developer s Toolkit This guide describes the advantages and disadvantages of different strategies for deploying Progress applications and explains how you can use the Toolkit to deploy applications with your selected strategy Progress Portability Guide A guide that explains how to use the Progress toolset to build applications that are portable across all supported operating systems user interfaces and databases following the Progress programming model xxvii Progress Results User s Guide for UNIX WebSpeed Getting Started with WebSpeed Provides an introduction to the WebSpeed Workshop tools for creating Web applications Itintroduces you to all the components of the WebSpeed Workshop and takes you through the process of creating your own Intranet application WebSpeed Developer s Guide Provides a complete overview of WebSpeed and the guidance necessary to develop and deploy WebSpeed applications on the Web WebSpeed Installation and Configuration Guide Provides instructions for installing WebSpeed on Windows and UNIX systems It also discusses designing WebSpeed environments configuring WebSpeed Brokers WebSpeed Agents and the NameServer and connecting to a variety of data sources WebSpeed Product Update Bulletin A booklet that provide
241. ntains the form definition for the query interface Progress Results User s Guide for UNIX If you have a program form you want to use enter it here If a form with this name already exists you can use the fields from this form Results parses the existing form code and presents a list of the fields from that form If you do not want to use an existing form enter a new filename Results prompts you to generate a new form If you select YES you see a list of all the fields from that file that you have CAN READ permissions for as established in the Progress Data Dictionary You select the fields according to the criteria described in this section entering YES or NO at the prompts From this list you determine the fields you want to display update or query You also determine the fields you want in the browse list In the forms list the fields appear along the left side of the window There are five columns to the right of the field names The first four columns are Disp display Upd update Qry query and Brow browse Each column has a yes or no value The fifth column is Seq sequence it takes a numeric value Display Determines if the field appears in the query form Enter YES if you want it in the form If you enter NO the field and its label do not appear in the query form You must answer YES if you want to enable the update or query option or give the field a sequence value Update Determines whether the field c
242. o Results Working on of 8 100 Elapsed time Average time Program Database and File qryoodss p mysporte Customer qryoodsd p mysporte Invoice qryo0ds5 p mysports Item qryo00S6 p musports Local Default qryoodsy p mysports Order qryoodse p mysporte Order Line qryoodso p mysports Salesrep qryooddd p mysportes State When Results completes the initial build the logo screen briefly appears followed by the Results Main Menu PROGRESS RESULTS Query Reports Labels Data Export User Administration Exit The Main Menu lets you access different modules These modules are described in Chapters 4 through 7 NOTE If the Main Menu does not appear in the language you want to use you or your database administrator can change the working language using the Language option in the Administration module For more information see the Language section of Chapter 9 Database Administration From this menu you can start the Results tour but before you do that read through the rest of this chapter It describes how to exit Results and how to move between Results and Progress It also describes keystrokes you can use in Results as well as how to navigate through menus 3 5 Progress Results User s Guide for UNIX Starting Results from Progress The following steps describe how to start Results from inside Progress Results runs against the database you specify when you start Progress l Enter this
243. o the module where the user originally called the User option This code shows how you can use this feature in your program This code puts the user in the customer form in the Query module if they selected the User program from the Main Menu This program places the user into the customer form from the sports database IF qbf module THEN called from the main menu ASSIGN qbf module g qbf file 1 customer qbf db 2 sports qbf where 1 pets qbf of 1 qbf file 2 a qbf db 2 RETURN NOTE Do not change the qbf file shared variable contents set within the Query module when there is a query form already on the screen Doing so can lead to unexpected results 10 7 Progress Results User s Guide for UNIX 10 8 10 6 3 Determining the Video Attributes Use the following shared variables in your Progress procedures to determine the video attributes in effect when the user chooses the User option DEFINE SHARED VARIABLE CHARACTER NO UNDO DEFINE SHARED VARIABLE CHARACTER NO UNDO DEFINE SHARED VARIABLE CHARACTER NO UNDO DEFINE SHARED VARIABLE CHARACTER NO UNDO DEFINE SHARED VARIABLE CHARACTER NO UNDO DEFINE SHARED VARIABLE CHARACTER NO UNDO Table 10 2 shows the functionality of these shared variables Table 10 2 Video Attribute Shared Variables These Shared Variables Determine High and Low Intensity Colors For qbf dhi and qbf dlo The s error p and s box p dialog boxes
244. o their sum 1000 plus the number of calculated fields and fields in joins e Maximum number of lines in a mailing label 66 e Maximum number of directory entries each user can have including labels reports and data export formats 250 e Maximum number of printing devices for the system as a whole 64 e Maximum number of fields you can use to order records 5 e Maximum number of fields on a query form 64 Progress Results User s Guide for UNIX e Maximum number of indexes in Query module on fields unlimited e Maximum number of fields in a report or data export format 64 e Maximum number of terminal types and color settings 50 E Files that Results Creates This appendix describes the file extensions for all of the files associated with the Results system Progress Results User s Guide for UNIX E 1 The qc File The qc file is the configuration file that contains the list of permissions printers joins etc By default Results tries to create the qc file in the same directory that contains the database dbname db However if the database is on another machine Results might not be able to reach that directory In that case Results places the qc file in the current directory Once Results creates the qc file you can move it anywhere in your PROPATH However you must move the q1 file to the same directory For information about the q1 file see the The gl File section in this a
245. of the field You also hide the repeating values You can hide repeating values for most types of fields including calculated fields You cannot hide repeating values for a Totals field because all the values must appear in the report so that Results can total them Type Customer Name in the Label field Change the value of the Hide Repeating Values option to yes then press RETURN or GO Where Order Clear Info Module Report Info Formats and Labels Database mysports File Customer Field Name Expression ypet character Label Customer Mame lt Format xi20 Hide Repeating Values yesi The list of fields reappears and you can select another field to edit If the fields are listed by label you see the field label you just changed in the list However the field names do not change because they are stored in the database You can change the label not the field name The label displays on the report the field name is the name the field is stored under in the database Also the labels in the Report Layout window do not change until you leave the option Select the Order num field and enter Ord Num as its label Also hide its repeating values by entering yes in the Hide Repeating Values field By entering the exclamation point in this label you stack the label on two lines When you run this report again Ord will be on the top line and Num will be below it on the next line
246. ollowed by the letter h 44 one two or three digits a decimal number xxx Z xxx is a symbol such as lf from the following table null 4 eot 8 bs 12 f 16 dle 20 ded 24 can 28 fs 1soh 5enq 9 ht 13 cr 1 del 21 nak 25 em 29 gs 14 so 18 dc2 22 sun 26 sub 30 rs 15 si 18 dea 23 eth 27 esc 31 us 2 stx B ack 10 1f S etx 7 bel 11 vt Record start i Record end i Field delimiter W Field separator 7 11 Progress Results User s Guide for UNIX This table shows the symbols for the lower 27 nonprintable ASCII characters If you use the numbers they are interpreted literally Instead use the symbols from this table For example the 1f characters stand for line feed You can enter symbols or press END to return to the Data Export screen 4 Press END to return to the Data Export screen 7 5 Summary This chapter briefly described the horizontal menu options in the Data Export module It also described how to add fields to a data export format export reports in Progress and non Progress formats and use Expert mode to change ASCII settings 7 12 Multiple Databases with Results This chapter provides information on Using multiple databases with Results Accessing data in multiple databases Relating files in different databases Querying multiple databases Joining file information NOTE You should complete or review
247. ollowing prompt appears Are you sure that you want to exit PROGRESS RESULTS now Yes No Progress Results User s Guide for UNIX 3e Select the Yes option If you return to your operating system skip step 4 There is an option in the Administration module that determines if you exit to the Progress Procedure Editor or quit to your operating system If you exit to the Progress Editor you can use the Editor to restart Results or exit to the operating system 4 Enter the following command to exit Progress and quit to your operating system quit Then press the GO key Progress returns to your operating system Option Descriptions This appendix contains descriptions of the menu and submenu options for the Results Query Reports Labels and Data Export modules Progress Results User s Guide for UNIX B 1 Menu Options Table B 1 lists the menu options described in this appendix The menu options shown in bold work the same way in all modules and are described in the Common Menu Options section in this appendix The options that are unique or whose submenu options are unique to a particular module are described in this appendix in the appropriate module section Table B 1 Key to Module Options 1 of 2 Get Get Get m m qm a m qm m m Total Order Module Info Option Descriptions Table B 1 Key to Module Options 2 of 2 m 1 L B 2 Common Menu O
248. on PUT F6 or CTRL P Invokes the ask mode in the value of the WHERE clause builder The CTRL keys listed are terminal specific and may not be the same for all terminals General Information Table 2 2 lists other keys you use in Results You will learn more about these keys and Results windows as you work through the tutorial and examples in this guide Table 2 2 Other Editing Keys 1 of 2 tion O RETURN Moves the cursor to the next field or next line Also selects and deselects items in the scrolling lists BACK SPACE Deletes a character to the left of the cursor and moves the cursor to the position of the deleted character T CURSOR UP Moves the cursor in the direction of the arrow one line at a time CURSOR DOWN CURSOR RIGHT Moves the cursor in the direction of the CURSOR LEFT arrow one character position at a time DEL or DELETE Deletes the character in the cursor position and moves the characters to the right of the cursor one position to the left TAB CTRL I Moves the cursor to the next field or label In editing windows moves the cursor to the next tab stop five spaces to the right BACKTAB CTRL U or SHIFT TAB Moves the cursor to the previous field or label In editing windows moves the cursor to the previous tab stop five spaces to the left PAGE UP F15 Moves the cursor to the previous page of text PAGE DOWN F16 Moves the cursor to the next page of text RIGHT END Moves the
249. on file if Results created it the default However it will not delete the definition file if you created it If you want to delete a file you created you must delete it yourself 9 2 3 Relations Between Files Use the Relations Between Files option in the Administration to join files that are not related automatically Files are automatically related if they have indexed fields with the same name and at least one of the indexes is unique This option enables you to establish relationships between files not sharing field names For more information about relations between files see the Progress Language Tutorial for Character or the Progress Language Tutorial for Windows When you start Results for the first time the system uses the Progress OF operator to join files that have common field names It also determines which files contain fields with the same names and whether indexes exist with duplicate fields as leading components When you select this option you see a list that names all of the files in the connected databases After you select the first file in the relationship another list of filenames appears and you can select the second file in the relation For example if you select the customer file in the mysports database the screen shown in Figure 9 3 appears 9 11 Progress Results User s Guide for UNIX 9 12 Administration Relations Between Files r Select File C er Cm H Invoice mysports
250. on manual selection see Chapter 6 Labels Module Select Yes Status messages appear rapidly at the bottom of the screen as Results searches for address information in the active file If it can not find the files it needs in the first file it looks in the other active files The label area expands and the default fields appear in the Label Layout area Label Layout Omit Blank Lines yes Total Height 6 Text to Text Spacing 0 width Copies of Eacht 1 Top Margins Left Hargin Indent Binusports Customer Namet dmusports Customer Address I iuysporta Customer Cityt fuysports Customer Stater Q Q i imasportz Customer Country o dmusports Customer Postal Code lol This is the default address label for the customer file when you perform the initial build in English against the mysports database When you perform the initial build in another language or against your own database you may see different fields See Chapter 9 Database Administration for details on different language versions of Results Results prefixes the field names with the names of the database and files that contain them A tilde appears on line four to indicate that the information was too long to fit on the line and appears on the next line instead When you run this label the field information from line five appends to the end of line
251. ons for the Reports Module B 5 Horizontal Menu Options for the Labels Module B 6 Horizontal Menu Options for the Data Export Module Field Display Formats 020 see eee eee eee eee eee C 1 Introduction to the Field Display Formats 200 000 C 2 Default Display Formats 0 0 0 0 c eee eae C 3 Character Display Formats 000 cece eee eee C 4 Numeric Display Formats 0 0 0 0 cece ee eae C 5 Logical Display Formats sirs orr Sore aN pU E ER N E C 6 Date Display Formats 0 0 0 cee ree C 7 How to Test and Override Default Display Formats BesultsEimits coro ie RATE NRI NIS E LL XM RDLI MEET Files that Results Creates 552 1 26v nk IL ee eee E 1 Theqgc File uer eue toe p eee Db ede E 1 1 Primary Rule when Editing the qc File D 1 E 1 E 2 E 2 Contents E 1 2 Editing Forms and Joins 0 0 0 0 ce eee ee E 2 E 1 3 Order of Options 0 00000 cece E 3 E 2 TING GI File ti5 4 oic toot Lu tes SEE Ne Be S Mal E 3 E 3 The qd File iius cet tees cee et uU IMere redu e ntis E 3 E 3 1 Users Must Have Their Own Directories E 4 E 3 2 Important Lines in the qd File 0 0040 E 4 E 4 Scratch Elles ed hcg keel aN eee ey a a qe Vad dee ae vn E 5 F OrderofEvaluation o soll E Iller rh rr ee Sea ee ee ee ee F 1 F 1 Using Expressions iiio gu rero ti DERE a
252. ontaining Progress code that you can add or call from within Results u browse i for example Index A field or combination of fields used to rapidly retrieve a particular record in a file Initialization String A set of data export characters that precede the record data on each line of a data export file For example an asterisk might indicate the beginning of a line The value for the field when it was created Insert Mode One of two text entry modes in Results In insert mode each character you type is inserted in the position where the cursor is located The cursor and the character under it move one space to the right The MODE F9 or CTRL T key enables you to toggle between the text entry modes See also Overstrike Mode Integer Data Type A property of a field or variable that determines the data that can be stored there can be an integer In Progress an integer can be a positive or negative whole number within the range of 2 147 483 648 through 2 147 483 647 Integer Field A field having an integer data type Integrity Accuracy or completeness of data Label Text that appears with a field on a report or form that describes the field Also a mailing label Glossary 5 Progress Results User s Guide for UNIX Glossary 6 Logical Data Type Can be one of two values consisting of yes no true false or any other logical value pairs that you define Menu A list of options that perform various actions
253. or UNIX 3 18 5 Select Browse to display a summary list of all orders for this customer Next Prev First Last Add Update Copy Delete dg Total Module Info User Exit Cust Numt 16 mysports Order ring Surf Inc A rder num Cust Mum Ordered Sales Rep rder numz 23 ele a 02 05 33 Promised 02 05 93 23l EEE Instructions 16 01 20 93 JAL Terma Mets 16 03 09 93 JAL aA 6 Press END to exit browse 7 Select Total to display the total number of orders for this customer This message appears at the bottom of the window 8 Press END to exit Total To get more information about this order number 23 you join the order line file to the order file 9 Select Join again 10 Select Order Line file The following window appears Prev First Last Add Update Copy Delete Browse Join Query Where otal Module Info User Exit Cust Numt 16 rder numz 23 rder num 23 eum d um 00018 Price 225 00 Qty 3 Discount 402 Extended Fricet 405 00 Back Order no The order line subset displays the first order line for Thundering Surf s order number 23 Because you are in a subset when you select Browse you see a summary list of order lines for order number 23 You can select Total to find the total number of order line records for this order A Tour Through Results 11 Select Total to find out how many order lines there are for this order
254. ormation about the tasks you can perform in the Query module The following topics are discussed Menu options in the Query module Updating records and copying records Switching to other forms Using the Query option to select a subset of the records in a file Using the Where option to select a subset of the records in a file Also how to use Expert Mode to build and edit WHERE clauses Displaying file relation information with the Info option Transferring to another module without returning to the Main Menu with the Module option Displaying the number of records in a full set or subset of records with the Total option Changing the order that records appear in the window with the Order option Progress Results User s Guide for UNIX NOTE Several of the Query module options are described in the tour in Chapter 3 A Tour Through Results and they are not described in this chapter The steps in this chapter build upon what you learned in the tour of Results You should complete or review the tour before continuing with this chapter This chapter assumes that the Query module is available in your Results package If it is not see your database administrator For information on how to control permissions and options in the Query module see Chapter 9 Database Administration Query Module 4 1 Introduction The Query module allows you to examine the contents of your Progress files and any related data through a s
255. orts Customer Data Export Layout 1 of mysports Customer Cust Num mysports Customer Balance mysports Customer Sales Rep Export Type PROGRESS Headers export names as first record Record start Record end cr lf Field delimiter Field separator Select files and fields The Layout window also shows the Progress export settings It shows that each record ends with a carriage return and a line feed It also shows that character fields are surrounded by double quotes and separated by single spaces 3e Run the data export report by selecting the Run option and then select any output device Your report appears in the Progress export format 7 4 3 Exporting Data in Non Progress Format By default Results puts export data in the Progress format These are the non Progress export formats that are supplied with Results e Generic ASCII format e ASCII with Field name header e Fixed width ASCII SDF e Comma separated value CSV e DIF e SYLK Data Export Module e Microsoft Word WordPerfect e CTOS BTOS OfisWiriter Your database administrator can also define and add a custom export format Follow these steps to put a report in any one of these export formats l Define the report you want to export 2 Select the Settings option The list of export formats appears Note that the User Sample Export option appears by default when you start Results with a copy of the Progress sports database
256. oter is centered near the bottom of the page If you have another type of footer defined the Last page only footer appears before it on the last page of the report The Last page only footer does not appear in the Report Layout window but does appear when you print or display the report B 5 Horizontal Menu Options for the Labels Module Define Defines the files and fields to use for label information When you select this option the results you see differ depending on if there are fields defined in the Label Layout windows If there are no files defined in the Label Info window the screen prompts you to select a file from a scrolling list of available files Once you select the file there are three ways you can lay out the fields for the labels 1 automatically 2 menu driven or 3 manually If no fields are defined in the Label Layout window a window prompts if you want Results to select the fields for the labels automatically If you enter Yes see Method 1 If you enter No see Method 2 to select the fields yourself If fields are defined in the Label Layout window when you select this option you can edit the mailing label text and fields as described in Method 3 Method 1 If you have the label laid out automatically you see the fields laid out in the Label Layout Window The system places the filename next to each field to indicate the file that each one came from You can edit the default layout once it appears on the screen
257. our operating system prompt as shown in Table 3 1 and press RETURN This command makes a copy of the Progress sports database and names it mysports Table 3 1 Database Copy Command Operating System Commands prodb mysports sports 3 2 2 Starting Results for the Tour This section describes the steps for running the tour of Results You can also try the examples in Chapters 4 through 7 The following sections describe two ways to start Results The first method starts Results from your operating system using the mysports database The second method starts Results from Progress using the database you specify when you start Progress Starting Results with a Copy of the Sports Database This section describes how to start Results using the mysports copy of the Progress sports database l Enter the appropriate command at your operating system prompt to start Results as shown in Table 3 2 Table 3 2 Starting Results with the mysports Database Operating System Commands results mysports Progress Results User s Guide for UNIX 3 4 This command starts the database in single user mode which means that once you start Results with this database no one else can access the database If you want more than one user to access this database at a time you must first start a server for the database and use the multi user startup command for Results For information on starting servers and using Results in multi user mode s
258. ow keys or SPACEBAR then press HELP Progress displays a brief description of the module and explains how to use it PROGRESS RESULTS Query Reports Labels Data Export User Administration Exit Figure 1 5 Results Main Menu NOTE The figures in this manual show all of the possible menu modules in Results However if all of the modules are not available for your system you might see only a subset of these modules In fact you see only the options that your database administrator has enabled for you The following sections describe the modules in the Results Main Menu Progress Results User s Guide for UNIX 1 4 1 Query Allows you to examine and modify information in your database tables For example you can use the Query module to select a subset of customers in the customer table Thus you can query for all the Boston customers who have a customer number greater than 10 Query also has a menu driven WHERE clause builder that allows you to select record subsets using more complicated selection criteria For example WHERE clauses allow you to query for customers in the city of Boston or the state of Colorado whose maximum credit is greater than or equal to 500 1 4 2 Reports Allows you to quickly generate single section reports based on database information Reports can consist of data from one or more database tables as well as calculated values and totals You have complete control over
259. plains how to add a math expression to determine the cost for each order line in a customer s order To do this you define the math expression to multiply the number of units in each order line by the cost for each unit 1 Select Define Since you have already defined files you plan to work with the screen displays a list of options you can choose from to expand your report Get Put Run Settings Where Order Clear Info Module User Exit Files Order myspo myspo myspo muspa Rctive Files Totals and Subtotals Running Total Percent of Total Counters Math Expressions String Expressions Numeric Expressions late Expressions 27229 225 229 88 2 Select Math Expressions Results displays a list of operations Bet Put Run Settings Where Order C You can select any of these operations to create your math expression Subtract Multiply Divide Raise to a Pouer Expression Builder LL elect 18Rf 5 ear Info Module User Exit 3 29 Progress Results User s Guide for UNIX 3 Select Multiply A window opens that lists all the numeric fields in the active files Get Put Run Settings Where Order Clear Info Module User Exit Expression Builder Enter first multiplier a Field Allocated mysports Item Balance mysports Customer Cat Page mysports Item Credit Limit mysports Customer Cust Num mysports Customer Lus
260. ple you can see a list of the printers used in your department 2 Select the output device you want then press RETURN If you selected TERMINAL the first page of labels appears on your display Use your cursor keys to scroll through the list If you selected a file or printer output device the label definitions are directed to it 6 3 5 Clearing and Deleting Label Definitions This section describes how to clear label layouts from the window It also describes how to delete saved labels from your directory You can use the same steps to clear and delete definitions in the Reports and Data Export modules l Select the Clear option If there is still label information or label layouts in the window Results prompts you to verify that you want to clear the current label definition from the window 2 4 5 Labels Module Select option to remove the label information from the window The window clears all label definitions If you select Clear again you can delete any saved labels in your directory Select the Clear option again A list appears that shows all the label definitions in your directory You can delete any of these labels Mark the labels you want to delete To mark a label highlight it and press RETURN Results places an asterisk next to the label name To unmark a label definition select it again To delete the marked labels press GO or press END to cancel 6 3 6 Defining Labels Manually T
261. port Info Files mysports Cust Select Output Device BREE t mysports Orde FILE 1 mysports Item PRINTER 1 of 5 Order 3 25 Progress Results User s Guide for UNIX 2 Select the TERMINAL option to preview the report on your screen Your database administrator can tailor this list For example when you select PRINTER you might see a list of the printers used in your department rder num Line num Item Name Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing Skiing 1 2 3 4 5 1 2 1 2 3 4 5 6 1 2 3 The first page of the report appears Swim Goggles Swim Goggles Lacrosse Stick Ski Wax Red Frisbee Sweat Band Hockey puck Ski mask Sneakers Shin pads Bowling ball Golf clubs Golf clubs Swim Goggles Gloves Mindbreaker 3 Press key to display the next page of the report 4 Press END to return to the Report Layout screen A message appears at the bottom of the screen that tells you the total number of records in your report 873 records included in report There are a few things you can do to this report to make it more meaningful For example you can multiply the quantity and price fields together to find the cost per order line But first save the report 3 26 A Tour Through Results 3 4 3 Saving Your Report Follow these steps to use the Put option to save report definitions
262. ppendix When you start Results it first looks for the qc file in the current directory If it cannot find it there it looks for it in the PROPATH Because it takes time to read the qc file Results has a feature called fast load This feature consists of several files called resxxxxx r where x is an integer These compiled routines automatically load all of the configuration information at startup The files load information so Results does not have to read the entire qc file each time a user starts it They are automatically created when you first build the query interface at start up and each time you leave the Administration module You can place the qc file and the fast load routines anywhere in your PROPATH E 1 1 Primary Rule when Editing the qc File If you must edit a qc file back up the original qc file first After that delete the fastload line and delete the actual fastload files resxxxxx r Reading the entire qc file takes quite a long time Therefore to speed things up Results creates resxxxxx r files that contain ASSIGN statements to directly load the shared variables As soon as it reaches the fastload line it runs these programs and ignores everything from this point on in the qc file To restore the fastload line simply enter the Administration module and then exit it Results rewrites the qc file fixing any sequence numbers and adding the fastload line It also rebuilds the resxxxxx r files to
263. ppendix provides users with information about how Results handles display formats for fields It includes details on e Default display formats e Character display formats e Numeric display formats e Logical display formats e Date display formats e Time display formats e How to override default display formats e How to test display formats For information about how Progress handles display formats see the Progress Programming Handbook the Progress Language Tutorial for Character or the Progress Language Tutorial for Windows Progress Results User s Guide for UNIX C 1 Introduction to the Field Display Formats The display format of a field determines the way the data in that field is shown on screens and in printed reports For example display formats indicate how many spaces Results should put in the display and if there should be dollar signs decimal points or other special characters Progress supplies Results with the default display formats for any field variable or expression you display or print You can override the default formats in the Reports and Data Export modules using the Settings option In the Data Export module you can only change the formats of fields exported in Fixed width ASCII SDF format C 2 Default Display Formats Table C 1 shows the default formats for data types Table C 1 Default Display Formats for Data Types Data Type of Expression Default Format Character x 8 Date 99 9
264. ps them with parentheses In this tutorial you will multiply these two selected fields 6 Select No The screen clears to the Report layout window and another window Formats and Labels appears Here you can redefine the default label and format information for the new numeric field created by the Math Expression Report Info Formats and Labels Filet Numeric Expr Field gbf 00 Expression musports rder Line tu mys Type decimal Format Hide Repeating Values no Label Hath Value 28 This window contains the following e File Displays as Numeric Expr because it is a generated field not contained in any database file 3 31 Progress Results User s Guide for UNIX 3 32 Field Displays the name which Results automatically assigns to the field you are creating This field name will be in the list with the other field names once you add the new field Expression Displays the math expression you just built In this case an ellipse shows that Results truncated the expression to fit it in the window Type Displays the data type of the field In this case the data is in decimal format Label Displays the default text that appears above the column in the report In this case it is Math Value You can change this to a more descriptive name for your report Format Shows the default display format In this case the format is gt gt gt gt gt g
265. ptions The following list describes the menu options that work the same in two or more modules In these descriptions a definition is a report label or data export definition depending on the selected module Get Gets an existing definition You can get a definition you defined and saved or if you have permission you can get a copy of a definition from someone else s directory This option opens a scrolling window displaying descriptions of all the layouts you have saved You can press the MODE key F9 or CTRL T to toggle the list from the descriptions to the originating database names to the program names An asterisk marks the definitions you can load with the connected database s If you created your definitions with Results for Version 5 of Progress a question mark marks the definitions to show that Results did not save the names of the database s used to create the definitions A counter in the lower right corner of the window displays the number of definitions in your directory When you select a definition the system updates the information in the windows to reflect the proper settings The Get option also checks the files accessed in the definition to determine if anything has changed since you last ran it If such a change has taken place Get warns you and modifies the definition as best it can to reflect the changes Progress Results User s Guide for UNIX Put Run Saves the current definition un
266. qd file Query forms 9 4 maximum total D 1 Query log file See ql file Query module features 4 8 Index 9 Progress Results User s Guide for UNIX forms 4 3 introduced 4 3 menu options 4 4 B 7 tutorial 3 7 Query option described 4 6 B 9 steps for using 4 9 Query defined 4 9 Query by example 4 6 R r running total B 10 B 12 Record termination string 7 6 Record defined 1 3 Records adding 3 12 copying 4 8 deleting 3 12 updating 4 8 Related tables defined 1 3 Relations Between Files option 9 11 Relations between files deleting 9 12 Relations defaults for multiple databases 8 2 Relationships table defined 1 8 Repeating values hiding in reports 3 34 rules for hiding 3 35 Report markers described 5 8 listed 5 8 Reports adding fields 5 9 adding headers 3 48 adding percent of total 5 16 Index 10 adjusting spacing 3 49 5 14 changing order of records 5 15 clearing from layout screen 5 18 defaults 3 50 5 14 defining 3 21 defining totals 3 38 deleting 3 27 5 18 deleting fields 5 10 maximum per user D 1 replacing old version with new 3 41 running 3 25 saving 3 27 totals only 5 24 summarizing non numeric fields 5 26 wider than screen B 11 Reports module 3 20 described 5 3 menu options 5 3 B 10 RESLANG product A 2 G 5 Results installing 2 2 limits D 1 Main menu 1 9 non English languages A 2 overview 1 9 setting results
267. r creating labels using the Labels module It describes how to create mailing labels automatically then add text and fields This chapter describes more features and options in the Labels module 6 3 1 Saving Label Definitions Use the following steps to save the current label definition in the Label Layout window You use the same steps to save definitions in the Reports and Data Export modules l Select the Put option A window appears in which you can save it as a new label Press MODE to toggle to a list of databases used to create these labels and to see the program names for these labels The program names are the names listed in your directory There are several things you can do with this list You can Save the label definition as a new label To do this select the lt lt save as new label gt gt option then enter a name for the label Overwrite an existing label definition with the current one To do this select the label you want to overwrite then enter a name for the label Results prompts you to verify that you want to overwrite an existing label Exit and do not save the label If the label has been saved you can enter a new name or use the existing name If you enter a new name Results keeps the old copy and saves the new copy of the labels You can keep the old label copy or delete it as described in the Clearing and Deleting Label Definitions section in this chapter Labels Module 6 3 2 Getting Lab
268. r Settings option to define default color settings for different terminal types When you select this option a screen similar to the one shown in Figure 9 6 appears Administration Terminal Color Settings Colors for which terminal typet wyg Henuz Normal Highlight Dialog Box Normal Highlights Scrolling List Normal Highlight nter data or press F4 to end Figure 9 6 Terminal Color Settings Screen By default your screen shows the terminal type you are using to run Results When you press RETURN the default settings for the terminal type appear in two columns You can change the settings in the left column The right column displays the settings you saw when you entered this window so you can compare them with your new settings To quickly reset your settings on the left to match the right press RECALL 9 21 Progress Results User s Guide for UNIX 9 22 Use this screen to define the display format for Results menus dialog boxes and lists Once you specify a terminal type you can specify the attributes for each of these parts of the screens For regular terminal devices noncolor you can use the NORMAL MESSAGES and INPUT settings e NORMAL sets the format as light letters on a dark background e MESSAGES sets the format as reverse video dark letters on a light background e INPUT sets the format as underlined field prompts For example Figure 9 7 specifies that menus on a WY60 te
269. ration Select the Country Post index The window still shows the same record Select the Browse option The window displays the records ordered by country then by postal codes You can use T and 4 to scroll up and down to look at other records Query Module 4 3 10 The User Option If your horizontal menu contains a User option it was added to Results by an application developer If User is on your menu see information provided by the application developer for details 4 4 Summary This chapter described how to use some of the features in the Query module to examine database information It supplements the Query module information described in Chapter 3 A Tour Through Results In this chapter you learned how to update and copy records select sets of records and change the order of records 4 17 Progress Results User s Guide for UNIX 4 18 Reports Module This chapter describes the features in the Reports module It provides information on e Menu options in the Reports module e Markers that appear in the Report Layout window when you apply different features to your reports e Performing various report tasks including Adding and deleting fields including array fields in reports Adding titles to reports and adjusting spacing Reordering records in reports and adding calculated fields Displaying information about the current report Adding a WHERE clause with Ask mode Creat
270. rd arene RU T EN Ki F 2 F 1 1 Evaluating Expressions liliis eres F 2 G Helpful Information 200 0 RII IIIA G 1 G 1 Common Problems During Initial Build 04 G 2 G 1 1 444 EITOE ts ised ER se a Reg Rare e d de ae cue G 2 G 1 2 TooManyJoins ssssssseee ee G 2 G 1 3 Limit on Query Forms 63KB 0 00 eevee G 2 G 1 4 Missing qc File with Multiple Databases G 2 G 1 5 Building in Same Directory as Application G 3 G 1 6 Overwriting Customized Query Forms G 3 G 2 When Query Forms Do Not Compile 00000 cee eaee G 3 G 2 1 Missing Validation Files sellers G 3 G 2 2 Shared Variable in Validation Expression G 3 G 2 8 R code Greater than 63KB 00 cee eee G 4 G 2 4 Problems Running a Defined Report G 4 G 3 Language Errors naaa i i a a a EE rn G 5 G 3 1 Progress Messages are Not in Correct Language G 5 G 3 2 Results Not Defaulting to Correct Language G 5 G 3 8 X Address Fields in Labels Module Default to Wrong Language Version cece eee eren G 5 c nErrr dM MICE Glossary 1 lnidex iz DER ia it te eei bcd eA cee T Index 1 Contents Figures Figure 1 1 Figure 1 2 Figure 1 3 Figure 1 4 Figure 1 5 Figure 1 6 Figure 2 1 Figure 2 2 Figure 2 3 Figure 2 4 Figure 3 1 Figure 4 1 Figure 4 2 Figure 5 1 Figu
271. rder line information Ref Call Sales representative information Table of state abbreviation with sales regions Customer information This contains transactions for the Receivables s Item file Local Default Order header information Order line information Ref Call Sales representative information Table of state abbreviation with sales regions hlesc _ _ _ om i o 1i af48 By File Name The same list shows the names of the files used to make the forms The database name appears in parentheses so you know which database contains the file All of these files are in the sports database When you start with another database or more than one database you see other database names in parentheses Select Query Form Invoice sportsi Item isportsi Local Default Csportel gt Order sporteL Order Line sports Ref Lall sporteL gt Salesrep Csportel State sports1 Customer sports Invoice isports2 Item isports2 Local Default isports2 Order sports Order Line sports Ref Call Csports2 Salesrep Csports2 State sports File 1 of 18 Progress Results User s Guide for UNIX e By Program Name Results automatically creates these program names using the first eight characters of the database filename If any of these names is already used by other programs it creates names like qryxxxxx p for the programs where xxxxx represents a unique integer value Thus each query for
272. re xxxxx represents an integer value that is unique to the PROPATH When renaming occurs the change is logged to the QL file The Logging Initial Build Information section describes the QL file 9 1 4 Where Results Places the QC File Results tries to create the QC file in the same directory that contains the database dbname db However if the database is on another machine Results might not be able to reach that directory In that case Results places the QC file in the current working directory Once Results creates a QC file you can move it anywhere in your PROPATH When you start Results it looks for the qc file in the current working directory If it can not find it there it looks in the PROPATH for the qc file 9 1 5 Logging Initial Build Information During the initial build on any database Results logs all activity into a dbname q file where dbname is the name of the database This information can consist of compiler errors compilation times and names of the files that Results used to build query interfaces The QL file is in the same directory as the QC file 9 1 6 Default Options During the initial build Results disables the Add Copy Delete and Update options in the Query module and disables the User option throughout the entire package Results enables these options by default when you run it against the Progress sports database so that you can use them in the tour and examples in this book You must enable the
273. re 6 1 Figure 6 2 Figure 7 1 Figure 7 2 Figure 9 1 Figure 9 2 Figure 9 3 Figure 9 4 Figure 9 5 Figure 9 6 Figure 9 7 Paper and Electronic Filing System Comparison 1 4 Structure of a Database 0 0c esee 1 6 Simple and Compound Indexes eee eee eee 1 7 Relationship Between Customer and Order Records 1 8 Results Main Menu 0 00 e eh 1 9 A Help Window rietara aae a a a RII 1 12 Areas of the Query Module Window 00 0c else 2 7 Example of a Vertical Menu 0 0 cee ee 2 9 Example of a Horizontal Menu 0 0000 eee 2 10 Example of a Selection List 0 00 00 c cee eee ee 2 11 Query Form eee ebur eL NR Eis 3 8 Layout of the Query Window 00 0c eee eee 4 3 Query Module Main Menu lisse ess rese 4 4 Horizontal Menu for the Reports Module lesus 5 3 Labels Module Main Menu 0000 ee 6 2 Omit Blank Lines Versus Show Blank Lines llus 6 10 Export Module Main Menu seeeee nn 7 3 Sample of Progress Export Format 000 cece eeeee 7 7 Administration Module Main Menu leere 9 7 Defining Forms for the Query Module 00000 00ee 9 9 Selecting the Second File for a File Relation 9 12 Module Permissions Example 2 000 eee eee eee 9 14 Query Option Permissions Example lesse leeren
274. re available for use in header and footer text COUNT Records listed so far TIME Time report started TODAY Todau s date t NOW Current time PAGE Current page number USER User running report VALUE lt expression gt lt formate to insert variables F5 key The top window contains the header or footer layout area You can define up to three lines for a header or footer each line can be up to 50 characters long The text you enter will display in your report exactly as you type it in the layout area The bottom window lists the functions that you can include in your header When you include a function the values it represents replaces the function name when you run the report For example you can add a function to count the records listed in the report or to show today s date or to display your user name You can substitute angle brackets lt gt for the curly braces around the functions 3e 4 Reports Module Your database administrator can edit the results 1 file to change the default symbols for the VALUE option so that when you press GET to select a field from the list the default symbols automatically appear For more information about the functions see descriptions in Appendix B Option Descriptions Type any text and add any functions you want to appear in the header or footer For example you can type Page PAGE to insert the page number function in the header
275. report headers footers column labels and spacing You can also select subsets of data and control the order of the record information Once you define your report you can display it on your screen or direct it to a printer or an output file 1 4 3 Labels Allows you to easily generate labels including mailing labels from your database Results can lay out the address labels automatically for you or you can lay them out yourself There are several layout and format controls that help you customize labels For example you can mix field and text information omit blank lines define the total height adjust the left margin define the number of labels to print across and adjust the horizontal spacing between labels You can also select subsets of data and control the order in which labels print For example you can choose to print labels for Arizona customers in order by zip code 1 4 4 Data Export Allows you to export information from the database for use in other software packages Export formats included in this module include the following e Progress e Generic ASCII e ASCII with field name header e Fixed width ASCII Results Overview e Comma separated value e DIF SYLK e WordStar Microsoft Word Microsoft Word for Windows WordPerfect e CTOS BTOS OfisWriter If you prefer you can define your own export formats tailored to your particular needs You can also select subsets of data and control the order of
276. rminal appear in reverse video with highlighted text in normal video It also indicates that an underline highlights text in dialog boxes Administration Terminal Color Settings Colors for which terminal typetwybO Henuz i Normal dass Dialog Box Scrolling List Enter data or press F4 to end Figure 9 7 Terminal Color Settings Example Press RECALL to reset these settings to their previous settings For monitors and terminals that support color PC monitors for example you can specify foreground and background colors The format is foreground color background color For example if you enter black red for the menu s Normal setting menu boxes appear as black letters on red background Database Administration These are the foreground and background colors you can use 9 5 Modules Options There are five Modules options e Browse Program for Query e Default Report Settings User Defined Export Format e LabelField Selection User Option 9 23 Progress Results User s Guide for UNIX 9 24 9 5 1 Browse Program for Query Use this option to incorporate your own functionality for the Browse option in the Query module To do so you create an include file in Progress and enter its name in this option The default Browse procedure is u browse i This default include file also lets you use the default functionality of the Browse option in your own application Additionally it e
277. rray for your report Results can display the information in a stacked vertical format or spread out horizontal format Reports Module For example if you select the Mnth Quota field from the Salesrep file this window appears Cet Put Run Settings Where Order Clear Info Module User Exit r Choose Fields 1 Database musports File Salesrep Field Month Quotal Maximum Extent 12 Leave blank for stacked array elements or enter a comma separated list of individual array elements to include side by side in the report The window indicates how you can stack your information or spread it out If the array contains text you probably want to leave this line blank and press RETURN This lets Results display the information under the column header as a paragraph in your report However the Mnth Quota field contains information you want to display spread out Enter the number of each month you want on your report separated with commas For example if you want the monthly sales information for January through June you would enter 1 through 6 with commas as shown in this figure Get Put Run Settings Where Order Clear Info Module User Exit r Choose Fields 1 Database mysports File Salesrep Field Month Quotal Maximum Extent 12 Leave blank for stacked array elements or enter a comma separated list of individual array elements to include side by side in the report
278. rt mode to edit or build WHERE clauses see Chapter 4 Query Module In this example you build a WHERE clause in the Order Line Report in the Reports module 1 Get the Order Line Report 2 Select Where in the Reports module Because there is more than one file in the list of files a highlight bar appears that lets you select the file you want to use to build the WHERE clause Get Put Pun Define Settings Order Clear Info Module Exit Report Info mer t mysports Order i mysports Order Line 1 mysporte Item Order BY mysports Customer Name A Tour Through Results 3 Select the Customer file Several windows appear that let you build the WHERE clause 4e The first window lists the fields in the customer file Get Put Run Define Settings Order Clear Choose a Field Address lt mysports Customer Balance Cmysports Customer City mysports Customer Comments mysports Customer Contact mysports Customer Country mysports Customer Credit Limit Cmysports Customer Cust Num mysports Customer Discount imusportz DLustomer Info Module User Exit Comparisons 4 Mame imusports Lustomer Phone tmysports Customer Postal Code tmysports Customer Sales Rep mysports Customer abel d of 16 Enter a Value Expression If you are an experienced user press GET to enter the Expert mode and type in the WHERE clause e
279. rt txt in the Data Export module e page Use for enhanced output to a terminal where you can navigate around the screen using next page prev page and arrow keys You can also scroll left and right to view wide reports The output report appears on the screen with a box around it This option uses quoter therefore the standard quoter utility must be in your PROPATH to use this option e prog Use to call a user s program u print p for example This passes the name of the generated program report data export or label definition and enables your program to determine the output destination Results includes the source code for a sample program called u print p If you want to define your own printer menu define only one output device and give it the type prog and set the device name to the name of the user print menu When users select the Run option your printer menu program runs and users do not see the default scrolling list of printer devices See Chapter 10 Integrating Results into Existing Applications for more details about defining your own print menu Choose Device to Edit When you select this choice a list of the currently defined output devices appears After you select one of these Results prompts you for the same information as in Add New Output Device field the description the logical name of the device the width of the output in characters and the device type as defined by the list on the screen The exist
280. rt yet only a limited number of options in the horizontal menu is given 3 20 A Tour Through Results 3 4 1 Defining Files and Fields In this section you use the Define option to create a report that uses information from four different database files 1 Select Define Results will prompt you to select files and fields First you see a list of files that you can use for your report Get Run Settings Clear Module User Exit Report Info Files ____ Select File imusportz Item mysports t Local Default mysports Order imusports Order Line imusparts Ref Call imusparts Salesrep imusparts State imusportz Hame 1 af 3 Report Midth oH selecting files NOTE If the files are listed by description press MODE F9 to toggle to the file names The files listed in this window are those available when you start Results against the mysports database If you start it against another database you see the files from that database that you have permission to view The counter in the lower right hand corner of the window tells you the total number of files in the list 3 21 Progress Results User s Guide for UNIX 2 Select the Customer file The window displays mysports Customer next to the Files label Because there are other files joined or related to the customer file a Select Related File window appears with a listing of those files Get Run Settings Clear Module
281. rts1 database you see this screen Next Prev aM Last Add Update Copy Delete Browse Join Query Where Total Module Info User Exit Full Set sportsi Customer Cust Num 1 Mame Lift Line Skiing Subset sports1l rder rder num Cust Num 1 Ordered 01 05 93 Shipped 02 08 93 Subset sportsil 0rder Line rder num 6 Line num 1 Item num 00009 Price 18 00 Qty 67 Discount 35 Extended Price 783 90 Back Order no The order line window displays the first order line for Lift Line Skiing s order number 6 Notice that window headlines indicate whether you are looking at a full set of records or a subset When you are looking at a subset and you select the Browse option you see a list of order lines for order number 6 only You can select the Browse option to display a summary list of all order lines for this order or you can select the Total option to find the total number of order line records for this order Remember browse lists often show summary information about the records in the set That is they show some of the fields in the record In this case the browse list shows all the fields in the order lines for Lift Line Skiing s order number 6 If you want to create a report based on file information in these forms you can exit the Query module enter the Reports module through the Main Menu and select the files and fields for your report However it is easier to use the Module option to transfer the selections to
282. ry by example interface you enter selection criteria into an empty form When the blank form appears you can enter an operator for example use gt for greater than gt for greater than or equal to and then the value for the query For example when you are looking at a customer record form you can query on a customer number greater than 10 You can also enter criteria on multiple fields multiple criteria are automatically combined using AND For example a multiple criteria could be customer number is less than 10 AND state equals Arizona Where Builds a WHERE clause enabling you to select a subset of records using selection criteria that is slightly more complex than what you can specify with the Query option For example with the Where option you can select a subset of records from the customer file where the customer number is less than 10 or greater than 40 and the unpaid balance is less than 100 The Where option in this module works the same way as it does in the Labels and Data Export modules except that you do not have to pick an active file and there is no Ask mode For a complete description of this option see Appendix B Option Descriptions Total Displays the total number of records available in the current working file or subset For example if you are looking at order records you can use this option to tell you how many order records there are It may take a few moments before the total appears at the bottom o
283. s If you select Add again to add another record the next number you see is 1010 and the next one is 1015 and so forth You can access the Dictionary to reset the initial and incremental values to different values Next Prev First Last Update Copy Delete View Browse Join Query Where Total Order Module Info User Exit Full Set mus z Cust Mum M05 Country USA Namet Address Address City State Postal Code Contact Phones Sales Rep Credit Limit 1 500 Balances 0 00 Terms Discount 0 Comments 2 Accept the value 1005 and press RETURN to go to the next field 3 Fill in the rest of the fields with the data in Table 3 3 A Tour Through Results Table 3 3 Field Information for New Record Address 2 Flyhigh Road Sales Rep DKP Results automatically verifies information you enter into these fields If you try to enter an invalid value you get an error message Press TAB or any cursor key to move among fields To edit a field simply type over existing information 4 Press GO to add this record to the mysports database NOTE If there is already a customer number 1005 in the database this error message appears customer already exists with Cust num 1005 132 Results automatically verifies the information you enter If it is invalid Progress returns an error message To find an available customer number you can use the Browse option described in the Browsing Through
284. s for example Cust num are listed twice because they are contained in more than one file The file and database containing the field are listed in parentheses 7 Press MODE to toggle to the labels The list of field labels appears in the window Get Run Settings Clear Module User Exit Choose Fields Address mysports Customer Allocated mysports Item Back Order Cmysports Order Line Balance mysports Customer Carrier mysports Order Cat Description Cmysports Item Cat Page Cmysports Item City Cmysports Customer Comments Cmysports Customer Contact mysports Customer Country mysports Customer Label o fere en err tit 0 2 1 of 43 Press F1 when done F3 to toggle F4 to exit 3 23 Progress Results User s Guide for UNIX 3 24 8 These are the labels that appear in your report Unlike field names field labels can have blank spaces in them The fields are listed in alphabetical order by field name now If a field does not have a label the field name appears as the label Note that because you chose to show fields as field labels the display is now field labels The fields appear as labels until you toggle them back to field names Select the following fields in the order shown Results numbers the fields in the order in which you select them They will appear in the same order in your report If you select a field by mistake highlight it again and pres
285. s RETURN An asterisk appears next to the reports you selected To unmark a report select it again An asterisk appears next to the reports you selected 5 Press GO to delete the marked reports or press END to cancel 5 4 10 Adding a WHERE Clause with Ask Mode This section describes how to create a WHERE clause to limit the number of records that appear in the report This WHERE clause uses Ask mode so you can use the same WHERE clause to get different subsets of records For example you can make Results prompt you for a value to compare to the customer name each time you run a particular report Thus you can use the same report definition to create different reports based on different criteria The report displays the records where the customer name is equal to the value you enter This is called a WHERE clause with Ask Mode or prompting In another type of WHERE clause you enter a constant value to compare with field values Thus you get the same set of records every time you run the report For more information about using the WHERE clause builder to define WHERE clauses see Chapter 3 A Tour Through Results For information about using Expert mode to define and edit WHERE clauses see Chapter 4 Query Module NOTE Youcannot use Expert Mode to define or edit a WHERE clause that uses Ask mode If you try to you receive error messages 5 19 Progress Results User s Guide for UNIX Follow these steps to create WHERE
286. s RETURN to deselect it If you select a field out of order highlight it and type the order number next to it Results renumbers the other fields automatically A Tour Through Results 9 Press GO to lay out the fields in this report The Report Layout window shows the report layout and displays the formats for each field The information below the field names is the display format information For example x 20 means that the names in the name field can be 20 characters wide gt gt gt gt 9 means that the Ord num field is a number up to five digits long in a right justified format When displaying records Results replaces the gt with a blank if there is no digit in that position For example if the customer number is 4 Results shows itas 4 See Appendix C Field Display Formats for more information about how fields are formatted for display These are default values that appear in the window You can change the formats using the Settings option but leave them for now The Report Width marker in the lower right corner of the Report Layout window tells you that this report is 76 characters wide The maximum width for any report is 255 characters 3 4 2 Running a Report Follow these steps to run the current report Report Layout Order num Line num Item Mame Repart Midth 76 1 Select Run A list of output devices appears Get Put HMM Define Settings Where Order Clear Info Module User Exit Re
287. s a brief description of each new feature of the release The booklet also explains where to find more detailed information in the documentation set about each new feature Welcome to WebSpeed Hard copy only A booklet that explains how WebSpeed software and media are packaged Welcome to WebSpeed also provides descriptions of the various services Progress Software Corporation offers Reference Pocket Progress Hard copy only A reference that lets you quickly look up information about the Progress language or programming environment Pocket WebSpeed Hard copy only A reference that lets you quickly look up information about the SpeedScript language or the WebSpeed programming environment xxviii Results Overview This chapter describes the Results software package and how you can use it to access database information It also includes information on e Database terminology e The Results Main Menu options e The Results HELP feature Progress Results User s Guide for UNIX 1 1 Introduction Results is an interactive menu driven software tool that serves the following users e Users with little or no programming experience e Advanced users and application developers Through menu options end users can query maintain and generate reports on database information without writing any code They can also create address labels Advanced users and application developers can easily incorporate additional feature
288. s counts them 5 26 Reports Module 5 5 3 Expanding a Report Using the Totals Only Report This figure shows an expanded report you can create using the Totals Only Report option and other options State Balance Credit Limit 8 583 88 130 000 TOTAL In the above report a summary total line appears for each state in each sales region It also shows the overall totals for the unpaid balance maximum credit and year to date sales columns The following features were used e Hide repeating values for the Sales rep field e Totals Only defined so that the report shows the total values for each state in each region e Totals and subtotals defined for numeric fields e Page ejects when sales regions change 5 6 Summary This chapter described many of the features you can use to create and enhance your reports It described how to add and delete fields in reports add titles and adjust spacing and change the order of records in reports It also described how to add calculated fields delete saved reports add a WHERE clause that uses Ask mode and create a totals only report 5 27 Progress Results User s Guide for UNIX 5 28 Labels Module This chapter describes features in the Labels module It provides information on e Menu options in the Labels module e Adding new information and adjusting settings in your labels For example this chapter describes Saving copying running and deleting label definitions
289. s it at the end of the array so that no gaps appear in qbf order array e Each element has the form database file name field name DESC In this case an optional blank space and the letters DESC are included after the name to indicate that the order field is descending If the field is an array field the field name is followed by a number square brackets for example 4 where is the array element selected for ordering e The values contained in the qbf order variable are always database fields or calculated fields e The following example is typical of the code that generates the order by clause i 1 TO 5 WHILE qbf order i lt gt BY qbf order i END IF c lt gt THEN PUT UNFORMATTED SKIP BREAK c NOTE This code is used in the u export p sample export format program in the Designing Your Own Export Format section in this chapter When you run this program it outputs the appropriate ordering for the report export or label program that was defined in Results 10 9 Progress Results User s Guide for UNIX 10 6 6 Determining Files and Selection Criteria Use the following shared variables in your Progress procedures to determine the files and selection criteria defined when the user selects the User module DEFINE SHARED VARIABLE qbf db AS CHARACTER EXTENT 5 NO UNDO DEFINE SHARED VARIABLE qbf file AS CHARACTER EXTENT 5 NO UNDO DEFINE SHARED VARIABLE qbf where AS CHARACTER EXTENT 5
290. s on your display If you select this option when you have two or more files joined the Add window provides default information that you can keep or modify Updates the currently displayed record if you have permission For example Update enables you to change the address for a customer who has moved Copies the currently displayed record to a new record if you have permission Lets you copy the record displayed in the window to create a new record and then update the new record s contents Deletes the currently displayed record if you have permission Selects another query form to view For example if you are looking at customer records you can use View to select a different kind of form to look at such as sales order records Browses through a list of key field values in an overlay window This helps you find and select a record To temporarily add other fields to the browse list press GET Joins a related file and enables you to query the records related to the active record For example you can join an order file to a customer file to see the order records for a particular customer See Chapter 9 Database Administration for details on how to establish join relationships Progress Results User s Guide for UNIX Table 4 1 Query Module Main Menu Options 3 of 4 Query Queries the current file using a query by example interface so you can select a subset of the records that appear in the current form In a que
291. s option if your database administrator enabled it for you When you select any of the options except the ASCII choices you set the Export Type line in the Export Layout window When you select any of the ASCII options a form pops up for you to fill The form enables you to define the initialization string at the start of a record the record termination string the field delimiter string and the field separator string for particular export requirements These values can be entered using several different methods e Enteraliteral character surrounded by single quotes For example x where x is a literal character Enter x where x is a control key value to represent a control character In this case entering the carat character before the control key character enables the Data Export module to interpret the sequence correctly For example i represents a tab e Enter h where represents one or two hexadecimal digits followed by the letter h character to denote a hexadecimal value For example OCh or OCH represents form feed Enter where is a one two or three digit decimal value For example 27 represents an escape value e Enterasymbol from the Expert Mode table seen when you press GET F5 or CTRL G within the settings window The pop up window displays a list of two character symbols each symbol represents numbers 0 through 31 in the ASCII table C Field Display Formats This a
292. s the end of each record in an export file Glossary 7 Progress Results User s Guide for UNIX Glossary 8 Related Files Files that share some information Two or more files that use similar fields to join one file with another Relational Operator A symbol such as equal to lt less than or gt greater than that is used to compare two values It specifies a condition that can be either true or false Report An organized display of data The Results Reports module enables you to create and edit reports that display and summarize the data from one or many files in a database Reports can contain text fields variables and aggregates Startup Command A command that starts a software package For example the commands that start Progress and Results Submenu A menu that you access through another menu See also Menu Summary List A Browse list that shows some but not necessarily all of the fields in the record User File A file that stores user IDs passwords and user names in each database User ID User identification stored in the _User file of the Data Dictionary At start up a user ID is used in conjunction with a password to ensure that only known users can start the application At runtime the application can check the user ID established at startup to determine that only authorized users can run individual procedures In Progress a user ID is a 32 character string Like filenames user IDs must begin w
293. s to tailor Results to their specific application requirements Database administrators can define and control environment parameters for Results and for specific Results users 1 2 Results Overview 1 2 Database Terms You do not have to know a lot about database structures to use Results but it is helpful if you are familiar with some database concepts and terminology This section presents a brief introduction to some important terms The next section describes those terms in greater detail e A database is a collection of tables related to a broad subject area e A table is a collection of records related to a specific subject e Arecordis a collection of related information called fields e Afield is a specific unit of information e An index is a field or combination of fields used to rapidly retrieve a particular record in a table A primary index is the most frequently used index Each table can have many indexes but only one primary index e Related tables are tables that use similar fields to join one table with another By default Results relates two tables if one of the tables has a unique index and all fields in that unique index appear in the other table Results presents your information or data in a logical manner that is similar to how you organize paper files For example suppose you have many rooms filled with filing cabinets To find a piece of data you need to know Which room e Which filing cabin
294. se from your export format Follow the first two steps if you need to remove a WHERE clause in the Reports and Labels modules le 2 3 Select the Where option Select the Customer file which has the WHERE clause Results then displays the WHERE clause builder windows Press END to delete the WHERE clause When the WHERE clause builder windows disappear so does the WHERE clause in the Data Export Info window Now when you run the format you get the full set of data in the current format A Tour Through Results 4 Run this report on your terminal The full set of customer status data appears in default Microsoft Word format mysports Customer Name masports rder rder num mysports Order Line Line lountain Bikes 12 1 Swim Goggles 91 18 1638 ountain Bikes 12 2 Frisbee 10 13 37 133 7 lountain Bikes 12 5 Volleuball 87 12 73 1240 B3 ountain Bikes 12 4 Galf shoes 53 81 4773 luntain Bikes 12 5 Balf balls 46 11 77 541 42 buntainn Bikes 12 5 Faatball 58 12 5 725 ountain Bikes 12 7 Squash Racquet 74 32 2358 lountain Bikes 60 1 Ski Gloves 55 23 1255 ountain Bikes 50 2 Swimming trunks 27 8 77 235 79 bics vline KY 118 1 Baseball Bat 75 13 35 1060 2 bics vline KY 118 2 Soccer ball 73 15 51 1132 23 bics vline KEY 118 3 Ice Skates 21 51 1281 bics vline EY 141 1 5norkel 40 13 95 558 bics vline KY 141 2 Hackeu stick 81 37 2987 bics vline EY 141 3 Hockeu puck 34
295. se options if you want users to have them when they start Results with a database other than the Progress sports database You can enable and disable options using the Query Permissions option on the Administration menu Database Administration 9 1 7 After the Initial Build After the initial build you can use the Administration module to change any environment settings With this module you can establish further control over permissions printers terminals and Results components 9 2 The Administration Module Use the Administration Module to customize and tailor Results to take advantage of your environment You can set permissions assign output devices determine the appearance of query interfaces and change defaults As a Progress developer you can customize this end user tool to fit your application and to fit your user s needs This section includes e Descriptions of all the Administration module options e Procedures to manipulate the option s functions Because Results is a Progress application it uses the functionality that is available through the Progress product that generates it Figure 9 1 shows the Administration module Main Menu Administration Files Configuration Application Rebuild G Language F Form Definitions for Query P Printer Setup R Relations Between Files T Terminal Color Settings Security Modules C Contents of a User Directory B Browse Program for Query How to Exit Applicat
296. se that selects a subset of records For example you can select records where the sales region equals East Order Orders the data export information for up to five fields For example you can define the records to print in order by sales region and by customer number within each sales region Data Export Module Clear Resets the settings to their default values Or if there are no files or fields defined on the screen the screen displays a list of defined data export formats you can delete as many as you want Info Displays more information about the active definition such as the names of the active files how they are related and any WHERE and order criteria defined It can also display the name of the definition if it has been saved and how long it took to run the last time if it has been run Module Switches to a different module without going back to the Main Menu You can also transport file field order and WHERE clause criteria information to other modules User Enables you to transfer to a customized option This option is hidden by default You see this option only if a Progress developer has enabled it to perform an action If so see the documentation provided by the application developer that supports this function Exit Exits from the Data Export module to the Results Main Menu 7 3 Layout Window Settings The Data Export Layout window runs across the lower half of the screen and displays fie
297. security enabled for your database You can set permissions on many different levels For example you can control the access one user or a group of users have to modules menu options query forms and printers You set permissions using IDLISTs 9 13 Progress Results User s Guide for UNIX An IDLIST is an expression a constant variable or any combination of these whose value is a list of one or more user identifications user IDs If the expression contains multiple user IDs you must separate the user IDs with commas Do not insert blanks between the user IDs Table 9 1 shows the values you can use in the IDLIST Table 9 1 Values for IDLISTs Value All users are allowed access This user has access This user does not have access Users whose ID begin with string have access string Users whose ID begin with string do not have access The string value is a character expression that the system checks against the IDLIST For example you can enter an IDLIST into the form shown in Figure 9 4 to establish permissions for the Administration module Administration Module Permissions Query Reports Select a module from Labels lt the list at left to Data Export set permissions for Permissions A Administration mist bill kathy tony ir All users are allowed access Suser2 Suser2 etc Only these users have access IXuser2 l amp user All except these users
298. sing more than one database you must have the same databases connected in the same order You copy the format of the label not the content Therefore if you don t have permission to access all of the fields that the label definitions needs that field information does not appear in the label Select the label definition that you want to load The information and layout for that definition appear in the windows on the display You can run or edit this label definition Progress Results User s Guide for UNIX 6 3 3 Copying Label Definitions Use the following steps to copy label definitions that are in your directory You use the same steps to copy definitions in the Reports and Data Export modules 1 Retrieve the label definition 2 Save it under a new name You now have a renamed copy of the label definition you selected 6 3 4 Running Label Definitions Follow these steps to print labels to your terminal display printer or operating system file l Select the Run option If there is no label definition in the window a window lists the saved labels in your directory You can load and run any of the labels marked with an asterisk The asterisk means that the label was created using the currently connected databases To see the name of the databases press MODE Press MODE again to see the program names A list of output devices you can select appears Your database administrator can tailor this list so that for exam
299. ss than symbols lt and gt together to cause a floating decimal display In a floating decimal display there are a set number of digits and the decimal point can appear anywhere within the number Up to ten lt symbols can follow a decimal point The lt symbols must be balanced by an equal or greater number of gt symbols to the left of the decimal A lt is replaced by a digit if its corresponding gt is eliminated by a leading zero and the stored value has the required precision Table C 5 shows some examples of how Results displays numeric values using different formats NOTE Ifyou use the European Numeric Format E startup option a comma marks the decimal location in fields and periods mark thousands Table C 5 illustrates the US Canadian format where the meaning of those markers is reversed Table C 5 Numeric Format Examples 1 of 2 9999 123 0123 9 999 1234 1 234 Field Display Formats Table C 5 Numeric Format Examples 2 of 2 gt gt gt 9 123 123 gt gt gt 9 99 This display value is right justified if it has a column label It is left justified if it has a side label In this example there is a negative sign in the value 12 34 but the display format of gt gt gt 9 99 does not accommodate that sign The result is a string of question marks In this example the value 1234567 is simply too large to fit in the display format of gt gt gt 9 99 The result is a
300. ssing actions that you specify or that are assumed as part of the procedure This is the most common action taken following execution messages e Returns to the Progress Procedure Editor so that you can correct an error in a procedure This is the usual action taken following compiler messages e Halts processing of a procedure and returns immediately to the Procedure Editor This does not happen often e Terminates the current session Progress messages end with a message number in parentheses In this example the message number is 200 Unknown table name table 200 You can use the Progress PRO command to start a single user mode character Progress client session and view a brief description of a message by providing its number Follow these steps l Start the Progress Procedure Editor install dir dlc bin pro 2 Press F3 to access the menu bar then choose Help Messages 3 Type the message number and press ENTER Details about that message number appear 4 Press F4 to close the message press F3 to access the Procedure Editor menu and choose File Exit Progress Results User s Guide for UNIX Other Useful Documentation This section lists Progress Software Corporation documentation that you might find useful Unless otherwise specified these manuals support both Windows and Character platforms and are provided in electronic documentation format on CD ROM Getting Started Progress Electronic Documentation
301. st for each order line for each customer By adding the total line for each customer you created a break group This new layout makes it easier to determine the total cost for each customer Because you added the page break each customer appears on its own page 4 Return to the Reports module window and use Put to save this report and overwrite the current Order Line Report To do this select Order Line Report then press RETURN instead of entering a new description When Results prompts you to overwrite the report select Yes 3 41 Progress Results User s Guide for UNIX 3 42 3 4 8 Adding a WHERE Clause This section explains how to create a WHERE clause to limit the records that appear in the report In this example the WHERE clause limits records in the report to customers who have Spike Smith SLS or Bubba Brawn BBB as their sales representative and have a current balance of more than 1 000 Thus the report displays the records WHERE Sales Rep SLS OR Sales Rep BBB AND Balance gt 1000 In this type of WHERE clause you compare field values to a constant value to get the same set of records every time you run the report In another type of WHERE clause using Ask mode you can enter a different value to compare each time Thus each time you run the report Results prompts you for a value For more information about WHERE clauses with Ask mode see Chapter 5 Reports Module For examples on how to use the Expe
302. string of question marks This is an example of the floating decimal display format The lt symbols must follow the decimal point and be balanced by an equal or greater number of gt symbols Progress Results User s Guide for UNIX C 5 Logical Display Formats Logical fields or variables can contain a true or false value You can define any strings to represent them Logical fields default to a yes no format You can change this default to any string value such as red black customer prospect or commercial private For example you might define a logical variable with an on off format In this example on represents the true value and off represents the false value If input is coming from a file and you have defined a format for a logical field or variable that is something other than true false or yes no you can still use true false or yes no as input to that logical field or variable Table C 6 contains some examples of how Results displays a logical value with different formats Table C 6 Logical Display Formats FORMAT TRUE FALSE E NOTE Ifyou define your own logical values a false value cannot begin with y or t and THAI f a true value cannot begin with n or C 6 Date Display Formats Date formats specify a two digit month and a two digit day Date formats can specify a year in this century with two digits or four digits while years in another century require four digits You
303. sults Also use it to add login procedures and change the title on the Results Main Menu The sign on program runs before Results starts The default program u logo p displays the Results logo first You can tailor it to include your own logo remove the logo add login procedures or define shared variables you want to use in User programs You can also change the Progress Results title on the Main Menu If you want to add password security to Results you can replace u 1ogo p with a program that calls login p to prompt for user ID and password where necessary similar to the way prostart pcalls login p when you start a Progress 4GL session Results provides a program called u login p that calls login p Database Administration When you exit the Administration module Results performs the startup phase again If you have a login procedure such as u login p installed you see the prompt for user ID and password again If you use the unmodified login p that comes with Progress you can bypass security by pressing END Therefore to protect your package from unauthorized access do not leave your workstation unattended with the login screen on your monitor Anyone who presses the END key at this point has full access to the Results system including the Administration module Alternatively you can enhance the default login p file so that it does not allow users to use END to bypass login security For example you change this line in yo
304. t e Highlight the form with the T and d keys or TAB key and press RETURN or GO to select the form Progress Results User s Guide for UNIX e Type the first letter of the form The highlight moves to the form Press RETURN to select the form If there is more than one form that begins with the same letter the highlight bar moves to the first occurrence of the letter If you type a letter for a form not on the list the screen displays the letter in the box but the highlight bar does not move You can then type a letter for a form that exists and this letter replaces the one in the box 4 Type c to highlight the Customer information form This screen appears Query Select Query Form B information This contains transactions for the Receivables s Item file Local Default Order header information Order line information Ref Call Sales representative information Table of state abbreviation with sales regions Jesc 1 of 3 he name of the Query form tc Press F1 when done F9 to toggle desc file pragram 5 Press RETURN to select the Customer information form The first record in the customer file appears as shown in this screen Prev First Last Add Update Copy Delete View Browse Join Query Where Total Order Module Info User Exit Cust Numt 1 Country USA Mamez Lift Line Skiing Address 276 North Street Address City Boston State MA Postal Codes 02114 Contact Gloria Shepley Phone 617
305. t gt 9 99 Next you define a new label and a new format for this field Leave the repeating value to the default no Type Price Line as the new label Type gt gt gt gt gt gt 9 99 as the new format Report Info Formats and Labels File Numeric Expr Field qbf 007 Expression mysports rder Line tu mus Tupet decimal Label Price Line Formatz Hide Repeating Values no_ This format means that the field can have up to seven digits to the left of the decimal and two digits to the right It will also display in a right justified format Results does the following to the fields format The greater than symbols gt are space holders for digits A blank space replaces the if there is no digit in that position The comma acts as a place holder This character displays literally in the value The 9 is replaced by a digit from 0 to 9 A zero replaces the 9 if there is no digit in that position Because two 9s follow the decimal point Results displays only two digits after the decimal point A Tour Through Results e The decimal point marks the location of the decimal point in the field This character displays literally in the value NOTE If Results is set to default to the European numeric format using the European Numeric Format E startup option numbers on your screen appear in European numeric format In European numeric format a comma marks the decimal location in
306. t Info Tesc Order An asterisk marks your report to show that you can load it This means that it was created using the database that is currently connected To see the name of the database press MODE F9 or CTRL T Press MODE again to see the program names If you had created other reports with different databases instead of the current database they would have no asterisk That means you cannot load them with your current database s If you created a report with an earlier version of Results a question mark marks the report to show that Results did not save the names of the databases used to create the reports If you created them with the current databases use the Get option to retrieve them and the Put option to save the database names with the report names At this screen you can load a report from another directory if you have permission load the report you defined or press END to cancel the Get To successfully copy a report format from someone else s directory the report must have been created using the database you are using If it was created using more than one database you must have the same databases connected in the same order Select Order Line Report to load the report you defined and saved in the previous subsection The Report Info and Report Layout windows for Order Line Report appear 3 4 5 A Tour Through Results Adding a Math Expression This section ex
307. t Num imgsports rder liscount imysports Customer Discount imysports rder Line Extended Price imysparts rder Line Item num imusports Item Item num Cnysports Order Line Line num imysparts rder Line abel 1 of 21 Expression 76 Press F1 when done F9 to toggle F4 to exit Results prompts you to enter the first multiplier in your math expression In this tutorial you multiply the number of units on hand by the cost for each unit 4 Select the Qty field The list of numeric fields you can pick appears again The expression begins to build in the Expression window and Results prompts you to choose the next multiplier Expression mysports Order Line Qty 2 3 30 A Tour Through Results 5 Select the Price from Item database field The Price field appears in the Expression window and Results prompts you to continue adding to this expression Get Put Run Settings Where Order Clear Info Module User Exit Expression Builder Enter first multiplier mjsports rder Line tu Enter next multiplier orts Item Price Continue adding to this expression L abe 1 18 0f 21 Expression mysports Order Line G ty mysports Item Price If you select Yes you can continue to add to the expression using any of the math operations Add Subtract Multiply Divide or Raise to a Power and Results automatically grou
308. t also enables you to transport file field order and WHERE clause criteria information to other modules Option Descriptions User Transfers to a customized option You only see this option if an application developer has included an optional program to perform an action This option is hidden by default If you have this option see supplemental documentation provided by the application developer that describes this function Exit Results Exits the previous level For example from the Full Set of records this option enables you to exit to the Results Main Menu From a Subset it exits to the Full Set B 3 Menu Options for the Query Module Next Finds the next record in the file or subset according to the current active index and selection criteria Prev Finds the previous record in a file or subset First Finds the first record in a file or subset For example if the records are in order by customer number the First option finds the record with the lowest customer number If you are in a subset of a file First finds the first record in the subset You can change the order records are listed in by using the Order option Last Finds the last record in a file or subset Add Adds a new record to the file using the current form if you have permission If you select this option when you have two or more files joined you see default information that you can keep or change in the add window The information entered is auto
309. t appears in the layout window When you see this field in the layout window it is not prefixed with names of a database and file They do not appear with the field name because it is a calculated field defined for the report Calculated fields are not from a database file In the Reports module an r marker appears beneath the column definition to show that this is a running total field Option Descriptions Percent of Total Inserts a column in the report that displays a percent of total value for a numeric field or expression This percent of total value represents the percent of the total values in the column that this line in the column represents This option works the same way as Running Totals except that the default label is Percent of Total and the p marker shows that this is a percent of total field This field has a standard display format of gt gt gt 9 9 For information on formats see Appendix C Field Display Formats Counters Inserts a column in the report to display a running counter Counters are useful for line numbering and running record count When you select this option a window appears that enables you to define the starting number for the counter and the number to add for each record This option inserts the column into the Layout window the same way as Running Totals except that in the Reports module the default label is Counter and the c marker shows that this is a counter field Math Expressions
310. t editor AppBuilder is a Rapid Application Development RAD tool that can significantly reduce the time and effort required to create Progress applications Progress Basic Database Tools Character only information for Windows is in online help A guide for the Progress Database Administration tools such as the Data Dictionary xxiii Progress Results User s Guide for UNIX Progress Basic Development Tools Character only information for Windows is in online help A guide for the Progress development toolset including the Progress Procedure Editor and the Application Compiler Progress Debugger Guide A guide for the Progress Application Debugger The Debugger helps you trace and correct programming errors by allowing you to monitor and modify procedure execution as it happens Progress Help Development Guide Windows only A guide that describes how to develop and integrate an online help system for a Progress application Progress Translation Manager Guide Windows only A guide that describes how to use the Progress Translation Manager tool to manage the entire process of translating the text phrases in Progress applications Progress Visual Translator Guide Windows only A guide that describes how to use the Progress Visual Translator tool to translate text phrases from procedures into one or more spoken languages Reporting Tools Progress Report Builder Deployment Guide Windows only An administration and deve
311. t from updating information in the Query module unless the user ID is acctmngr All other user IDs can use the Update option 9 3 1 Contents of a User Directory Each Results user has a unique userid qd file The userid qd file holds the information about the physical filenames that map to the user s descriptions for the Reports Exports and Labels modules Although more than one user can access information in the same database users must have their own directories to hold their generated reports labels and export formats NOTE When you do not use the User ID U startup option on DOS or OS 2 the file is named results qd by default If Results cannot find the QD file in the PROPATH it creates one in the current directory Each user has their own QD file because if two users try to change the same QD file at the same time the file can be corrupted The Contents of a User Directory option enables you to view the contents of any user s directory To select a user enter the full pathname of the user s QD file and press RETURN or GO The contents of the user s directory appears in the following categories data export formats label formats and report definitions The name of the database used to create the data export formats labels and reports appears after the name you gave it For more information about the QD file see Appendix E Files that Results Creates 9 15 Progress Results User s Guide for UNIX 9 3 2 Exiting the Appli
312. t the top of each window throughout your query process as shown in Figure 4 2 Prey First Last Add Update Copy Delete View Browse Join Query Where Total Order Module Info User Exit Figure 4 2 Query Module Main Menu In some cases you see a subset of these options For example you might only see the options you can pick when there is a subset of information in the current form Table 4 1 provides a brief description of each option in the Query module For complete descriptions see Appendix B Option Descriptions If you do not have all the options listed here see your database administrator Table 4 1 Query Module Main Menu Options 1 of 4 Next Finds the next record in the file or subset according to the current active index and selection criteria For example if the records are in order by customer number the customer number is the current index In that case Next finds the record with the next highest customer number If you are in a subset of a file Next finds the next record in the subset Use the Order option to change the way the forms are ordered Finds the previous record in a file or subset Query Module Table 4 1 Query Module Main Menu Options 2 of 4 Finds the first record in a file or subset Finds the last record in a file or subset Browse Adds a new record to the file using the current form if you have permission For example you can add a new customer record if the customer form i
313. tem Explains how to install the product log in and out and how to use the function keys and menus Chapter 3 A Tour Through Results Provides a tour through the user options in the Results product Describes many of the features in the Query Reports Data Export and Labels modules Chapter 4 Query Module Describes different ways to retrieve information from a database using the Query module Chapter 5 Reports Module Describes how to create reports and provides examples Chapter 6 Labels Module Describes and provides examples of how to generate mailing labels Chapter 7 Data Export Module Describes how to export your data in formats useful to other software Chapter 8 Multiple Databases with Results Describes the implications of using Results with more than one database open at the same time Chapter 9 Database Administration Defines how to perform database administration tasks such as defining relations among files establishing file security and defining device interfaces such as printers and terminals xiv Preface Chapter 10 Integrating Results into Existing Applications Describes how application developers can integrate Results into existing applications Appendix A Startup and Shutdown Procedures Describes how to start and stop a Results session Appendix B Option Descriptions Describes the options that appear in the user modules of the Results package For example it des
314. tem displays a message that there is no qc file for that database In that case you need to perform an initial build For information about the initial build process see the Description of the Initial Build section in Chapter 9 Database Administration Startup and Shutdown Procedures NOTE You should not see this message if someone has already run Results against the database for example if someone installed and customized the application software If you do see your database administrator A 3 Starting Results with One Database This section describes how to start Results from your operating system using a single Progress Atlas database in single user and in multi user mode When you start Results with a database in single user mode no one else can access the database you are using When you start Results with a database in multi user mode more than one user can access the same database To start a database in multi user mode you must first start a server for the database as described in the Starting a Server for the Database section in this appendix Type the appropriate multi user startup command at your operating system prompt To start Results from your operating system type the appropriate command at your operating system prompt where dbname is the name of your Progress Atlas database The following command starts Results in single user mode results dbname The following command starts Results in multi us
315. teria to compare with sales representative For example you can build a WHERE clause that selects records for customers that have SLS OR BBB as the sales rep Then the record must meet one of these requirements for Results to include it in your report Because you are using the Equal comparison Results combines the criteria automatically with an OR operator If you were using the Not Equal comparison Results would automatically combine the criteria using AND The Equal and Not Equal comparisons represent special cases in the WHERE clause builder If you use them and enter more than one set of values for a field Results automatically puts the clause within parentheses Results evaluates expressions inside parentheses first If you select No you can leave the WHERE clause as itis or you can build on it using other fields and criteria Select Yes The WHERE clause now contains an OR Expression mysports Customer Sales Rep sls OR mysports Customer Sales Rep ss F6 to prompt for a value at run time t p ith Sales Rep Type bbb and press RETURN Results prompts you to enter more values for sales representative Select No Results prompts you to choose whether you want to enter more selection criteria 10 Select Yes Results prompts you to select how to combine the first part of the WHERE clause with the next part Combine with previous criteria using UR 3 45 Progress Results User s
316. the Description of the Initial Build section in Chapter 9 Database Administration Startup and Shutdown Procedures A 5 Starting a Server for the Database Before you can start a database in multi user mode you must use the Progress PROSERVE command to start a multi user server for the database dbname is the name of the database you want to use in multi user mode proserve dbname options After you start the server of a database you can use the multi user startup command to start a multi user session using that database A 6 Shutting Down a Server for the Database When you finish using the database in multi user mode and before you turn off the computer you must shut down the server process Before you shut down the server each user using the database should exit Results and Progress dbname is the name of the database the server is running against proshut dbname H host name S server name A 7 Stopping Results The following steps describe how to exit from Results to the Progress Procedure Editor or to your operating system 1 Select the Exit command from a Results horizontal menu to return to the Results Main Menu The Exit command appears on the horizontal menu in all the user modules To exit the Administration module press the END key 2 Type e Exit at the Results Main Menu to return to the Progress Procedure Editor or to your operating system depending on how you started Results The f
317. the Info option to change the information Cust Num Fanatical Fanatical Fanatical Fanatical Fanatical Fanatical Fanatical Croquet Croquet Croquet Croquet Croquet Croquet Croquet Croquet Croquet Croquet Croquet Croquet Go Fishing Ltd Go Fishing Ltd Athletes Athletes Athletes Athletes Athletes Athletes Athletes Hoops Croquet Co Hoops Croquet Co Hoops Croquet Co BAI Ex RO EX CH RR WP OO oo Oe CHE CS Je CL S2 TOWN to F4 when done 4 Return to the Reports screen and save this report under a new name 5 Select the Info option The Report Info window appears with this information e The name of the report e The amount of time it took the last time it was run e The names of the files and fields used in the report including the names of the databases and field formats Summary In this chapter you learned how to access data in more than one database query information in multiple databases join files from different databases and add fields from different databases to a report For more information about starting Results with more than one database see Appendix A Startup and Shutdown Procedures Database Administration This chapter is written for the Results database administrator It is divided into two sections e General administration which discusses A Editing the results 1 file Tohe initial build process e The
318. the tutorial in Chapter 3 A Tour Through Results The Query module and the Reports module sections are particularly important to understanding this chapter The examples in Chapters 3 through 7 use Results with one database The examples in this chapter use Results with two databases Progress Results User s Guide for UNIX 8 1 8 2 8 3 Introduction In Results you can simultaneously access information from several databases For example you can run queries on two different databases on the same screen You can also include field information from more than one database in your reports labels or data exports If you define and save a report label or data export that uses data in more than one database you must connect the same databases in the same order to access that definition Accessing Multiple Databases This section describes how to use Results with more than one database Follow these steps to start Results with two databases 1 Create two copies of the sports database Name one sportsl1 and the other sports2 2 To start Results from your operating system type the appropriate command at your operating system prompt When you first start Results with new databases you need to perform an initial build as you do with a single database The commands are listed in the Starting Results with Multiple Databases section in Appendix A Startup and Shutdown Procedures Starting Results with Multiple Datab
319. this interface Use the Data Export module to e Create data files for use in word processors with form letters e Export data files into graphics packages for presentation graphics e Export data files into spreadsheets Export formats in this module include e Progress generic ASCII format e ASCII with field name header e Fixed width ASCII SDF e Comma separated value CSV e DIF e SYLK e WordStar e Microsoft Word e Microsoft Word for Windows e WordPerfect e CTOS BTOS OfisWiriter You can also tailor export formats for your particular needs Data Export Module 7 2 Data Export Module Main Menu Horizontal menu options appear at the top of each screen in the Data Export module as shown in Figure 7 1 Figure 7 1 Export Module Main Menu In some cases you see a subset of these options For example you only see the options that are available when you do not have any files defined in the Data Export Info window The following list provides brief descriptions of all the horizontal menu options and submenu options available in the Data Export module The Get Put Run Where and Clear options work the same way as they do in the Labels and Reports modules For complete descriptions of all options see Appendix B Option Descriptions If you do not have all of the options listed here see your database administrator Get Retrieves an existing data export definition into the Data Export windo
320. to select a subset of labels You need to define an active file using the Define option before you can define the WHERE clause criteria Order Orders labels by up to five fields For example you can define the labels to print numerically by customer number Clear Resets the settings back to their default values Or if there are no files or fields defined in the window Results displays a list of defined labels you can delete as many as you want Info Displays more information about the active label definition such as the names of the current active files how they are related and any WHERE clause and order criteria defined It might also display the name of the label definition if it has been saved and how long it took to run the labels the last time if it has been run Module Switches to a different module without going back to the Main Menu You can also transport file field and WHERE clause criteria information to other modules Progress Results User s Guide for UNIX 6 3 User This option is hidden by default It enables you to transfer to a customized option You only see this option if a Progress developer has included an option program to perform an action If you see it on your screen see documentation provided by the application developer Exit Exits from the Labels module to the Main Menu Labels Features The tour of Results in Chapter 3 A Tour Through Results gives you basic information fo
321. to toggle to the Insert mode so that you do not type over existing information Type the text you want to enter Labels Module 5 Press GO to apply the changes Or press GET to insert a field or END to undo the changes 6 If necessary use the Settings option to adjust the Total Height value for the labels 6 3 8 Adding Fields to Labels This section describes how to add fields to a label definition To add fields to a label definition the Label Layout window must be open The window opens when you create a new label and when you define new fields for an existing label Follow these steps to re create this process l Select the Define option then the Fields option 2 Position your cursor where you want to place the text 3 Press GET to display a list of fields you can insert 4 Select the field you want to insert 5 Repeat steps 3 and 4 to add more fields then press GO to apply the changes or press END to cancel 6 3 9 Adjusting Label Settings This section describes how to adjust the settings in your label layout For example it describes how to print multiple copies of each label print labels two across and omit blank lines within each label You define these settings with the Settings option Follow these steps to adjust your label settings l Select Settings option Depending on your monitor type Results may highlight or underline the fields you can adjust Label Layout Omit Blank Lines Bas Total He
322. treet Join ity Boston States EERTSE Contact Gloria Shepley Invoice sports1 Credit Limit 66 700 Invoice sports Discount 35 Order Csportsi Comments This customer is Order sports2 Ref Call sports1 J Ref Call sports2 Salesrep sports1 Salesrep sports Name o1 l Customer sports2 Select file to join or press F4 to exit Select a related form The first record related to the customer file appears Subset sports1 Order rder num 6 Cust Num 1 Ordered 01 05 93 Shipped 02 08 93 Promised 02 03 93 Carrier Standard Mail Instructions PO Terms Net30 Sales Rep HXM Notice that the title at the top of the order form tells you that this is a subset of the records in the related file When you do a browse of this set you see the subset of records from the file In this example they are a subset of records in the order file in the sports database so a browse shows the subset of records from the order file in the sports1 database In this case you only see the orders for customer number 1 Suppose you want to join to another file For example you want to see the order line information for this order You need to join to the order line file Select the Join option A window appears with a list of the files that you can join to the order file Progress Results User s Guide for UNIX 8 6 5 If you join the order line file from the spo
323. trolling how the user starts up the product you can also add options to Results to tailor the product to your own environment That is you can use the entry points included in Results to attach Progress procedures and look at the current query context the user has defined what fields are selected what files what selection criteria etc The Using Shared Variables section in this chapter provides details about these entry points Integrating Results into Existing Applications 10 5 Using Customized Help Messages When users press HELP Results calls a procedure called applhelp p Most applications have their own applhelp p that contains help instructions for their own products This is the source code for Results help applhelp p PROGRESS RESULTS applhelp p DEFINE SHARED VARIABLE qbf direct AS CHARACTER NO UNDO DEFINE SHARED VARIABLE qbf module AS CHARACTER NO UNDO DEFINE VARIABLE qbf c AS CHARACTER INITIAL NO UNDO IF qbf module f THEN qbf c SEARCH ft r IF qbf c THEN DO FAST TRACK help RUN VALUE qbf direct s prefix p qbf c OUTPUT qbf c RUN VALUECqbf c applhelp p RETURN END IF LENGTH qbf module gt 0 THEN DO RESULTS help RUN VALUE Cqbf direct s help p RETURN END Put your own help routine here If you place this routine at the top of your application help you enable online help to work correctly for Results as well as your application s help
324. uery option to generate a subset of records from a file l Select the Query option A form appears where there are no field values The comparison line shows the comparison for the field that has the cursor next to it I Cust Num Equals In this example the comparison line shows the default comparison for Cust Num Equals whatever value you enter You can change the comparison by entering one of the symbols in Table 4 2 Table 4 2 List of Comparison Operators 1 of 2 Comparison Meaning Equals or begins for character Less than or equal to Begins character only gt lt lt Progress Results User s Guide for UNIX 4 10 2 3 4 5e Table 4 2 List of Comparison Operators 2 of 2 Symbol Comparison Meaning Matches pattern character only matches any number of characters matches any one character Next character entered literally Use a tilde when you want Results to interpret a comparison symbol as a character For example use this symbol if you want to query for a customer with the name Jack amp Jill Since the system usually interprets the ampersand amp as meaning Begins with enter the tilde before the ampersand so Results interprets the ampersand as a character not an operator In this example you would type Jack amp Jill Press HELP to display a list similar to Table 4 2 on your screen then press END or INSERT LINE to clear it from your screen
325. ull If the comma is preceded by Z and the Z is replaced by a blank the comma is replaced with a blank l The number 9 is replaced by a digit A period represents a decimal point in American format gt A greater than sign is replaced with a digit if that digit is not a leading zero If the digit is a leading zero the screen replaces gt with a blank Z The letter Z is replaced with a digit If the digit is a leading zero Z suppresses that digit putting a blank in its place Progress Results User s Guide for UNIX Table C 4 Numeric Field Display Format 2 of 2 Use of Description The asterisk character is replaced with a digit If the digit being replaced is a leading zero that zero is replaced with an asterisk The less than symbol is used in conjunction with gt to implement floating decimal format See Table C 5 These characters display if the number is negative If the number is positive blanks appear in place of these characters Results does not treat these characters as sign indicators when you specify string2 it considers them to be part of string2 A string made up of any characters except plus minus hyphen greater than gt comma any digit 0 9 letter z z or Z or asterisk Lyf you use the European Numeric Format E startup option a comma marks the decimal location in fields and a decimal point acts as a place notation marker Use the greater than and le
326. ur login p file login p DO ON ENDKEY UNDO RETURN return if they hit endkey ct login p DO ON ENDKEY UNDO RETRY retry if they hit endkey You can access this file from the Progress Procedure Editor 9 4 The Configuration Options The Language Printer Setup and Terminal Color Settings options on the Configuration menu let you establish the language printer and terminal device settings for your application 9 4 1 Language One copy of Results can run in many different languages if the RESLANG product is installed with Results Use the Language option to select the language version of Results for the current QC file Then every time you start Results using this QC file you see screens and messages in the language you choose for example German or French When Results starts it searches the results 1 file to find the language it should use If there is no QC file built for the current database or databases it uses the default language specified in the results 1 file for all system messages If there is a QC file for the current database Results uses the language specified 9 17 Progress Results User s Guide for UNIX You can edit your results 1 file before you use the initial build to build the QC file with the default language you want For example you can change the following line in your results 1 file results edit the following line to set the default language for RESULTS language eng
327. use interactive Progress SQL 89 It includes information on all supported SQL 89 statements SQL 89 Data Manipulation Language components SQL 89 Data Definition Language components and supported Progress functions Preface SQL 92 Progress Embedded SQL 92 Guide and Reference A guide to Progress Embedded SQL 92 for C including step by step instructions for building ESQL 92 applications and reference information about all Embedded SQL 92 Preprocessor statements and supporting function calls This guide also describes the relationship between ESQL 92 and the ANSI standards upon which it is based Progress JDBC Driver Guide A guide to the Java Database Connectivity JDBC interface and the Progress SQL 92 JDBC driver It describes how to set up and use the driver and details the driver s support for the JDBC interface Progress ODBC Driver Guide A guide to the ODBC interface and the Progress SQL 92 ODBC driver It describes how to set up and use the driver and details the driver s support for the ODBC interface Progress SQL 92 Guide and Reference A user guide and reference for programmers who use Progress SQL 92 It includes information on all supported SQL 92 statements SQL 92 Data Manipulation Language components SQL 92 Data Definition Language components and Progress functions The guide describes how to use the Progress SQL 92 Java classes and how to create and use Java stored procedures and triggers Deployment Progress Clie
328. w You can get a data export definition you have saved or if you have permission you can get a copy of a definition from someone else s directory Put Saves the Data Export definition You save your definition using a description up to 48 characters long rather than an actual operating system filename Thus you can give meaning to the file description and the definition is automatically saved with an appropriate name for your operating system Run Exports the selected fields using the chosen format on the layout screen You can preview the export data on the screen print them to a file or route them directly to a printing device Define Defines the files and fields included in the report This option has most of the same suboptions as in the Reports module 7 3 Progress Results User s Guide for UNIX Settings Determines the export format When you select this option you see a list of the following possible export formats Where Progress Generic ASCII format ASCII with field name header Fixed width ASCII SDF Comma separated value CSV DIF SYLK WordStar Microsoft Word Microsoft Word for Windows WordPerfect CTOS BTOS OfisWriter User Sample Export The User Sample Export option appears by default when you start Results with a copy of the Progress sports database If you start with another type of database you only see this option if your database administrator enabled it for you Builds a WHERE clau
329. wn in Figure 5 1 Figure 5 1 Horizontal Menu for the Reports Module In some cases you see a subset of these options For example you only see the options that are available when you do not have any files defined for a report in the Report Info window The following list provides brief descriptions of all the options and submenu options available in the Reports module For complete descriptions see Appendix B Option Descriptions If you do not have all of the options listed here see your database administrator Get Retrieves an existing report definition into the Reports writer You can get a report definition you have defined or if you have permission you can get a copy of a report definition from someone else s directory Put Saves an existing file definition under a descriptive name Run Runs the report as it is currently laid out in the Report Layout window You can preview the report on the screen print it to a file or route it directly to a printer 5 3 Progress Results User s Guide for UNIX Define Defines files and fields to include in the report Settings Controls general report settings such as headers and spacing Settings has these options Formats and Labels Changes field labels and formats for any field or defined column in the current report This option also enables you to hide repeating values for fields including calculated fields However you cannot hide repeating values for a Total fiel
330. x the boxes default to yes and no values You can include text strings such as ENABLE and DISABLE or ON and OFF For example this code produces the logical choice box shown below Do you want to over write the existing report Yes No The initial value of the first parameter to INPUT OUTPUT sets the default choice For example if the value of the first parameter to INPUT OUTPUT is true the highlight bar rests on the left option the true value If the first parameter to INPUT OUTPUT is false the highlight bar rests on the right option the false value 10 8 Using the Generated Report Labels and Data Export Code This section describes how to use report label and data export programs generated by Results as stand alone procedures In some situations you might want to include some existing standard reports label programs and data export capabilities in your application without including all of the Results system You can use Results to build these items yourself then apply the following method to run them as standalone programs When you run a report label or data export definition Results generates a Progress 4GL procedure When you save these definitions in Results you enter descriptions to identify them These are just descriptions not the filenames used to store the reports as source files in the operating system 10 18 Integrating Results into Existing Applications Build and test
331. xisting Applications 10 1 Introduction Results includes a special User option that appears on the Results Main Menu and the horizontal menus within Results modules when there is a user program defined for Results The user uses the User option to transfer into a customized application program that you provide Follow these steps to install your own program 1 Put your program anywhere in the PROPATH 2 Enter its name in the User Option choice on the Administration Main Menu After you perform these steps Results runs your program whenever users select the User option from any Results menu If you want to include more than one user program you can have the User option call a menu that includes them By default Results includes a sample User program called u option p that lets the user escape to the operating system To get back to Results they perform the operating system escape When Results runs against a copy of the Results sports database it automatically installs the u option p program in the User Option When it runs against any other database you or the database administrator must enter its name in the User Option choice on the Administration module Main Menu For example you can call a word processor or spreadsheet package from the Results Main Menu or you might want to pass the records the user has selected for reports to a statistical analysis routine or other customer program you wrote in the Progress 4GL These are just
332. xpression In this exercise you can let the WHERE clause builder guide you For details on using the Expert mode to build a WHERE clause see the appropriate section of Chapter 4 Query Module Select the Sales rep field The Comparisons window contains options for building onto your WHERE clause The beginning of the WHERE clause appears in the Expression window Bet Put Run Define Settinas Order Clear Choose a Field Comparisons Address tmysports Customer Address2 mysports Customer Balance tmysports Customer City mysports Customer Comments Cmysports Customer Contact Amysports Customer Country imgsports Lustomer Credit Limit Cmysports Customer Cust Num Cmysports Customer Discount imusportz Lustomer Not Equal Less Than Less or Equal Greater Than Greater or Equal Begins Contains Matches Info Module User Exit Name mysports Customer Phone tmysports Customer Pastal Cade imusportz Lustomer Sales Rep imusportz Dustomer abel 14 of 16 Enter a Value Expression mysports Customer Sales Rep 3 43 Progress Results User s Guide for UNIX 3 44 5 6 Notice that Sales rep is prefixed by mysports customer This means that the Sales rep record is in the customer file in the mysports database Also the Comparisons window lists all the choices you can make to character fields However sometimes this list contains fewer choices depend
333. y records there are in the current form If you are looking at a subset of records it tells you how many records are in the subset 4 15 Progress Results User s Guide for UNIX 4 16 4 3 9 Changing the Order of Records This section describes how to use the Order option to change the order of the records in the list For example in the mysports database customer records are usually in order by customer number To put the records in order according to another index field follow these steps l Select the Order option 24 3e A window appears listing the possible indexes for the active file For example the following figure shows the indexes for the customer file ext Prev First Last Add Update Copy Delete View Browse Join Query Where Total Module Info User Exit Full Set myspo itn Cust Numt 1 Country USA Order iing Address 276 North Street VETE ee eee ys Boston State MA P Cust Num Cust Num ria Shepley Phone B17 450 0087 5 Name Name Balance 42 568 00 Terms Metz D Sales Rep Sales Rep Comments This customer is on 1 of 4 mark The fields in the window are the fields you can use to order the records The fields listed in parentheses are the fields that make up each index The Country Post index is made up of two fields Country and Postal Code Results orders the records by country and then by postal codes For information on defining indexes see Chapter 9 Database Administ
334. you enter a European numeric format for the VALUE function an error message appears When you use the GET key to pick and define a VALUE function in report headers and footers it always automatically appears in American format Table C 4 defines the symbols you can use to define numeric field display formats It shows the American use of these symbols but if you use the E startup option you see their European uses Table C 4 Numeric Field Display Format 1 of 2 Symbol Use of Description Parentheses display if the number is negative If you use one parenthesis left or right you must use the other string 1 A string made up of any characters except plus minus greater than gt less than lt comma digits 0 9 letter z z or Z asterisk or period A plus sign puts a plus sign in front of the number if the number is positive and a negative sign if the number is negative You can use only one plus or minus sign or DR CR or DB or one set of parentheses in a numeric data format The position of the plus sign in the number format can also hold a digit if the number is positive A dash puts a minus sign in front of the number if the number is negative and puts a blank in front of the number if the number is positive A comma displays as a comma unless it is preceded by a gt sign or a Z If the comma is preceded by gt and the gt is replaced with a leading zero the comma is replaced with a n
335. ys different information in each module The Query module does not have a layout window Instead it has a form window that displays record information e Reports Layout Window Displays headers footers labels and formats for the current report in a way that resembles the final report layout For example you can see the width of the report and how the columns line up under the labels Sometimes it displays markers that indicate the types of fields or features in the report For example a d marker below a field indicates that it is a date field For more information about markers see the Report Markers section of Chapter 5 Reports Module e Labels Layout Window Displays the current print settings and label layout This window also contains a diagram that resembles a mailing label form By adjusting the settings you can easily adjust the printer settings such as the number of characters to indent the number of lines to skip the width of each label etc You can also adjust the layout of the fields within the labels General Information e Data Export Window Displays field and export format information For example it shows the fields selected for export the export type ASCIL WordStar WordPerfect Progress etc and field delimiters 2 3 4 Form Window In the Query module the form window displays database record information in forms 2 4 Vertical Menus Horizontal Menus and Selection Lists There are two types
Download Pdf Manuals
Related Search
Related Contents
Kenroy Home 91730CH Installation Guide Netopia S9500 Security Appliance Firewall M20 - M27 Visualizza/apri INSTALLATION INSTRUCTIONS 藍:0570一08。一ー 。。 受付時間=平日9=00~ーフ=00 Ditec OLLY E Automatismo para ferra 取扱説明書 - GROWTAC GROM-IPOD V2 Adapter (GROM-IPD2) Installation SyncStudio User Documentation Copyright © All rights reserved.
Failed to retrieve file