1024
Progress Programming Handbook

proghand.pdf

Embed Size (px)

Citation preview

  • Progress Programming

    Handbook

  • 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, becopied, photocopied, translated, or reduced to any electronic medium or machine-readable form withoutprior consent, in writing, from Progress Software Corporation.

    The information in this manual is subject to change without notice, and Progress Software Corporationassumes 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 SoftwareCorporation 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 bySnowbound 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 with IBM Corp.

    Progress is a registered trademark of Progress Software Corporation and is used by IBM Corporation in themark Progress/400 under license. Progress/400 AND 400 are trademarks of IBM Corporation and are usedby Progress Software Corporation under license.

    Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in theUnited States and other countries.

    Any other trademarks and/or service marks contained herein are the property of their respective owners.

    .

    Product Code: 4533Item Number: 81101;9.1C

    May 2001

  • PrefacPAO

    H

    TSEPO

    1. In1Contents

    e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiiiurpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiiiudience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiiirganization of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii

    Volume 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiiiVolume 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxv

    ow to Use This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxviiWebSpeed Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxvii

    ypographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxviiiyntax Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxixxample Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xliiirogress Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xlvither Useful Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xlvii

    Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xlviiDevelopment Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xlixReporting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . l4GL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . liDatabase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . liDataServers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . liiSQL-89/Open Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . liiSQL-92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . liiiDeployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . liiiWebSpeed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . liv

    Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . lv

    troducing the Progress 4GL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 What Is a 4GL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    1.1.1 A Powerful Application Builder . . . . . . . . . . . . . . . . . . . . . . . . . 121.1.2 More Complex Applications Supported . . . . . . . . . . . . . . . . . . 13

  • Contents

    iv

    1.1.3 Less Development Effort Required . . . . . . . . . . . . . . . . . . . . . . 141.1.4 Less Platform Knowledge Required . . . . . . . . . . . . . . . . . . . . . 16

    1.2 ProgressThe Flexible and Complete 4GL . . . . . . . . . . . . . . . . . . . . . . 161.2.1 Flexibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171.2.2 Consistency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    1

    1

    2. P22

    2

    2

    3. B3

    331.2.3 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1101.2.4 Interoperability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1101.2.5 Connectivity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1111.2.6 Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1111.2.7 Localizability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

    .3 Understanding Progress Syntax and Semantics . . . . . . . . . . . . . . . . . . . 1121.3.1 Elements of Progress Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 1121.3.2 Blocks and Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1151.3.3 Block Context and Resource Scope . . . . . . . . . . . . . . . . . . . . . 1161.3.4 Compile-time Versus Run-time Code . . . . . . . . . . . . . . . . . . . . 119

    .4 Compile-time Versus Run-time Execution . . . . . . . . . . . . . . . . . . . . . . . . 1261.4.1 Compile-time Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1261.4.2 Run-time Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

    rogramming Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1 Procedure- and Event-driven Programming . . . . . . . . . . . . . . . . . . . . . . 22.2 Flow of Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    2.2.1 Program Execution in a Procedure-driven Program . . . . . . . . . 222.2.2 Program Execution in an Event-driven Program . . . . . . . . . . . 25

    .3 Program Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.3.1 Program Structure in a Procedure-driven Program. . . . . . . . . . 282.3.2 Program Structure in an Event-driven Program . . . . . . . . . . . . 29

    .4 When to Use the Procedure-driven and Event-driven Models . . . . . . . . 212

    lock Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.1 Blocks and Their Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    3.1.1 REPEAT, FOR, and DO Blocks . . . . . . . . . . . . . . . . . . . . . . . . 323.1.2 Procedure Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.1.3 Trigger Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.1.4 EDITING Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.1.5 Block Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.1.6 Looping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353.1.7 Record Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363.1.8 Frame Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373.1.9 Record Scoping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3103.1.10 Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3173.1.11 Error Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

    .2 Procedure Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319

    .3 External Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

  • Contents

    3.3.1 Procedure Filenames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3203.3.2 Standard Execution Options . . . . . . . . . . . . . . . . . . . . . . . . . . 3213.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3213.3.4 Procedure Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3233.3.5 Procedure Context and the Procedure Call Stack . . . . . . . . . . 323

    3

    3

    3

    3

    4. N44

    5. C55v

    3.3.6 Shared Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3253.3.7 Procedure Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

    .4 Internal Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3303.4.1 Internal Procedure Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 3303.4.2 Internal Procedure Execution . . . . . . . . . . . . . . . . . . . . . . . . . 3313.4.3 Internal Procedure Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3313.4.4 Standard Execution Options . . . . . . . . . . . . . . . . . . . . . . . . . . 3313.4.5 Internal Procedures and Encapsulation . . . . . . . . . . . . . . . . . . 3323.4.6 Shared and Local Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3333.4.7 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3353.4.8 Internal Procedures and the Call Stack . . . . . . . . . . . . . . . . . . 337

    .5 Persistent and Non-persistent Procedures . . . . . . . . . . . . . . . . . . . . . . 3373.5.1 Advantages of Persistent Procedures . . . . . . . . . . . . . . . . . . . 3383.5.2 Creating Persistent Procedures . . . . . . . . . . . . . . . . . . . . . . . . 3383.5.3 Working with Persistent Procedures . . . . . . . . . . . . . . . . . . . . 3393.5.4 Deleting Persistent Procedures . . . . . . . . . . . . . . . . . . . . . . . . 3413.5.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3423.5.6 Persistent Procedure Context and Shared Objects . . . . . . . . 3443.5.7 Run-time Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3453.5.8 Transaction Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3453.5.9 Condition Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3463.5.10 CURRENTLANGUAGE Changes . . . . . . . . . . . . . . . . . . . . . 346

    .6 User-defined Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3473.6.1 Locally Defined User-defined Functions . . . . . . . . . . . . . . . . . 3483.6.2 Externally Defined User-defined Functions . . . . . . . . . . . . . . . 3513.6.3 Remotely Defined User-defined Functions . . . . . . . . . . . . . . . 352

    .7 Procedure Overriding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3523.7.1 Feature Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3533.7.2 Super Procedure Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . 3553.7.3 Programming Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

    amed Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1 Feature Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Programming Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    ondition Handling and Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1 Progress Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Rules About UNDO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

    5.2.1 Infinite Loop Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

  • Contents

    vi

    5.3 The ERROR Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565.3.1 The ERRORSTATUS System Handle . . . . . . . . . . . . . . . . . . 565.3.2 Default Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575.3.3 Overriding the Default Handling . . . . . . . . . . . . . . . . . . . . . . . . 510

    5.4 The ENDKEY Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513

    5

    5

    5

    555

    6. H6

    6666

    66

    7. A775.4.1 Default Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5145.4.2 Overriding the Default Handling . . . . . . . . . . . . . . . . . . . . . . . . 517

    .5 The STOP Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5185.5.1 Default Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5185.5.2 Overriding the Default Handling . . . . . . . . . . . . . . . . . . . . . . . . 518

    .6 The QUIT Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5195.6.1 Default Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5195.6.2 Overriding the Default Handling . . . . . . . . . . . . . . . . . . . . . . . . 519

    .7 The ENDERROR Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5195.7.1 Distinguishing ERROR and ENDKEY . . . . . . . . . . . . . . . . . . . 5215.7.2 ENABLE/WAITFOR Processing . . . . . . . . . . . . . . . . . . . . . . . 523

    .8 How Progress Handles System and Software Failures . . . . . . . . . . . . . . 524

    .9 Progress Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525

    .10 Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526

    andling User Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.1 The Keyboard and the Mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    6.1.1 Key Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626.1.2 Key Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636.1.3 Key Translation Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    .2 Key Codes and Key Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

    .3 Key Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619

    .4 Changing the Function of a Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625

    .5 Using Mouse Buttons and Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6276.5.1 Portable and Physical Buttons . . . . . . . . . . . . . . . . . . . . . . . . . 6276.5.2 Specifying Mouse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628

    .6 Telling Progress How to Continue Processing . . . . . . . . . . . . . . . . . . . . 629

    .7 Monitoring Keystrokes During Data Entry . . . . . . . . . . . . . . . . . . . . . . . . 6356.7.1 Editing Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6356.7.2 User Interface Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6356.7.3 Using Editing Blocks and User Interface Triggers. . . . . . . . . . . 636

    lternate I/O Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.1 Understanding Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Changing the Output Destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

    7.2.1 Output to Printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737.2.2 Additional Options for Printing on Windows . . . . . . . . . . . . . . . 747.2.3 Output to Files or Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767.2.4 Output to the Clipboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

  • Contents

    7.2.5 Resetting Output to the Terminal . . . . . . . . . . . . . . . . . . . . . . . 767.2.6 Sending Output to Multiple Destinations . . . . . . . . . . . . . . . . . 777.2.7 Stream I/O vs. Screen I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7107.2.8 A Printing Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

    7.3 Changing a Procedures Input Source . . . . . . . . . . . . . . . . . . . . . . . . . . 714

    77777777

    8. T8

    8888888

    888

    9. D9vii

    7.3.1 Input From Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7147.3.2 Input from Devices, Directories, and the Terminal . . . . . . . . . . 7157.3.3 Receiving Input from Multiple Sources. . . . . . . . . . . . . . . . . . . 7167.3.4 Reading Input with Control Characters . . . . . . . . . . . . . . . . . . 718

    .4 Defining Additional Input/Output Streams . . . . . . . . . . . . . . . . . . . . . . . 718

    .5 Sharing Streams Among Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . 722

    .6 Summary of Opening and Closing Streams . . . . . . . . . . . . . . . . . . . . . . 724

    .7 Processes as Input and Output Streams (NT and UNIX only) . . . . . . . . 725

    .8 I/O Redirection for Batch Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725

    .9 Reading the Contents of a Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . 726

    .10 Performing Code-page Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . 728

    .11 Converting Non-standard Input Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 7307.11.1 Using QUOTER to Format Data. . . . . . . . . . . . . . . . . . . . . . . . 7317.11.2 Importing and Exporting Data . . . . . . . . . . . . . . . . . . . . . . . . . 7377.11.3 Using the PUT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7397.11.4 Using the IMPORT Statement . . . . . . . . . . . . . . . . . . . . . . . . . 740

    he Preprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.1 &GLOBAL-DEFINE and &SCOPED-DEFINE Directives . . . . . . . . . . . . 82

    8.1.1 Example Using &GLOBAL-DEFINE. . . . . . . . . . . . . . . . . . . . . 828.1.2 Preprocessor Name Scoping . . . . . . . . . . . . . . . . . . . . . . . . . . 83

    .2 &UNDEFINE Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

    .3 &IF, &THEN, &ELSEIF, &ELSE, and &ENDIF Directives . . . . . . . . . . . 86

    .4 DEFINED( ) Preprocessor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810

    .5 The &MESSAGE Directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810

    .6 Referencing Preprocessor Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811

    .7 Expanding Preprocessor Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811

    .8 Using Built-in Preprocessor Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8148.8.1 Built-in Preprocessor Name References . . . . . . . . . . . . . . . . . 8148.8.2 Quoting Built-in Names and Saving {&SEQUENCE} Values . 816

    .9 Nesting Preprocessor References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817

    .10 Arguments to Include Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818

    .11 Sample Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818

    atabase Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.1 Database Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

    9.1.1 Connection Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929.1.2 The CONNECT Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . 939.1.3 Auto-connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

  • Contents

    viii

    9.1.4 Multi-database Connection Considerations . . . . . . . . . . . . . . . 959.1.5 Run-time Connection Considerations . . . . . . . . . . . . . . . . . . . . 959.1.6 Connection Failures and Disruptions . . . . . . . . . . . . . . . . . . . . 969.1.7 Progress Database Connection Functions . . . . . . . . . . . . . . . . 989.1.8 Conserving Connections vs. Minimizing Overhead. . . . . . . . . . 99

    999

    9999

    9

    9

    9

    9.2 Disconnecting Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910

    .3 Logical Database Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911

    .4 Database Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9129.4.1 Creating Aliases in Applications . . . . . . . . . . . . . . . . . . . . . . . . 9139.4.2 Compiling Procedures with Aliases. . . . . . . . . . . . . . . . . . . . . . 9149.4.3 Using Shared Record Buffers with Aliases . . . . . . . . . . . . . . . 916

    .5 Data-handling Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916

    .6 Adding and Deleting Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919

    .7 Defining a Set of Records to Fetch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919

    .8 Fetching Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9219.8.1 Order of Fetched Records. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9219.8.2 Sample Record Fetches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9229.8.3 ROWID and RECID Data Types . . . . . . . . . . . . . . . . . . . . . . . . 9239.8.4 Results Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9269.8.5 FIND Repositioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 931

    .9 Fetching Field Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9329.9.1 Field List Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9329.9.2 Specifying Field Lists in the 4GL. . . . . . . . . . . . . . . . . . . . . . . . 9339.9.3 Avoiding Implied Field List Entries . . . . . . . . . . . . . . . . . . . . . . 9359.9.4 Updating and Deleting with Field Lists . . . . . . . . . . . . . . . . . . . 9359.9.5 Cursor Repositioning and Field Lists . . . . . . . . . . . . . . . . . . . . 9369.9.6 Field List Handling in Degenerate Cases . . . . . . . . . . . . . . . . . 937

    .10 Joining Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9389.10.1 Specifying Joins in the 4GL. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9409.10.2 Using Inner Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9439.10.3 Using Left Outer Joins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9459.10.4 Implementing Other Outer Joins . . . . . . . . . . . . . . . . . . . . . . . . 9469.10.5 Mixing Inner and Left Outer Joins . . . . . . . . . . . . . . . . . . . . . . 947

    .11 The CONTAINS Operator, Word Indexes, and Word-break Tables . . . . 9479.11.1 Understanding the CONTAINS Operator, Word Indexes, and Word-

    break Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9489.11.2 Creating and Viewing Word Indexes. . . . . . . . . . . . . . . . . . . . . 9489.11.3 Using Word-break Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9499.11.4 Writing Queries Using the CONTAINS Operator . . . . . . . . . . . 9589.11.5 Word Indexing External Documents . . . . . . . . . . . . . . . . . . . . . 9619.11.6 Word Indexing Non-Progress Databases . . . . . . . . . . . . . . . . . 962

    .12 Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9629.12.1 Choosing Between Sequences and Control Tables . . . . . . . . . 9639.12.2 Creating and Maintaining Sequences . . . . . . . . . . . . . . . . . . . . 9679.12.3 Accessing and Incrementing Sequences . . . . . . . . . . . . . . . . . 968

  • Contents

    9.13 Database Trigger Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9729.13.1 Storing Triggers in an Operating System Directory . . . . . . . . . 9729.13.2 Storing Triggers in an R-code Library . . . . . . . . . . . . . . . . . . . 973

    9.14 Using the RAW Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9739.15 Multi-database Programming Techniques . . . . . . . . . . . . . . . . . . . . . . . 975

    9

    10. U11

    1

    1

    1ix

    9.15.1 Referencing Tables and Fields . . . . . . . . . . . . . . . . . . . . . . . . 9759.15.2 Positioning Database References in an Application . . . . . . . . 9779.15.3 Using the LIKE option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978

    .16 Creating Schema Cache Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9789.16.1 Building a Schema Cache File . . . . . . . . . . . . . . . . . . . . . . . . . 9789.16.2 Example Schema Cache File Creation . . . . . . . . . . . . . . . . . . 9809.16.3 Using a Schema Cache File . . . . . . . . . . . . . . . . . . . . . . . . . . 982

    sing the Browse Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1010.1 Understanding Browse Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1020.2 Defining a Query for a Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

    10.2.1 Using Field Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10410.2.2 Planning for the Size of the Data Set . . . . . . . . . . . . . . . . . . . . 104

    0.3 Defining a Browse Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10510.3.1 Defining a Read-only Browse . . . . . . . . . . . . . . . . . . . . . . . . . 10510.3.2 Defining an Updatable Browse . . . . . . . . . . . . . . . . . . . . . . . . 10710.3.3 Defining a Single- or Multiple-select Browse . . . . . . . . . . . . . . 10910.3.4 Using Calculated Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101210.3.5 Sizing a Browse and Browse Columns . . . . . . . . . . . . . . . . . . 101310.3.6 Searching Columns (Windows Only) . . . . . . . . . . . . . . . . . . . . 1015

    0.4 Programming with a Browse Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . 102010.4.1 Browse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102010.4.2 Refreshing Browse Rows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102410.4.3 Repositioning Focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102410.4.4 Updating Browse Rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102510.4.5 Creating Browse Rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102710.4.6 Deleting Browse Rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103010.4.7 Locking Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103110.4.8 Moving Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103210.4.9 Overlaying Widgets on Browse Cells . . . . . . . . . . . . . . . . . . . . 103410.4.10 Using Multiple Browse Widgets for Related Tables . . . . . . . . 103710.4.11 Browse Style Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1038

    0.5 Resizable Browse Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104010.5.1 Resizing the Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104010.5.2 Moving the Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104110.5.3 Resizing the Browse-column . . . . . . . . . . . . . . . . . . . . . . . . . . 104110.5.4 Moving the Browse-column . . . . . . . . . . . . . . . . . . . . . . . . . . . 104210.5.5 Changing the Row Height . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104310.5.6 Additional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1043

  • Contents

    x

    10.5.7 User Manipulation Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104410.5.8 Code Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1045

    10.6 Using Browse Widgets in Character Interfaces . . . . . . . . . . . . . . . . . . . . 104610.6.1 Character Browse Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104710.6.2 Control Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1048

    11. D11

    1

    1

    110.6.3 Functional Differences from the Windows Graphical Browse . 1052

    atabase Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1111.1 Database Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1121.2 Schema and Session Database Triggers . . . . . . . . . . . . . . . . . . . . . . . . 113

    11.2.1 Differences Between Schema and Session Triggers . . . . . . . . 11311.2.2 Trigger Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11411.2.3 Schema Triggers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11411.2.4 CREATE Schema Trigger Example . . . . . . . . . . . . . . . . . . . . . 11711.2.5 DELETE Schema Trigger Example. . . . . . . . . . . . . . . . . . . . . . 11711.2.6 ASSIGN Schema Trigger Example . . . . . . . . . . . . . . . . . . . . . . 11811.2.7 REPLICATIONCREATE Schema Trigger Example . . . . . . . . 11811.2.8 REPLICATIONDELETE Schema Trigger Example . . . . . . . . 11911.2.9 REPLICATIONWRITE Schema Trigger Example . . . . . . . . . . 119

    1.3 Implementing Trigger-based Replication . . . . . . . . . . . . . . . . . . . . . . . . . 111011.3.1 4GL Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111011.3.2 Data Dictionary Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111111.3.3 Trigger-based Replication Procedure . . . . . . . . . . . . . . . . . . . . 1111

    1.4 Detecting and Capturing Data Collision . . . . . . . . . . . . . . . . . . . . . . . . . 111711.4.1 Create a Collision Log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111711.4.2 Analyze the Log Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111811.4.3 Replication Process Configuration . . . . . . . . . . . . . . . . . . . . . . 112011.4.4 Session Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112111.4.5 FIND Session Trigger Example . . . . . . . . . . . . . . . . . . . . . . . . 112411.4.6 WRITE Session Trigger Example . . . . . . . . . . . . . . . . . . . . . . . 1124

    1.5 General Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112511.5.1 Metaschema Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112511.5.2 User-interaction Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112511.5.3 FIND NEXT and FIND PREV . . . . . . . . . . . . . . . . . . . . . . . . . . 112511.5.4 Triggers Execute Other Triggers . . . . . . . . . . . . . . . . . . . . . . . 112611.5.5 Triggers Can Start Transactions . . . . . . . . . . . . . . . . . . . . . . . . 112611.5.6 Default Error Phrase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112611.5.7 RETURN ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112611.5.8 Where Triggers Execute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112611.5.9 Storing Trigger Procedures in Libraries . . . . . . . . . . . . . . . . . . 112711.5.10 ESQL Access to Database Objects . . . . . . . . . . . . . . . . . . . . . 112711.5.11 Disabling Triggers for Dump/Load . . . . . . . . . . . . . . . . . . . . . . 112711.5.12 SQL Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1127

  • Contents

    12. Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12112.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12212.2 Transactions Defined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12212.3 All-or-nothing Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12312.4 Understanding Where Transactions Begin and End . . . . . . . . . . . . . . . 12811

    1111

    11

    1

    13. L11

    11

    111

    14. P1

    11xi

    2.5 How Much to Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12152.6 Controlling Where Transactions Begin and End . . . . . . . . . . . . . . . . . . 1218

    12.6.1 Making Transactions Larger . . . . . . . . . . . . . . . . . . . . . . . . . . 121912.6.2 Making Transactions Smaller. . . . . . . . . . . . . . . . . . . . . . . . . . 1221

    2.7 Transactions and Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12232.8 Transactions and Subprocedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12342.9 Transactions with File Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12362.10 Transactions and Program Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 1236

    12.10.1 Transactions in Multi-database Applications . . . . . . . . . . . . . . 123912.10.2 Transactions in Distributed Applications . . . . . . . . . . . . . . . . . 1240

    2.11 Determining When Transactions Are Active . . . . . . . . . . . . . . . . . . . . . 12402.12 Progress Transaction Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1241

    12.12.1 Transaction Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124112.12.2 Subtransaction Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1241

    2.13 Efficient Transaction Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1242

    ocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1313.1 Applications in a Multi-user Environment . . . . . . . . . . . . . . . . . . . . . . . . 1323.2 Sharing Database Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

    13.2.1 Using Locks to Avoid Record Conflicts . . . . . . . . . . . . . . . . . . 13413.2.2 How Progress Applies Locks . . . . . . . . . . . . . . . . . . . . . . . . . . 136

    3.3 Bypassing Progress Lock Protections . . . . . . . . . . . . . . . . . . . . . . . . . . 1383.4 How Long Does Progress Hold a Lock? . . . . . . . . . . . . . . . . . . . . . . . . 1310

    13.4.1 Locks and Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131113.4.2 Locks and Multiple Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . 1315

    3.5 Resolving Locking Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13163.6 Managing Locks to Improve Concurrency . . . . . . . . . . . . . . . . . . . . . . . 13203.7 Changing the Size of a Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1322

    13.7.1 Making a Transaction Larger . . . . . . . . . . . . . . . . . . . . . . . . . . 132313.7.2 Making a Transaction Smaller . . . . . . . . . . . . . . . . . . . . . . . . . 1324

    roviding Data Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1414.1 Progress User ID and Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

    14.1.1 User ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14214.1.2 Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

    4.2 Validating Progress User IDs and Passwords . . . . . . . . . . . . . . . . . . . . 1434.3 Run-time Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

    14.3.1 Checking for User IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14714.3.2 Defining Activities-based Security Checking . . . . . . . . . . . . . . 1410

  • Contents

    xii

    15. Work Tables and Temporary Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15115.1 Work Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

    15.1.1 Characteristics of Work Tables . . . . . . . . . . . . . . . . . . . . . . . . . 15215.1.2 Producing Categorized Reports . . . . . . . . . . . . . . . . . . . . . . . . 15315.1.3 Using Work Tables to Collect and Manipulate Data . . . . . . . . . 157

    1

    1

    16. W1

    1

    1

    115.1.4 Using Work Tables for Complex Sorting . . . . . . . . . . . . . . . . . . 15915.1.5 Using Work Tables for Cross-tab Reports . . . . . . . . . . . . . . . . 1513

    5.2 Temporary Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151515.2.1 Characteristics of Temporary Tables . . . . . . . . . . . . . . . . . . . . 151515.2.2 Defining a Temporary Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 151615.2.3 Using Database, Temporary, and Work Tables . . . . . . . . . . . . 151615.2.4 Similarities Between Temporary and Work Tables . . . . . . . . . 151915.2.5 Differences Between Temporary and Work Tables . . . . . . . . . 151915.2.6 Defining Indexes for Temporary Tables . . . . . . . . . . . . . . . . . . 152215.2.7 Tailoring Temporary Table Visibility and Life Span . . . . . . . . . 152315.2.8 Temporary Tables As Parameters . . . . . . . . . . . . . . . . . . . . . . 152515.2.9 Temporary Table Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1527

    5.3 Dynamic Temporary Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152915.3.1 Static and Dynamic Temp Tables . . . . . . . . . . . . . . . . . . . . . . . 152915.3.2 Creating a Dynamic Temptable. . . . . . . . . . . . . . . . . . . . . . . . 152915.3.3 Dynamic Buffers for Dynamic Temptables . . . . . . . . . . . . . . . 153315.3.4 Dynamic Temptables as Local and Remote Parameters . . . . 153515.3.5 Error Handling and Messages. . . . . . . . . . . . . . . . . . . . . . . . . . 1537

    idgets and Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1616.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

    16.1.1 Widget Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1636.2 Static Versus Dynamic Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

    16.2.1 Creating Widgets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16616.2.2 Using Widget Handles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16616.2.3 Static Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16716.2.4 Dynamic Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1612

    6.3 Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161516.3.1 Widget Handles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161516.3.2 Procedure Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161616.3.3 Query, Buffer, and Buffer-field Handles . . . . . . . . . . . . . . . . . . 161616.3.4 Server Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161616.3.5 Component Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161616.3.6 Transaction Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161616.3.7 System Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161716.3.8 Handle Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1619

    6.4 Widget Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162016.4.1 Attribute References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162116.4.2 Referencing Attribute Values . . . . . . . . . . . . . . . . . . . . . . . . . . 1621

  • Contents

    16.4.3 Setting Attribute Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162216.4.4 Attributes in Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162216.4.5 Attribute Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1623

    16.5 Widget Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162316.5.1 Method References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1623

    1

    11

    17. R1

    1

    11

    11

    1

    1xiii

    16.5.2 Invoking Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162416.5.3 Methods in Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162416.5.4 Method Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1625

    6.6 Widget Realization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162616.6.1 Becoming Realized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162616.6.2 Becoming Derealized. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1629

    6.7 Resizing Widgets Dynamically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16306.8 User-interface Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1631

    16.8.1 User-interface Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163116.8.2 Trigger Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163416.8.3 Trigger Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163616.8.4 Trigger Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163616.8.5 Reverting Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163916.8.6 Universal Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164016.8.7 Applying Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1642

    epresenting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1717.1 Using the VIEWAS Phrase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

    17.1.1 Multiple Representations for a Single Value . . . . . . . . . . . . . . 17217.1.2 A Values Default Representation . . . . . . . . . . . . . . . . . . . . . . 172

    7.2 Fill-ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17317.2.1 Format and Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17317.2.2 Fill-in Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17517.2.3 Fill-in Fonts on Windows in Graphical Interfaces . . . . . . . . . . . 176

    7.3 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1767.4 Sliders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

    17.4.1 Manipulating a Slider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171017.4.2 Range and Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171017.4.3 Example Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1712

    7.5 Toggle Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17147.6 Radio Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1719

    17.6.1 Defining a Radio Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172017.6.2 Example Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1721

    7.7 Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172417.7.1 Defining an Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172417.7.2 Using an Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172617.7.3 Attributes and Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172717.7.4 Adding Functionality to an Editor . . . . . . . . . . . . . . . . . . . . . . . 1728

    7.8 Selection Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1730

  • Contents

    xiv

    17.8.1 Defining a Selection List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173117.8.2 Scrolling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173217.8.3 Character Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173217.8.4 Example Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173317.8.5 Attributes and Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1735

    1

    1

    18. B1

    11

    19. F1111

    1

    1

    1117.9 Combo Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173917.9.1 Defining a Combo Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174017.9.2 Working with Combo Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . 174217.9.3 Example Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174317.9.4 Attributes and Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1745

    7.10 Applying Formats When Displaying Widgets . . . . . . . . . . . . . . . . . . . . . 174917.10.1 Using the FORMAT Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174917.10.2 Character Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175117.10.3 Integer and Decimal Formats . . . . . . . . . . . . . . . . . . . . . . . . . . 175317.10.4 Logical Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175717.10.5 Date Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1758

    uttons, Images, and Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1818.1 Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

    18.1.1 Button Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18318.1.2 Default Buttons in Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . 189

    8.2 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1898.3 Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1815

    rames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1919.1 What Is a Frame? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1939.2 Why Progress Uses Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1949.3 Static and Dynamic Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1949.4 Frame Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

    19.4.1 How Progress Allocates Frames. . . . . . . . . . . . . . . . . . . . . . . . 19519.4.2 Default Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19719.4.3 Specifying Default Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19719.4.4 Controlling Frame Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . 19919.4.5 The Procedure Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191019.4.6 Block A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191019.4.7 Block B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191019.4.8 Block C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1910

    9.5 Types of Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191119.5.1 Example Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1913

    9.6 Frame Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191519.6.1 Example Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1916

    9.7 Triggers and Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19179.8 Frame Flashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19189.9 Frame Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1919

  • Contents

    19.9.1 Defining a Frame Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192219.9.2 Using Frame Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1922

    19.10 Frame Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192619.10.1 Viewing and Hiding Frames . . . . . . . . . . . . . . . . . . . . . . . . . . 192719.10.2 Advancing and Clearing Frames . . . . . . . . . . . . . . . . . . . . . . . 1934

    11

    1

    20. U2

    2

    2

    2

    21. W2xv

    19.10.3 Retaining Data During Retry of a Block . . . . . . . . . . . . . . . . . . 193419.10.4 Creating Field-group Widgets . . . . . . . . . . . . . . . . . . . . . . . . . 1934

    9.11 Using Shared Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19359.12 Field-group Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1939

    19.12.1 Field-group Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194119.12.2 Field-group Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 194219.12.3 Field-group Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194219.12.4 Field-group Position Relative to Frame . . . . . . . . . . . . . . . . . . 194319.12.5 Z order and Field Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194319.12.6 Field-group Visibility and Scrolling . . . . . . . . . . . . . . . . . . . . . . 194419.12.7 Accessing Field Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1946

    9.13 Validation of User Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194919.13.1 Recommended Validation Techniques . . . . . . . . . . . . . . . . . . 194919.13.2 The Rules of Frame-based Validation . . . . . . . . . . . . . . . . . . . 195019.13.3 Forcing Frame-wide Validation . . . . . . . . . . . . . . . . . . . . . . . . 195019.13.4 Disabling Data Dictionary Validation on a Frame or Field . . . . 1954

    sing Dynamic Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2010.1 Managing Dynamic Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

    20.1.1 Static Versus Dynamic Widget Management. . . . . . . . . . . . . . 20220.1.2 Setting Up Dynamic Field-level Widgets . . . . . . . . . . . . . . . . . 20420.1.3 Setting Up Dynamic Frames . . . . . . . . . . . . . . . . . . . . . . . . . . 207

    0.2 Managing Dynamic Widget Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20920.2.1 Named Widget Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201020.2.2 Unnamed Widget Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2014

    0.3 Creating and Using Dynamic Queries . . . . . . . . . . . . . . . . . . . . . . . . . . 201520.3.1 Creating a Query Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201620.3.2 Using a Query Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201720.3.3 The Buffer Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201820.3.4 The Buffer-field Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202020.3.5 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202220.3.6 Dynamic Query Code Example . . . . . . . . . . . . . . . . . . . . . . . . 2023

    0.4 Creating and Using a Dynamic Browse . . . . . . . . . . . . . . . . . . . . . . . . . 202520.4.1 Creating the Dynamic Browse . . . . . . . . . . . . . . . . . . . . . . . . . 202620.4.2 Creating Dynamic Browse Columns . . . . . . . . . . . . . . . . . . . . 202720.4.3 Dynamic Enhancements to the Static Browse . . . . . . . . . . . . . 2030

    indows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2111.1 Multiple-window Pros and Cons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

  • Contents

    xvi

    21.1.1 Windows Versus Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . 21321.1.2 Multiple Windows and Transactions . . . . . . . . . . . . . . . . . . . . . 213

    21.2 Window Attributes and Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21421.3 Window Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21821.4 Creating and Managing Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

    2

    22. M2

    222

    222222

    22

    23. C2

    22

    221.4.1 Creating Window Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2191.5 Window-based Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2114

    21.5.1 Non-persistent Multi-window Management . . . . . . . . . . . . . . . 211521.5.2 Persistent Multi-window Management . . . . . . . . . . . . . . . . . . . 2116

    enus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2212.1 Menu Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

    22.1.1 Menu Bar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22222.1.2 Pop-up Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

    2.2 Menu Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2242.3 Features for Menu Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2252.4 Defining Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

    22.4.1 Static Menu Bars. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22522.4.2 Static Pop-up Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2211

    2.5 Nested Submenus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22122.6 Enabling and Disabling Menu Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22132.7 Menu Toggle Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22152.8 Duplicating Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22162.9 The MENUDROP Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22182.10 Menu Item Accelerators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2218

    22.10.1 Defining Accelerators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221822.10.2 Accelerators in Character Interfaces . . . . . . . . . . . . . . . . . . . . 2220

    2.11 Menu Mnemonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22212.12 Dynamic Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2221

    22.12.1 Properties of Dynamic Menus . . . . . . . . . . . . . . . . . . . . . . . . . . 222222.12.2 Dynamic Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222322.12.3 Querying Sibling Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222622.12.4 Example of a Dynamic Menu . . . . . . . . . . . . . . . . . . . . . . . . . . 222722.12.5 Dynamic Pop-up Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2229

    olors and Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2313.1 Making Colors and Fonts Available to an Application . . . . . . . . . . . . . . . 232

    23.1.1 Progress Default Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23323.1.2 Progress Default Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23423.1.3 Application Colors and Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . 234

    3.2 Assigning Colors and Fonts to a Widget . . . . . . . . . . . . . . . . . . . . . . . . . 2343.3 Assigning Colors and Fonts to ActiveX Automation Objects and ActiveX Controls

    2373.4 Color and Font Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

  • Contents

    23.5 Color in Character Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23823.5.1 Widget States and Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23823.5.2 Color Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

    23.6 Colors on Windows in Graphical Interfaces . . . . . . . . . . . . . . . . . . . . . . 23923.6.1 Systems with the Palette Manager . . . . . . . . . . . . . . . . . . . . . 239

    22

    2

    2

    2

    2

    24. D222

    22222

    2xvii

    23.6.2 Systems without the Palette Manager . . . . . . . . . . . . . . . . . . . 23103.7 Managing Colors and Fonts in Graphical Applications . . . . . . . . . . . . . 23103.8 Allowing the User to Change Colors and Fonts . . . . . . . . . . . . . . . . . . . 2311

    23.8.1 Establishing Dynamic Colors . . . . . . . . . . . . . . . . . . . . . . . . . . 231123.8.2 Color Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231223.8.3 Color Dialog Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231323.8.4 Saving a Modified Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231523.8.5 Font Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231523.8.6 Font Dialog Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231623.8.7 Saving a Modified Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2318

    3.9 Accessing the Current Color and Font Tables . . . . . . . . . . . . . . . . . . . . 231823.9.1 COLORTABLE Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231823.9.2 FONTTABLE Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2320

    3.10 Retrieving and Changing Color and Font Definitions . . . . . . . . . . . . . . . 232123.10.1 Changing Resource Definitions . . . . . . . . . . . . . . . . . . . . . . . . 232123.10.2 Using GETKEYVALUE and PUTKEYVALUE . . . . . . . . . 2321

    3.11 Managing Application Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . 232323.11.1 Understanding Environment Management. . . . . . . . . . . . . . . . 232323.11.2 Using Environment Management Statements . . . . . . . . . . . . . 232323.11.3 Managing Multiple Environments . . . . . . . . . . . . . . . . . . . . . . . 2324

    3.12 Managing Color Display Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2326

    irect Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2414.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2424.2 Mouse Buttons on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2454.3 Selecting Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

    24.3.1 Selecting by Pointing and Clicking. . . . . . . . . . . . . . . . . . . . . . 24624.3.2 Box Selecting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24724.3.3 Sets of Selected Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

    4.4 Moving and Resizing Field-level Widgets . . . . . . . . . . . . . . . . . . . . . . . 2484.5 Moving and Resizing Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24104.6 Custom Highlights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24104.7 Interaction Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24114.8 Direct-manipulation Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2411

    24.8.1 General Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241124.8.2 Order of Direct-manipulation Events . . . . . . . . . . . . . . . . . . . . 2415

    4.9 Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2417

  • Contents

    xviii

    25. Interface Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25125.1 Progress Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

    25.1.1 Character-based Environment . . . . . . . . . . . . . . . . . . . . . . . . . 25225.1.2 Graphical Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25425.1.3 Alert Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

    2

    2

    2

    22

    2

    A. RA

    AAA5.2 Frame Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25725.2.1 Using Frame Phrase Options . . . . . . . . . . . . . . . . . . . . . . . . . . 25725.2.2 Setting Frame Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25925.2.3 Rules for Frame Phrases and Attributes . . . . . . . . . . . . . . . . . . 2511

    5.3 Frame Design Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251125.3.1 Frame-level Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251125.3.2 Field- and Variable-level Design . . . . . . . . . . . . . . . . . . . . . . . 251325.3.3 FORM and DEFINE FRAME Statements . . . . . . . . . . . . . . . . . 251325.3.4 FRAMEROW and FRAMECOL Options . . . . . . . . . . . . . . . . 252025.3.5 Positioning Frames with FRAMELINE . . . . . . . . . . . . . . . . . . 252425.3.6 Positioning Frames with FRAMEDOWN . . . . . . . . . . . . . . . . . 252525.3.7 Scrolling Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252725.3.8 Scrollable Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253225.3.9 Strip Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253425.3.10 Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253825.3.11 Frames for Nonterminal Devices . . . . . . . . . . . . . . . . . . . . . . . 254125.3.12 Multiple Active Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2541

    5.4 Tab Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254325.4.1 Tab Order for a Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254325.4.2 Tab Order for a Frame Family. . . . . . . . . . . . . . . . . . . . . . . . . . 254425.4.3 Tabbing and DATAENTRYRETURN . . . . . . . . . . . . . . . . . . 2548

    5.5 Active Window Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25495.6 Three-dimensional Effects (Windows only; Graphical interfaces only) . . 2549

    25.6.1 THREED, Rectangles, and Images. . . . . . . . . . . . . . . . . . . . . 255125.6.2 THREED and Window Widgets . . . . . . . . . . . . . . . . . . . . . . . 255225.6.3 2D and 3D Widget Size Compatibility . . . . . . . . . . . . . . . . . . . . 2552

    5.7 Windows Interface Design Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255225.7.1 Incorporating Tooltip Details . . . . . . . . . . . . . . . . . . . . . . . . . . . 255225.7.2 Accessing the Windows Help Engine . . . . . . . . . . . . . . . . . . . . 255325.7.3 Displaying the Small Icon Size . . . . . . . . . . . . . . . . . . . . . . . . . 2553

    -code Features and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A1.1 R-code Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A2

    A.1.1 Factors that Affect R-code Size . . . . . . . . . . . . . . . . . . . . . . . . A3A.1.2 R-code File Segment Layout . . . . . . . . . . . . . . . . . . . . . . . . . . A4

    .2 R-code Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A5

    .3 R-code Libraries and PROPATH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A6

    .4 R-code Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A7A.4.1 Standard R-code Execution Environment . . . . . . . . . . . . . . . . A7

  • Contents

    A.4.2 Memory-mapped R-code Execution Environment . . . . . . . . . A11A.4.3 R-code Directory Management . . . . . . . . . . . . . . . . . . . . . . . . A13A.4.4 R-code Execution Environment Statistics . . . . . . . . . . . . . . . . A14

    A.5 R-code Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A17A.6 Code Page Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A18A

    A

    Index xix

    .7 Database CRCs and Time Stamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . A18A.7.1 Time Stamp Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A19A.7.2 CRC Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A19A.7.3 CRC Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A20A.7.4 CRC Versus Time Stamp Validation . . . . . . . . . . . . . . . . . . . . A21

    .8 R-code CRCs and Procedure Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . A24A.8.1 Assigning CRCs to Schema Triggers . . . . . . . . . . . . . . . . . . . A24A.8.2 Validating CRCs for Schema Triggers . . . . . . . . . . . . . . . . . . A25A.8.3 RCODEINFO Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A25

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index1

  • Contents

    xx

    Figures

    Figure 11: Measures of 4GL Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Figure 21: A Procedure-driven Application Calling the Operating System . . . . . . . 23Figure 22: Flow of Execution in a Procedure-driven Program . . . . . . . . . . . . . . . . 24Figure 23: The Operating System Interacting with an Event-driven Application . . 25FigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigure 24: Flow of Control in an Event-driven Program . . . . . . . . . . . . . . . . . . . . . 26 31: Procedure Call Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 32: Object Sharing Among External Procedures . . . . . . . . . . . . . . . . . . . . 326 61: Key Labels, Key Codes, and Key Functions . . . . . . . . . . . . . . . . . . . . . 62 62: Progress Key Translation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 63: Key Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 64: The p-gon1.p Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632 71: The Unnamed Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 72: Redirecting the Unnamed Output Stream . . . . . . . . . . . . . . . . . . . . . . . 73 73: Multiple Output Destinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 74: The OUTPUT CLOSE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 75: Redirecting the Unnamed Input Stream . . . . . . . . . . . . . . . . . . . . . . . . 715 76: Multiple Input Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717 77: Multiple Output Streams Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 78: How QUOTER Prepares a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 79: Extracting QUOTER Input with SUBSTRING . . . . . . . . . . . . . . . . . . . . 735 81: Name Scoping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 91: Data Movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917 92: The Primary Data-handling Statements . . . . . . . . . . . . . . . . . . . . . . . . 918 93: Inner Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939 94: Left Outer Joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 942 95: Inner Join Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 944 96: Left Outer Join Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 946 97: Database Fields and Sequences Comparison . . . . . . . . . . . . . . . . . . . 963 98: Sequences and Overlapping Transactions . . . . . . . . . . . . . . . . . . . . . . 966 99: Positioning Database References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977 101: Resizable Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046 102: Character Browse in Row Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047 103: Character Browse in Edit Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1048 111: Cascading Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1116 112: Example Replication Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1120 121: Transaction Undo Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 122: Transaction Involving Two Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 123: The Transaction Block for the p-txn11.p Procedure . . . . . . . . . . . . . . . 1235 131: Multi-user Update Scenario Without Locks . . . . . . . . . . . . . . . . . . . . . . 132 132: Multi-user Update Scenario with Locks . . . . . . . . . . . . . . . . . . . . . . . . . 134 133: How Progress Applies Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 134: Locks and Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1311 135: Transaction Size and Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1322

  • Contents

    Figure 136: Making Transactions Larger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1323Figure 137: Making Transactions Smaller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1325Figure 141: Sample Activity Permissions Entries . . . . . . . . . . . . . . . . . . . . . . . . . . 1411Figure 142: User with Permission to Run a Procedure . . . . . . . . . . . . . . . . . . . . . . 1412Figure 143: User Without Permission to Run a Procedure . . . . . . . . . . . . . . . . . . . 1413FigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigureFigurexxi

    144: Sample Security Record for Activity Permissions . . . . . . . . . . . . . . . . 1416 145: Summary of Run-time Security Process . . . . . . . . . . . . . . . . . . . . . . . 1418 151: Processing a Table for a Categorized Report . . . . . . . . . . . . . . . . . . . 154 152: Using Work Tables to Produce a Categorized Report . . . . . . . . . . . . . 156 153: Maintaining Work Tables in Sorted Order . . . . . . . . . . . . . . . . . . . . . . 1511 154: Comparing Two Sorting Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1512 161: User-interface Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 162: A Widget Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 191: Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 192: Frame Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 193: Controlling Frame Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 194: Types of Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1911 195: Frame Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1915 196: Frame Family (Windows Graphical Interface) . . . . . . . . . . . . . . . . . . . 1920 197: Frame Family (Character Interface) . . . . . . . . . . . . . . . . . . . . . . . . . . . 1921 198: Frame Family Viewing Demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1933 199: Shared Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1935 1910: Field-Group Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1941 211: Window Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2113 221: Window with a Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 222: Button with a Pop-up Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 223: Menu Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 231: Windows Color Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2312 232: Windows Font Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2315 233: Changing Font 11 to Bold 8-Point Arial . . . . . . . . . . . . . . . . . . . . . . . . 2317 241: Highlight Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 242: Selection Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 243: Drag Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 244: Resize Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 245: Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2417 246: Grid Enlargement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2417 251: Character-based Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 252: Frame Family Tab Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2546 A1: R-code File Segment Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A5 A2: Standard R-code Execution Environment . . . . . . . . . . . . . . . . . . . . . . A8 A3: Memory-mapped R-code Execution Environment . . . . . . . . . . . . . . . . A12 A4: Progress Client Startup Options for yd . . . . . . . . . . . . . . . . . . . . . . . A14 A5: Execution Buffer Map for yd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A15 A6: Accessing the Session Sort File for yd . . . . . . . . . . . . . . . . . . . . . . . A15 A7: Procedure Segment Information for yd (Part 1) . . . . . . . . . . . . . . . . . A16

  • Contents

    xxii

    Figure A8: Procedure Segment Information for yd (Part 2) . . . . . . . . . . . . . . . . . A17

  • Contents

    Tables

    Table 31: Block Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Table 32: Starting Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318Table 33: Search Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353Table 51: Progress Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table Table xxiii

    61: Progress Key Input Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6362: Key Codes and Key Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6663: Alternate Key Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61764: Progress Key Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61965: Actions You Assign to Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62666: Mouse Buttons on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62771: Printing Options for Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71272: Using Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72473: Quoter Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73281: Preprocessor Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8782: Preprocessor Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8783: Functions Allowed in Preprocessor Expressions . . . . . . . . . . . . . . . . . 8984: Built-in Preprocessor Name References . . . . . . . . . . . . . . . . . . . . . . . 81491: Connection Failure Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9692: Progress Database Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9893: Record Fetching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92194: Results Lists for Specific Query Types . . . . . . . . . . . . . . . . . . . . . . . . 92795: Is the Dot a Word Delimiter? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95096: Word Delimiter Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95097: Comparison of Sequences and Control Tables . . . . . . . . . . . . . . . . . . 96598: Sequence Statements and Functions . . . . . . . . . . . . . . . . . . . . . . . . . 968101: Browse and Query Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1011102: Row Mode Control Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049103: Edit Mode Control Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1050111: Replication 4GL Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1110112: Replication Changes Log Table Schema . . . . . . . . . . . . . . . . . . . . . . . 1112113: Collision Log Table Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1118121: Starting Transactions and Subtransactions . . . . . . . . . . . . . . . . . . . . . 1217131: When Progress Releases Record Locks . . . . . . . . . . . . . . . . . . . . . . . 1313141: Values to Use for ID Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149151: Database, Temporary, and Work Tables . . . . . . . . . . . . . . . . . . . . . . . 1517152: Temporary Table Options, Visibility, and Life Span . . . . . . . . . . . . . . . 1524153: Identifying Sender and Receiver Parameters . . . . . . . . . . . . . . . . . . . 1526161: System Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1617162: Realizing Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1626163: Derealizing Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1629164: Mouse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1632165: Other Progress Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1633166: Trigger Scopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1636

  • Contents

    xxiv

    Table 171: Default Display Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1751Table 172: Character Display Format Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 1751Table 173: Numeric Display Format Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1755Table 174: Logical Display Format Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1757Table 175: Date Display Format Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1758Table Table Table Table Table Table Table Table Table Table Table 181: Using NOFILL and Color with Rectangles . . . . . . . . . . . . . . . . . . . . . 1815191: Determining Frame Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1912201: Static Versus Dynamic Widget Management . . . . . . . . . . . . . . . . . . . . 202231: Progress Default Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233232: Colors Used in Character Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . 238241: Direct-manipulation Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242242: Direct-manipulation Mouse Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245251: Maximized Window Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255252: Frame Border Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256A1: R-code Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A2A2: Metaschema Fields in CRC Calculation . . . . . . . . . . . . . . . . . . . . . . . . A20

  • Contents

    Examples

    p-hello1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113p-hello2.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113p-blocks.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114p-block1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115p-clockp-ctrt0p-ctrt1p-ctrt2p-procp-evenp-bkchp-bkchp-bkchp-bkchp-bkchp-bkchp-bkchp-borfrp-strscp-stscpp-wkscp-wkscp-wkscp-wkspp-wkstp-frref1p-frref2p-bkchp-exprp-exprp-sharp-sharp-sharp-intprp-inprcp-exprp-persp-persp-udf1p-udf2p-udfdp-udf3p-pomxxv

    1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125d.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28td.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210p.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35p2.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35p3.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36p4.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36p5.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36p6.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37p7.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38m.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39p.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3112.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311p.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312p1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312p2.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313c3.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313r.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315pa.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317c1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322c2.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .