ALL-IN-1 Application Programming: Guide

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      Before You Start

  1.1     Customizing ALL-IN-1
    1.1.1      Planning Your Customization
    1.1.2      Developing a Translatable Application
    1.1.3      Writing an ALL-IN-1 Application

  2      Displaying Messages

  2.1     Displaying Informational Messages
    2.1.1      Forcing ALL-IN-1 to Display the Primary Message

  2.2     Displaying Prompts
    2.2.1      Using the PROMPT Function
      2.2.1.1      Testing the User's Response to a Prompt
    2.2.2      Using the .PROMPT Script Directive
    2.2.3      Using an Overlay Menu to Display a Prompt

  2.3     Suppressing Messages
    2.3.1      Deleting the Contents of the Message Buffer
    2.3.2      Preventing ALL-IN-1 Writing Messages to the Message Buffer

  2.4     Displaying Messages in a Translatable Application
    2.4.1      Format of Message Symbols

  3      Accessing Data Sets

  3.1     How ALL-IN-1 Accesses Data Held as Records
    3.1.1      Phantom Data Sets

  3.2     Accessing Records
    3.2.1      Accessing by Primary Key
    3.2.2      Accessing by Alternate Keys
    3.2.3      Using a Collating Sequence

  3.3     Accessing Fields Using a DSR

  3.4     Accessing Fields Using a Record Selection Expression (RSE)
    3.4.1      Using the Relational Operators
    3.4.2      Comparing Fields

  3.5     Using Special Field Names

  3.6     Writing an RSE
    3.6.1      Using an RSE to Create a Phantom Data Set

  3.7     Accessing Data Using the DATA_FILE Subfunctions
    3.7.1      Accessing Fields From a Data Set Using DATA_FILE Subfunctions

  3.8     Caching Data Sets

  3.9     Writing Records to a Data Set
    3.9.1      Using the WRITE function
      3.9.1.1      Writing to Data Sets with Segmented Keys
      3.9.1.2      Deleting Records that Depend on Other Data Sets
      3.9.1.3      Copying Data Sets
      3.9.1.4      Writing Data Through a Phantom Data Set
    3.9.2      Using DATA_FILE Subfunctions

  4      Creating and Editing Forms

  4.1     Creating Fields on a Form
    4.1.1      Controlling Access to Fields

  4.2     Writing Named Data
    4.2.1      Creating Loops in Named Data

  4.3     Where to Store Your Forms
    4.3.1      Opening and Closing Form Libraries

  4.4     Editing a Form from MEMRES

  4.5     Testing how the User Leaves a Field
    4.5.1      Testing the Value of the Terminator Key

  4.6     Defining Keys in Applications

  4.7     Providing Support for Hard Copy Mode

  5      Displaying Forms

  5.1     How ALL-IN-1 Displays Forms

  5.2     Form Context

  5.3     Calling a Form
    5.3.1      Controlling Which Fields are Active on a Form

  5.4     Controlling Which Form is Current

  5.5     Defining the Form Type When You Call a Form

  5.6     Resetting the Form Qualifiers When You Call a Form

  5.7     Displaying a Form that does not Contain an Enterable Field

  5.8     Refreshing the Screen

  5.9     Controlling Access to Forms

  6      Menus

  6.1     Creating Menus

  6.2     How ALL-IN-1 Processes an Entry in the Choice Field
    6.2.1      Limiting the Options Available from a Menu

  6.3     Testing What the User Enters in the Choice Field

  6.4     The Menu Stack
    6.4.1      Controlling the Menu Stack

  6.5     The Current Item Block

  6.6     Linking Menus

  6.7     Invoking a Menu Option From Within Named Data

  6.8     Limiting the User to One Selection

  7      Entry Forms

  7.1     Creating Entry Forms

  7.2     Specifying the RMS Data File
    7.2.1      Creating a File With Alternate or Segmented Keys
    7.2.2      Example of Using a Segmented Key
    7.2.3      Accessing a Sequential File

  7.3     Accessing one Data File from Several Entry Forms

  7.4     Accessing Several Data Files from One Entry Form

  7.5     Specifying the Key Field

  7.6     Loading a Value into the Key Field

  7.7     Defining the Access Mode

  7.8     Determining the Access Mode

  7.9     Selecting the Mode Based on User Input

  7.10    Restricting Modes of Access

  7.11    Creating an Entry Form With Many Fields

  7.12    Restricting the User to a Single Transaction

  7.13    Calling Another Form Type as an Entry Form

  7.14    Copying Records Between Data Files

  8      Argument Forms

  8.1     Creating Argument Forms

  8.2     Saving User Input in Symbols

  8.3     Creating Argument Forms as Overlays
    8.3.1      Calling an Argument Form as an Overlay to a Menu
    8.3.2      Calling an Argument Form as an Overlay to a Non-Menu Form

  9      Index Forms

  9.1     Creating an Index Form

  9.2     Building the Data Set
    9.2.1      Implementing the Recall Index Option
    9.2.2      Implementing the Index Option
      9.2.2.1      The Argument Form
      9.2.2.2      Displaying the new Data Set

  9.3     Processing Records
    9.3.1      Testing Whether the User has Selected any Records
    9.3.2      Processing the Current Record
    9.3.3      Processing Selected Records

  9.4     Providing Options on the Index Form

  9.5     Fixed-display Index Forms

  9.6     Deselecting Records
    9.6.1      Deleting Records from the CAB$ Data Set
    9.6.2      Updating the Current Item Block

  9.7     Implementing GOLD VIEW

  9.8     Making Menu Options Available

  9.9     Defining Keys on an Index Form

  10     Select and Search Forms

  10.1    Choosing Between Select and Search Forms

  10.2    Creating Select Forms
    10.2.1     The FOR Function on a Select Form
    10.2.2     Controlling how the Select Form Displays the Record Collection
    10.2.3     Creating a Selection List

  10.3    The Search Form
    10.3.1     Searching a Data Set with a Search Form
    10.3.2     Formatting the Record Collection
    10.3.3     Example of Using a Search Form
    10.3.4     Searching a Text File for a Text String

  11     Creating Scrolled Regions

  11.1    Defining a Scrolled Region

  11.2    Defining a Scrolled Region within Named Data
    11.2.1     Scroll Keys
    11.2.2     The Current Field

  11.3    The Current Record

  11.4    Scrolling Two Data Sets on One Form

  11.5    Display-Only Scrolled Regions
    11.5.1     Indicating the Current Record
    11.5.2     Indicating Records that have been Selected

  11.6    Enterable Scrolled Regions
    11.6.1     /SCROLL with Indexed Files

  12     Validation and Recognition

  12.1    Validating User Input
    12.1.1     Validating Against an Alternate Key of a Data Set

  12.2    Letting Users Leave a Validated Field Blank

  12.3    Validating Against a Record Selection Expression (RSE)
    12.3.1     Validating Against a Segmented Key of a Data Set

  12.4    Validating Against a List of Values

  12.5    Saving Field Values in Symbols

  12.6    Validating Input to Fields Whose Contents Depend on Each Other

  12.7    Providing Recognition on a Field
    12.7.1     Recognition on the Key Field of an Entry Form
    12.7.2     Recognition on a Field Containing a Validation Qualifier

  12.8    Using the Recognition Qualifiers

  12.9    Providing Automatic Recognition on a Field

  12.10   Controlling the Output of Recognition
    12.10.1    Controlling Which Fields are Displayed
    12.10.2    Specifying the Form Displayed by Recognition

  13     Scripts

  13.1    Calling a Script

  13.2    DO Scripts

  13.3    Writing Scripts
    13.3.1     Exiting from Scripts
    13.3.2     Creating Loops in Scripts
    13.3.3     Testing Symbol Values in Scripts
    13.3.4     Performing Validation in a Script
    13.3.5     Example Validation DO Script

  13.4    SCRIPT Scripts
    13.4.1     The SCRIPT Script Stack

  13.5    Example of Handling SCRIPT Scripts and DO Scripts

  13.6    The Pseudo-Input Buffer

  13.7    Supplying Input to FMS

  13.8    Using Script Directives as Functions

  13.9    Processing ALL-IN-1 Scripts on a Script Queue
    13.9.1     Submitting Scripts to Script Queues
    13.9.2     Writing Scripts for a Script Queue
    13.9.3     Accessing Information on Scripts Submitted to a Script Queue

  14     Accessing VMS

  14.1    Using DCL Interactively

  14.2    Accessing Main Process Logicals and Symbols

  14.3    Using Subprocesses Within an Application

  14.4    Creating the ALL-IN-1 Subprocess

  14.5    Running Command Procedures

  14.6    Executing Single DCL Commands

  14.7    Communicating with the ALL-IN-1 Subprocess
    14.7.1     Reading DCLMAILBOX
    14.7.2     Writing Long Function Calls Through OAMAILBOX
    14.7.3     Writing Quotes Through OAMAILBOX
    14.7.4     Passing DCL Symbol Values Through OAMAILBOX
    14.7.5     Making the Interrupt Menu Available
    14.7.6     Making the Scratch Pad Available

  14.8    Creating DCL Symbols in the ALL-IN-1 Subprocess

  14.9    Logicals in the ALL-IN-1 Subprocess

  14.10   Obtaining User Input in a Program or Command Procedure

  14.11   Using a Spawned Process
    14.11.1    Setting Up Mailboxes from the ALL-IN-1 Subprocess to a Spawned Subprocess

  15     Accessing Text Data Sets

  15.1    Using Text DSABs

  15.2    Accessing Text Using the TEXT_FILE Subfunctions
    15.2.1     Moving Text Between Text Files
    15.2.2     Maintaining Ruler Setting and Attributes of Text Files

  16     Programming For Performance

  16.1    Designing an Application For Performance
    16.1.1     Real Versus Perceived Performance

  16.2    Using FMS Forms
    16.2.1     Designing FMS Forms

  16.3    Writing Efficient Scripts

  16.4    Using Symbols
    16.4.1     Permanent and Temporary Symbols
    16.4.2     Special Symbols

  16.5    Using the Subprocess

  16.6    Programming for Fast Data Access
    16.6.1     Searching for Records
    16.6.2     Accessing Fields From a Data Set
    16.6.3     Accessing Data for Field Validation

  16.7    Testing Application Performance
    16.7.1     Using Metering

  17     The File Cabinet

  17.1    Overview of the ALL-IN-1 File Cabinet

  17.2    What Is the File Cabinet?
    17.2.1     Drawers
    17.2.2     Folders
    17.2.3     Documents

  17.3    Accessing Information About Drawers
    17.3.1     The Current Drawer
    17.3.2     Accessing the Attributes of a Drawer

  17.4    Maintaining Drawers in the File Cabinet
    17.4.1     Creating Drawers
    17.4.2     Maintaining the Current Drawer
    17.4.3     Deleting Drawers

  17.5    Accessing the Contents of Other Drawers

  17.6    Accessing Information About Documents
    17.6.1     The Current Document
    17.6.2     Accessing the Attributes of a Document
    17.6.3     Obtaining the Attributes of a Set of Documents
    17.6.4     Accessing Repeating Attributes of a Document
    17.6.5     Obtaining all the Attributes of the Current Document
    17.6.6     Accessing the Attributes of Attachments to a Document
    17.6.7     Modifying the Attributes of a Document

  17.7    Maintaining Documents in the File Cabinet
    17.7.1     Creating Documents
    17.7.2     Maintaining the Current Document
    17.7.3     Deleting Documents
    17.7.4     Reserving Documents

  17.8    Controlling Access to Drawers and Documents
    17.8.1     Accessing VMS ACLs
    17.8.2     Using Groups to Access Drawers and Documents

  17.9    Applying Locks to Drawers and Documents
    17.9.1     Applying Locks to Drawers
    17.9.2     Applying Locks to Documents

  18     Electronic Messaging

  18.1    Accessing Mail Messages

  18.2    Distribution Lists

  18.3    Customizing the Message Header

  18.4    Customizing the Show Message and Read Receipt Displays

  18.5    Creating and Sending Messages

  18.6    Validating Addressees

  18.7    Sending Mail to a Destination Outside ALL-IN-1
    18.7.1     Writing a .COM file
    18.7.2     Writing a .CMU file

  19     External Communications

  19.1    Customizing the Communications Subsystem
    19.1.1     Example

  19.2    CXP Symbols

  19.3    Control Documents
    19.3.1     Control Document Commands

  19.4    Writing Control Documents

  19.5    Wake-up Commands

  19.6    Example Control Documents
    19.6.1     Control Document that Requires no User Input
    19.6.2     Control Document that Requires User Input
    19.6.3     Control Document that Drives a Hayes Modem

  19.7    Example Application
    19.7.1     Script CONNECT.SCP
    19.7.2     Control Document to Connect to the Local Service
    19.7.3     Control Document CONNECT.CXP

  20     Time Management

  20.1    Maintaining Tasks

  20.2    Maintaining Events
    20.2.1     Setting up Symbol Values for CALENDAR Subfunctions
    20.2.2     Obtaining Information About Events
    20.2.3     Validating Information About Events

  20.3    Scrolling Time Management Information

  20.4    Validating Date Symbols
    20.4.1     Date Validation Example

  20.5    Example Conference Room Scheduler
    20.5.1     The Design
    20.5.2     The Create Option
      20.5.2.1     RESOURCE_CHECK.SCP
    20.5.3     Other Suggestions

  21     Formatting, Converting, and Printing

  21.1    How Printing Works in ALL-IN-1
    21.1.1     Revisable and Final Form Documents
    21.1.2     Formatting
    21.1.3     Print Destinations
    21.1.4     WPPRINT.SCP

  21.2    Calling WPPRINT.SCP from your Applications

  21.3    Customizing Printing
    21.3.1     Adding a New Type of Print Destination
    21.3.2     Checking the Print Destination
    21.3.3     Providing New Methods of Formatting
    21.3.4     Providing New Methods of Conversion
    21.3.5     Customizing WPS-PLUS Printer Tables

  22     Modifying ALL-IN-1 Help

  22.1    The ALL-IN-1 Help Libraries
    22.1.1     Standard ALL-IN-1 Help Libraries
    22.1.2     Development Area Help Libraries
    22.1.3     Live Area Help Libraries

  22.2    Customizing an Existing ALL-IN-1 Help Module

  22.3    Creating a Help Module
    22.3.1     Giving a Level Number
    22.3.2     Giving a Keyword
    22.3.3     DIGITAL Standard Runoff Commands
    22.3.4     Giving a Title
    22.3.5     Giving Cross-References

  22.4    Calling Help

  23     Training Lessons

  23.1    Writing and Modifying Training Lessons
    23.1.1     Writing Training Lessons in a Translatable Application
    23.1.2     Testing a Training Lesson

  23.2    Example Training Script
    23.2.1     Opening a Training Lesson
    23.2.2     Calling a Form From Within a Lesson
    23.2.3     Displaying the Text of the Training Lesson
    23.2.4     Returning Control to ALL-IN-1
    23.2.5     Checking User Input
    23.2.6     Deleting a Box
    23.2.7     Reusing a Box

  24     Integrating an External Application

  24.1    Using INSTALL and EXECUTE
    24.1.1     Writing an Action Routine
    24.1.2     Making an Action Routine Available to ALL-IN-1
    24.1.3     Making an Action Routine Available to a User
    24.1.4     Calling an Action Routine
    24.1.5     Debugging an Action Routine
    24.1.6     BLISS-32 Example
    24.1.7     BASIC Example
    24.1.8     COBOL Example
    24.1.9     FORTRAN Example

  24.2    Site-Defined Functions

  24.3    Writing a Site-Defined Function
    24.3.1     Designing the Function Syntax
    24.3.2     Designing the Action Routine
    24.3.3     Adding an Entry in the Site-Defined Function Table

  24.4    Creating a New Site-Defined Function Entry

  24.5    Example of a Site-Defined Function

  24.6    Comparing Site-Defined Functions and INSTALL and EXECUTE

  24.7    Using Source Code Tables
    24.7.1     Creating Site Special Symbols

  25     Problem Solving

  25.1    Debugging

  25.2    Tracing
    25.2.1     Checking Which Trace Options Have Been Set
    25.2.2     Viewing Trace Output on the Screen
    25.2.3     Viewing Trace Output in a Log File
    25.2.4     Tracing in Scripts

  25.3    Debugging Commands in the Subprocess
    25.3.1     Using Verify Mode Interactively
    25.3.2     Using Verify Mode from a Command Procedure

  25.4    Testing Forms
    25.4.1     Displaying Uncustomized Forms

  25.5    Testing Symbols

  25.6    Testing Functions

  25.7    Recovering
    25.7.1     Removing an Element from the Live Area
    25.7.2     Copying a Live Element to Overwrite Edits

  25.8    Debugging Displayed Messages

  25.9    Debugging Named Data

  25.10   Debugging Forms

  25.11   Debugging Select Forms

  25.12   Debugging Validation Expressions

  25.13   Debugging Scripts

  25.14   Debugging Templates

  25.15   Miscellaneous

  A   How ALL-IN-1 Processes Forms

  A.1     Completing a Form

  A.2     Leaving a Field

  EXAMPLES

  3-1        Using DATA_FILE Subfunctions to Access Records From a Data Set

  3-2        Using DATA_FILE Subfunctions to Write Records to a Data Set

  15-1       Example Script To Move Text Between Text Files

  15-2       Example Script Demonstrating TEXT_FILE Subfunctions

  24-1       Example BLISS-32 Module Called TEST.BLI

  24-2       Example BASIC Program Called BASIC_EXAMPLE.BAS

  24-3       Example COBOL Program

  24-4       Site-Defined Function Action Routine Example

  FIGURES

  3-1        Accessing a File Using a DSAB

  3-2        Entry Form and Corresponding Data File

  3-3        DATA_FILE Subfunctions

  5-1        Example of Form and Field Processing

  6-1        Menu Stacking

  6-2        Creating a New Menu Stack

  14-1       OAMAILBOX and DCLMAILBOX

  15-1       TEXT_FILE Subfunctions

  17-1       The ALL-IN-1 File Cabinet

  17-2       ALL-IN-1 File Cabinet and its Data Files

  21-1       Document Handling Model

  21-2       Flowchart to show main steps of WPPRINT.SCP

  24-1       Table of Site-Defined Functions Form

  24-2       Table of Site-Defined Functions Form (2)

  A-1        How ALL-IN-1 Processes a Menu

  A-2        How ALL-IN-1 Processes an Argument form

  A-3        How ALL-IN-1 Processes an Entry Form

  A-4        How ALL-IN-1 Processes an Index Form

  TABLES

  2-1        Message Symbol Prefixes and Corresponding Applications

  3-1        Relational Operators

  4-1        Internal Terminator Functions

  4-2        OA$FIELD_TERM_NAME Values

  9-1        Sample Fields From a GOLD VIEW Form

  14-1       ALL-IN-1 Subprocess Logicals

  15-1       Recognized Text Data Sets

  18-1       Folder Names

  18-2       Symbols Available to the .COM File

  19-1       Symbols From the Communication Control Interrupt Menu (form CXP$INT1)

  19-2       Symbols From the Record Session Menu (form CXP$RECORD)

  19-3       Other Communication Control Symbols

  19-4       Control Document Symbols

  19-5       Control Document that Requires no User Input

  19-6       Control Document that Requires User Input

  19-7       Control Document that Drives a Hayes Modem

  19-8       Control Document CONNECT.CXP

  20-1       Symbols set up by SCHED_ARG

  21-1       Input Symbols for WPPRINT.SCP

  21-2       Output Symbol for WPPRINT.SCP

  21-3       Print Completion Scripts Supplied with ALL-IN-1

  21-4       Input Symbols for Print Completion Scripts

  21-5       Input Symbols for Destination Check Scripts

  21-6       Input Symbols for Format Scripts

  21-7       Output Symbols for Format Scripts

  21-8       Input Symbols for Conversion Scripts

  21-9       Output Symbols for Conversion Scripts

  24-1       Fields on Table of Site-Defined Functions

  24-2       Fields on Table of Site-Defined Functions (2)

  24-3       Fields on the Special Symbol Tables

  25-1       Fields on TRACEARG Form