ALL-IN-1 Application Programming: Guide

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      Before You Start

  1.1     Using This Book

  1.2     Planning Your Customization

  1.3     Controlling Access to Forms

  1.4     Developing a Translatable Application
    1.4.1      Editing the Message and Symbol Files

  2      Developing Your Application

  2.1     Creating and Modifying Elements

  2.2     Testing Elements
    2.2.1      Testing Element Speed

  2.3     Making Elements Available to Users

  2.4     Where to Store the Elements of Your Application

  2.5     Defining Keys

  2.6     Testing the Completion Status of a Function

  3      Displaying Messages

  3.1     Displaying Informational Messages
    3.1.1      Forcing ALL-IN-1 to Display the Primary Message

  3.2     Displaying Prompts
    3.2.1      Using the PROMPT Function
      3.2.1.1      Testing the User's Response to a Prompt
    3.2.2      Using the .PROMPT Script Directive
    3.2.3      Using an Overlay Menu to Display a Prompt

  3.3     Suppressing Messages
    3.3.1      Deleting the Contents of the Message Buffer
    3.3.2      Preventing ALL-IN-1 Writing Messages to the Message Buffer

  3.4     Displaying Messages in a Translatable Application

  4      Accessing Data Sets

  4.1     How ALL-IN-1 Accesses Data Held as Records

  4.2     Accessing Records
    4.2.1      Accessing by Primary Key
    4.2.2      Accessing by Alternate Keys

  4.3     Accessing Fields Using a DSR

  4.4     Accessing Fields Using a Record Selection Expression (RSE)
    4.4.1      Using the Relational Operators
    4.4.2      Comparing Fields
    4.4.3      Using Special Field Names

  4.5     Writing an RSE
    4.5.1      Optimizing the Performance of an RSE

  4.6     Phantom Data Sets

  4.7     Caching Data Sets

  4.8     Text DSABs

  5      Creating and Editing Forms

  5.1     Creating Fields on a Form
    5.1.1      Controlling Access to Fields

  5.2     Writing Named Data
    5.2.1      Creating Loops in Named Data

  5.3     Where to Store Your Forms
    5.3.1      Opening and Closing Form Libraries

  5.4     Editing a Form from MEMRES

  5.5     Testing how the User Leaves a Field
    5.5.1      Testing the Value of the Terminator Key

  5.6     Providing Support for Hard Copy Mode

  6      Displaying Forms

  6.1     Form Context

  6.2     Calling a Form
    6.2.1      Controlling Which Fields Participate on a Form

  6.3     Controlling Which Form is Current

  6.4     Defining the Form Type When You Call a Form

  6.5     Resetting the Form Qualifiers When You Call a Form

  6.6     Displaying a Form that does not Contain an Enterable Field

  6.7     Refreshing the Screen

  7      Menus

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

  7.2     Testing What the User Enters in the Choice Field

  7.3     The Menu Stack
    7.3.1      Controlling the Menu Stack

  7.4     The Current Item Block

  7.5     Linking Menus

  7.6     Invoking a Menu Option From Within Named Data

  7.7     Limiting the User to One Selection

  8      Entry Forms

  8.1     Specifying the RMS Data File
    8.1.1      Creating a File With Alternate or Segmented Keys
    8.1.2      Example of Using a Segmented Key
    8.1.3      Accessing a Sequential File

  8.2     Accessing one Data File from Several Entry Forms

  8.3     Accessing Several Data Files from One Entry Form

  8.4     Specifying the Key Field

  8.5     Loading a Value into the Key Field

  8.6     Defining the Access Mode

  8.7     Determining the Access Mode

  8.8     Selecting the Mode Based on User Input

  8.9     Restricting Modes of Access

  8.10    Creating an Entry Form With Many Fields

  8.11    Restricting the User to a Single Transaction

  8.12    Calling Another Form Type as an Entry Form

  8.13    Copying Records Between Data Files

  9      Argument Forms

  9.1     Saving User Input in Symbols

  9.2     Creating Argument Forms as Overlays
    9.2.1      Calling an Argument Form as an Overlay to a Menu
    9.2.2      Calling an Argument Form as an Overlay to a Non-Menu Form

  10     Index Forms

  10.1    Building the Data Set
    10.1.1     Implementing the Recall Index Option
    10.1.2     Implementing the Index Option
      10.1.2.1     The Argument Form
      10.1.2.2     Displaying the new Data Set

  10.2    Processing Records
    10.2.1     Testing Whether the User has Selected any Records
    10.2.2     Processing the Current Record
    10.2.3     Processing Selected Records

  10.3    Providing Options on the Index Form

  10.4    Fixed-display Index Forms

  10.5    Deselecting Records
    10.5.1     Deleting Records from the CAB$ Data Set
    10.5.2     Updating the Current Item Block

  10.6    Implementing GOLD VIEW

  10.7    Making Menu Options Available

  10.8    Defining Keys on an Index Form

  11     Select and Search Forms

  11.1    The Select Form
    11.1.1     The FOR Function on a Select Form
    11.1.2     Controlling how the Select Form Displays the Record Collection
    11.1.3     Creating a Selection List

  11.2    The Search Form
    11.2.1     Searching a Data Set with a Search Form
    11.2.2     Formatting the Record Collection
    11.2.3     Example of Using a Search Form
    11.2.4     Searching a Text File for a Text String

  12     Creating Scrolled Regions

  12.1    Defining a Scrolled Region

  12.2    Defining a Scrolled Region within Named Data
    12.2.1     Scroll Keys
    12.2.2     The Current Field

  12.3    The Current Record

  12.4    Scrolling Two Data Sets on One Form

  12.5    Display-Only Scrolled Regions
    12.5.1     Indicating the Current Record
    12.5.2     Indicating Records that have been Selected

  12.6    Enterable Scrolled Regions
    12.6.1     /SCROLL with Indexed Files

  13     Validation and Recognition

  13.1    Validating User Input
    13.1.1     Validating Against an Alternate Key of a Data Set

  13.2    Letting Users Leave a Validated Field Blank

  13.3    Validating Against a Record Selection Expression (RSE)
    13.3.1     Validating Against a Segmented Key of a Data Set

  13.4    Validating Against a List of Values

  13.5    Saving Field Values in Symbols

  13.6    Validating Input to Fields Whose Contents Depend on Each Other

  13.7    Providing Recognition on a Field
    13.7.1     Recognition on the Key Field of an Entry Form
    13.7.2     Recognition on a Field Containing a Validation Qualifier

  13.8    Using the Recognition Qualifiers

  13.9    Providing Automatic Recognition on a Field

  13.10  Controlling the Output of Recognition
    13.10.1    Controlling Which Fields are Displayed
    13.10.2    Specifying the Form Displayed by Recognition

  14     Scripts

  14.1    Calling a Script

  14.2    DO Scripts

  14.3    Writing Scripts
    14.3.1     Exiting from Scripts
    14.3.2     Creating Loops in Scripts
    14.3.3     Testing Symbol Values in Scripts
    14.3.4     Performing Validation in a Script

  14.4    Example DO Script

  14.5    SCRIPT Scripts
    14.5.1     The SCRIPT Script Stack

  14.6    Example of Handling SCRIPT Scripts and DO Scripts

  14.7    The Pseudo-Input Buffer
    14.7.1     Supplying Input to FMS

  14.8    Using Script Directives as Functions

  15     Accessing VMS

  15.1    Using DCL Interactively

  15.2    Accessing Main Process Logicals and Symbols

  15.3    Using Subprocesses Within an Application

  15.4    Creating the ALL-IN-1 Subprocess

  15.5    Running Command Procedures

  15.6    Executing Single DCL Commands

  15.7    Communicating with the ALL-IN-1 Subprocess
    15.7.1     Reading DCLMAILBOX
    15.7.2     Writing Long Function Calls Through OAMAILBOX
    15.7.3     Writing Quotes Through OAMAILBOX
    15.7.4     Passing DCL Symbol Values Through OAMAILBOX
    15.7.5     Making the Interrupt Menu Available
    15.7.6     Making the Scratch Pad Available

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

  15.9    Logicals in the ALL-IN-1 Subprocess

  15.10  Obtaining User Input in a Program or Command Procedure

  15.11  Using a Spawned Process
    15.11.1    Setting Up Mailboxes from the ALL-IN-1 Subprocess to a Spawned Subprocess

  16     The File Cabinet

  16.1    What is the File Cabinet?

  16.2    The Current Document

  16.3    Accessing the Attributes of a Document
    16.3.1     Obtaining the Attributes of a Set of Documents
    16.3.2     Validating the Contents of a Field Against the File Cabinet

  16.4    Accessing Repeating Attributes of a Document
    16.4.1     Obtaining all the Attributes of the Current Document

  16.5    Accessing the Attributes of Attachments to a Document

  16.6    Changing the Attributes of a Document

  16.7    Maintaining Documents in the File Cabinet
    16.7.1     Maintaining the Current Document
    16.7.2     Deleting Documents

  17     Electronic Messaging

  17.1    Accessing Mail Messages

  17.2    Distribution Lists
    17.2.1     Disabling SUBSCRIBERS:

  17.3    Customizing the Message Header

  17.4    Customizing the Show Message and Read Receipt Displays

  17.5    Creating and Sending Messages

  17.6    Validating Addressees

  17.7    Sending Mail to a Destination Outside ALL-IN-1
    17.7.1     Writing a .COM file
    17.7.2     Writing a .CMU file

  18     External Communications

  18.1    Customizing the Communications Subsystem
    18.1.1     Example

  18.2    CXP Symbols

  18.3    Control Documents
    18.3.1     Control Document Commands

  18.4    Writing Control Documents

  18.5    Wake-up Commands

  18.6    Example Control Documents
    18.6.1     Control Document that Requires no User Input
    18.6.2     Control Document that Requires User Input
    18.6.3     Control Document that Drives a Hayes Modem

  18.7    Example Application
    18.7.1     Script CONNECT.SCP
    18.7.2     Control Document to Connect to the Local Service
    18.7.3     Control Document CONNECT.CXP

  19     Time Management

  19.1    Maintaining Tasks

  19.2    Maintaining Events
    19.2.1     Setting up Symbol Values for CALENDAR Subfunctions
    19.2.2     Obtaining Information About Events
    19.2.3     Validating Information About Events

  19.3    Scrolling Time Management Information

  19.4    Validating Date Symbols
    19.4.1     Date Validation Example

  19.5    Example Conference Room Scheduler
    19.5.1     The Design
    19.5.2     The Create Option
      19.5.2.1     RESOURCE_CHECK.SCP
    19.5.3     Other Suggestions

  20     Modifying ALL-IN-1 Help

  20.1    The ALL-IN-1 Help Libraries

  20.2    Updating an Existing Help Module

  20.3    Creating a Help Module
    20.3.1     Giving a Level Number
    20.3.2     Giving a Keyword
    20.3.3     DIGITAL Standard Runoff Commands
    20.3.4     Giving a Title
    20.3.5     Giving Cross References

  20.4    Adding a New Help Module

  20.5    How to Make Global Changes to Your Help

  20.6    How to List All Help Modules

  20.7    How to Delete a Help Module

  20.8    Using a New Help Library

  20.9    Calling Help

  21     Training Lessons

  21.1    Writing and Modifying Training Lessons
    21.1.1     Testing a Training Lesson

  21.2    Example Training Script
    21.2.1     Setting up Symbols
    21.2.2     Calling a Form From Within a Lesson
    21.2.3     Displaying the Text of the Training Lesson
    21.2.4     Returning Control to ALL-IN-1
    21.2.5     Checking User Input
    21.2.6     Deleting a Box
    21.2.7     Reusing a Box

  22     Problem Solving

  22.1    Debugging

  22.2    Tracing
    22.2.1     Tracing in Scripts

  22.3    Debugging Commands in the Subprocess
    22.3.1     Using DCL VERIFY Mode Interactively
    22.3.2     Using DCL VERIFY mode from a Command Procedure

  22.4    Testing Forms

  22.5    Recovering
    22.5.1     Removing an Element from the Live Area
    22.5.2     Copying a Live Element to Overwrite Edits

  22.6    Debugging Displayed Messages

  22.7    Debugging Forms

  22.8    Debugging Select Forms

  22.9    Debugging Validation Expressions

  22.10  Debugging Scripts

  22.11  Debugging Templates

  22.12  Miscellaneous

  23     Structured Access to Data Sets

  23.1    How ALL-IN-1 Uses DSABs

  23.2    Structured Access to Data Files

  23.3    Structured Access to Text Files

  24     Integrating an External Application

  24.1    Writing an Action Routine

  24.2    Making an Action Routine Available to ALL-IN-1

  24.3    Making an Action Routine Available to a User

  24.4    Calling an Action Routine

  24.5    Debugging an Action Routine

  24.6    BLISS-32 Example

  24.7    BASIC Example

  24.8    COBOL Example

  24.9    FORTRAN Example

  A   How ALL-IN-1 Processes Forms

  A.1     Completing a Form

  A.2     Leaving a Field

  EXAMPLES

  23-1       Example Script Which Moves Text Between Text Files

  23-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

  FIGURES

  2-1        The Areas Accessed by Customization Management

  6-1        Example of Form and Field Processing

  7-1        Menu Stacking

  7-2        Creating a New Menu Stack

  15-1       OAMAILBOX and DCLMAILBOX

  23-1       Accessing a File Using a DSAB

  23-2       DATA_FILE Subfunctions

  23-3       TEXT_FILE Subfunctions

  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

  4-1        Relational Operators

  4-2        Special Field Names

  4-3        Recognized Text Data Sets

  5-1        Internal Terminator Functions

  5-2        OA$FIELD_TERM_NAME Values

  10-1       Sample Fields From a GOLD VIEW Form

  15-1       ALL-IN-1 Subprocess Logicals

  17-1       Folder Names

  17-2       Symbols Available to the .COM File

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

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

  18-3       Other Communication Control Symbols

  18-4       Control Document Symbols

  18-5       Control Document that Requires no User Input

  18-6       Control Document that Requires User Input

  18-7       Control Document that Drives a Hayes Modem

  18-8       Control Document CONNECT.CXP

  19-1       Symbols set up by SCHED_ARG