DECforms Guide to Converting VAX TDMS Applications

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  1      Introduction to Converting TDMS Applications

  1.1     What Features Are Available in DECforms?
    1.1.1      Device-Independent Programs
    1.1.2      Field-Level Control of Form Processing
    1.1.3      Ability to Move Between Active Panels During a Single Request
    1.1.4      Sophisticated Screen Control
    1.1.5      Beneficial Help Model
    1.1.6      Program Subroutine Calls in the Form

  1.2     Deciding Whether to Convert, Redesign, or Maintain This Application in TDMS
    1.2.1      Does Your Application Use Asynchronous Calls?
    1.2.2      Do You Map Data Implicitly or Explicitly?
    1.2.3      Does Your Application Map Whole Arrays, Rather Than Subranges?
    1.2.4      Does Your Application Use Conditional Processing or Dependent Ranges?

  1.3     Capabilities of the TDMS Converter
    1.3.1      Converting Only Forms
    1.3.2      Converting Forms and Requests

  1.4     Steps in the Conversion Process

  1.5     Limitations of the TDMS Converter
    1.5.1      The CHECK DIGIT Field Validator
    1.5.2      Default Key Definitions
    1.5.3      The DESCRIPTION Instruction
    1.5.4      Dependent Ranges in CONTROL FIELD IS Instructions
    1.5.5      The LIGHT LIST Instruction
    1.5.6      Operator Input Order Defined in the Order Phase of the TDMS Form Editor
    1.5.7      Scale Factors Other Than the Default
    1.5.8      Values Specified in RING BELL Instructions

  2      DECforms Concepts for TDMS Users

  2.1     The DECforms Application
    2.1.1      What Is in a Form?
      2.1.1.1      Form Data
      2.1.1.2      Form Records
      2.1.1.3      Layouts
      2.1.1.4      Functions
      2.1.1.5      Viewports
      2.1.1.6      Panels
      2.1.1.7      Text Literals
      2.1.1.8      Panel Fields
      2.1.1.9      Responses
    2.1.2      Elements of the Program
      2.1.2.1      FORMS$ENABLE Request Call
      2.1.2.2      FORMS$SEND Request Call
      2.1.2.3      FORMS$RECEIVE Request Call
      2.1.2.4      FORMS$TRANSCEIVE Request Call
      2.1.2.5      FORMS$CANCEL Request Call
      2.1.2.6      FORMS$DISABLE Request Call
      2.1.2.7      Escape Routines

  2.2     Introduction to the Form Manager
    2.2.1      Response to Request Calls
    2.2.2      Control of the Display
    2.2.3      Control of Operator Input
    2.2.4      Data Manipulation

  2.3     Introduction to the IFDL

  3      Using the TDMS Converter

  3.1     Choosing the Right Conversion Option
    3.1.1      Do You Need to Redesign the Application?
    3.1.2      Do Your Requests Use Explicit Data Mappings Between Fields with Different Names?
    3.1.3      Do Your Requests Map Data Between Fields That Have Identical Names?

  3.2     Preparing Your TDMS Application for Conversion
    3.2.1      Updating Your TDMS Forms and Requests
    3.2.2      Modifying the Names of Form Fields, Record Fields, and Record Structures
    3.2.3      Modifying CDD/Plus Record Definitions

  3.3     Invoking the TDMS Converter

  3.4     TDMS Converter Output That Replaces TDMS Forms
    3.4.1      The FORM Statement Created by the TDMS Converter
    3.4.2      The LAYOUT Statement Created by the TDMS Converter
    3.4.3      ENABLE Response Generated by the TDMS Converter
    3.4.4      DISABLE Response Generated by the TDMS Converter
    3.4.5      Viewports and Panels Generated by the TDMS Converter
    3.4.6      Form Data Items and Panel Fields Generated by the Converter
      3.4.6.1      Panel Fields Generated by the TDMS Converter
      3.4.6.2      Form Data Items Generated by the TDMS Converter
      3.4.6.3      Groups Generated by the TDMS Converter
      3.4.6.4      Background Literals Generated by the TDMS Converter

  3.5     TDMS Converter Output That Replaces TDMS Requests
    3.5.1      The CONTROL FIELD IS Instruction
    3.5.2      Data Mapping Instructions
      3.5.2.1      The DECforms Data Transfer Model
      3.5.2.2      The OUTPUT TO Instruction
      3.5.2.3      The INPUT TO Instruction
      3.5.2.4      The RETURN TO Instruction
    3.5.3      The DEFAULT FIELD Instruction
    3.5.4      The DEFINE KEY AS Instruction
    3.5.5      Form Display Instructions
    3.5.6      The %INCLUDE Instruction
    3.5.7      The KEYPAD MODE IS Instruction
    3.5.8      The MESSAGE LINE IS Instruction
    3.5.9      The PROGRAM KEY IS Instruction
    3.5.10     The RECORD IS Instruction
    3.5.11     The RING BELL Instruction
    3.5.12     The SIGNAL MODE IS and SIGNAL OPERATOR Instructions
    3.5.13     Video Attribute Instructions
    3.5.14     The WAIT Instruction

  3.6     Testing the Output from the TDMS Converter

  4      Modifying the Output from the TDMS Converter

  4.1     Merging IFDL Source Files
    4.1.1      Merging FORM Statements
    4.1.2      Merging FORM DATA Statements
    4.1.3      Merging Form Record Declarations
    4.1.4      Merging Record List Declarations
    4.1.5      Merging Layout Declarations
    4.1.6      Merging Responses
    4.1.7      Merging Viewport Statements
    4.1.8      Merging Function Definitions and Function Responses
    4.1.9      Merging Panels

  4.2     Modifying Data Transfer Syntax

  4.3     Removing Duplicate Group Names

  4.4     Checking the Data Type of Form Record Fields

  4.5     Checking the Data Type of Form Data Items

  4.6     Modifying Help Syntax

  4.7     Modifying Rectangles

  4.8     Modifying the Replacement for TDMS SIGNED NUMERIC Form Fields

  4.9     Checking DATE and TIME Data Items and Panel Fields

  4.10    Adding Comments to Your Source File

  5      Modifying Your Application Program

  5.1     Replacing TSS$OPEN and TSS$OPEN_RLB with the FORMS$ENABLE Call
    5.1.1      Using FORMS$ENABLE with a Single Form
    5.1.2      Using FORMS$ENABLE with Multiple Forms

  5.2     Replacing TSS$REQUEST with a DECforms Request Call
    5.2.1      Replacing TSS$REQUEST with the FORMS$SEND Call
    5.2.2      Replacing TSS$REQUEST with the FORMS$RECEIVE Call
    5.2.3      Replacing TSS$REQUEST with the FORMS$TRANSCEIVE Call

  5.3     Replacing TSS$CANCEL with the FORMS$CANCEL Call

  5.4     Replacing TSS$CLOSE and TSS$CLOSE_RLB with the FORMS$DISABLE Call

  5.5     Getting the Effect of TDMS Calls in the Form
    5.5.1      Printing Forms
    5.5.2      Trapping Keys in Your Application Program
    5.5.3      Signaling Extended Status to the Operator
    5.5.4      Enabling and Disabling Tracing
    5.5.5      Reading Input from the Message Panel
    5.5.6      Writing Messages to the Message Panel

  5.6     Running and Debugging the Converted DECforms Application

  6      Converting a TDMS Sample Application

  6.1     Preparing a TDMS Sample for Conversion

  6.2     Invoking the TDMS Converter

  6.3     Merging the IFDL Source Files
    6.3.1      Cleaning Up the PERSONNEL_INITIAL_REQUEST.IFDL Source File
    6.3.2      Merging the PERSONNEL_MENU_REQUEST.IFDL Source File.
    6.3.3      Merging the PRSNLADD_BASIC_REQUEST.IFDL Source File
    6.3.4      Merging the PRSNLADD_FAMILY_REQUEST.IFDL Source File
    6.3.5      Merging the PRSNLADD_EDUCATION_REQUEST.IFDL Source File
    6.3.6      Merging the PRSNLADD_ERROR_REQUEST.IFDL Source File
    6.3.7      Merging the PRSNLDSPL_MENU_REQUEST.IFDL Source File
    6.3.8      Merging the PRSNLDSPL_REQUEST.IFDL Source File
    6.3.9      Merging the PERSNLCHNG_MENU_REQUEST.IFDL Source File
    6.3.10     Merging the PERSNLCHNG_BASIC_REQUEST.IFDL Source File
    6.3.11     Merging the PERSNLCHNG_FAMILY_REQUEST.IFDL Source File
    6.3.12     Merging the PERSNLCHNG_EDUCATION_REQUEST.IFDL Source File
    6.3.13     Merging the PRSNLSTAT_REQUEST.IFDL Source File

  6.4     Converting Help

  6.5     Rewriting the Application Program
    6.5.1      Converting the PERSONNEL Program
    6.5.2      Converting the PERSNLADD Subprogram
    6.5.3      Converting the PRSNLCHNG Subprogram
    6.5.4      Converting the PRSNLDISPL Subprogram
    6.5.5      Converting the PRSNLSTAT Subprogram

  6.6     Running the Converted Application

  7      Creating and Modifying Forms

  7.1     Invoking the FDE and the Panel Editor

  7.2     Using TDMS Form Phase Features in DECforms
    7.2.1      Assigning Background Color
    7.2.2      Assigning Terminal Width
    7.2.3      Associating a Help Panel with Another Panel
    7.2.4      Assigning Default Attributes to All New Fields
    7.2.5      Applying Active Highlight to Fields

  7.3     Using TDMS Layout Phase Features in DECforms
    7.3.1      Creating DECforms Panel Fields and Applying Field Defaults
    7.3.2      Creating DECforms Text Literals
    7.3.3      Drawing Points, Lines, Rectangles, and Polylines
    7.3.4      Applying Display Attributes to Fields and Literals
    7.3.5      Creating Date and Time Fields and Adjacent Fields
    7.3.6      Creating Groups

  7.4     Using TDMS Assign Phase Features in DECforms
    7.4.1      Specifying Help for Fields
    7.4.2      Assigning Field Attributes and Field Validators
    7.4.3      Specifying DECforms Field Picture Characters

  7.5     Using TDMS Order Phase Features in DECforms

  8      Using Advanced DECforms Features

  8.1     Defining Keys
    8.1.1      Binding Functions to Keys
    8.1.2      Writing Function Responses

  8.2     Moving Between Panels

  8.3     Providing Help for Your Operator
    8.3.1      Creating Help Messages
    8.3.2      Creating Help Panels

  8.4     Displaying Arrays
    8.4.1      Storing Array Data in the Form
    8.4.2      Displaying Data Stored in Form Data Groups
    8.4.3      Activating Panel Groups for Input
    8.4.4      Passing Group Data Between the Program and the Form

  8.5     Creating Scrolled Regions
    8.5.1      Displaying Scrolled Data
    8.5.2      Setting Up the Operator's Control of a Scrolled Region

  8.6     Determining What Changed During Operator Input
    8.6.1      Tracking Form Data Items
    8.6.2      Using Shadow Records

  8.7     Using Escape Routines
    8.7.1      Writing a Program That Uses Escape Routines
    8.7.2      Writing Responses That Call Escape Routines
    8.7.3      Linking Applications That Use Escape Routines

  8.8     Validating Data with Check Digit Algorithms in Your Program

  A   Comments Created by the TDMS Converter

  B   TDMS Call Conversion Summary

  EXAMPLES

  2-1        Sample IFDL Syntax

  3-1        Unsupported CDDL Syntax

  3-2        Supported CDDL Syntax

  3-3        FORM Statement

  3-4        Default TDMS Converter Layout Declaration

  3-5        ENABLE Response Created for Form-Only Conversion or for a Form Named in the Request Library Definition

  3-6        DISABLE Response Created by the TDMS Converter

  3-7        A Converted Panel and Viewport

  3-8        TDMS Record

  3-9        Form Data Items That Replace TDMS Record Fields and Form Fields

  3-10       Groups That the TDMS Converter Creates for Form-Only Conversion

  3-11       Groups that the TDMS Converter Creates When You Convert Requests

  3-12       TDMS Request That Contains a Control Field

  3-13       SEND Response That Emulates a TDMS Control Field

  3-14       TDMS Request That Contains OUTPUT TO Instructions

  3-15       SEND Response That Emulates TDMS Explicit OUTPUT TO Instructions

  3-16       IFDL Syntax to Display the Current Time

  3-17       Panel Field That is Displayed with a Video Attribute

  3-18       TDMS Request That Contains INPUT TO Instructions

  3-19       RECEIVE Response That Emulates TDMS Input Mappings

  3-20       TDMS Request That Contains RETURN TO Instructions

  3-21       RECEIVE Response That Emulates the TDMS RETURN TO Instruction

  3-22       IFDL Syntax to Emulate the DEFAULT FIELD Instruction

  3-23       Function That Emulates the DEFINE KEY AS Instruction

  3-24       Function and Function Response to Emulate the ERROR Key Function

  3-25       Definition of the TDMS GOLD Key Function

  3-26       Function That Emulates the TDMS GOLD Key Function

  3-27       Invalid Function Declaration

  3-28       Correct Function Declaration

  3-29       TDMS Request That Contains a DISPLAY FORM and a USE FORM Instruction

  3-30       SEND Response That Displays Panels

  3-31       DISPLAY Clause to Set the Keypad Mode to Numeric

  3-32       TDMS Request That Contains MESSAGE LINE IS Instructions

  3-33       SEND Response to Emulate the MESSAGE LINE IS Instruction

  3-34       PRK Instruction That Contains a CHECK Modifier

  3-35       IFDL Syntax to Emulate PRK Instructions with CHECK Modifiers

  3-36       TDMS Request That Contains the RECORD IS Instruction

  3-37       TDMS Record Definition

  3-38       Form Record Declaration That Replaces the RECORD IS Instruction

  3-39       RECORD IS Instruction That Contains the WITH NAME Modifier

  3-40       Form Record That Contains Two Groups with Different Names

  3-41       ENABLE Response That Signals the Operator

  3-42       Request That Applies Video Attributes Conditionally

  3-43       Panel Field That Contains Conditionally Applied Attributes

  3-44       TDMS Request That Contains a WAIT and NOWAIT Instruction

  3-45       TRANSCEIVE Response That Waits for Operator Input When Needed

  4-1        TRANSCEIVE Response Created by the TDMS Converter

  4-2        Form Data Items and Panel Fields That Allow Implicit Data Transfer

  4-3        TRANSCEIVE Response That Allows Implicit Data Transfer

  4-4        Nested Data Group Declaration

  4-5        Single Data Group Declaration

  4-6        TDMS Record Definition

  4-7        Form Data Item Declaration That Corresponds to a TDMS Record Field

  4-8        Form Data Item Declaration Generated from a TDMS Picture

  4-9        LET Response Step That Maps Incompatible Form Data Items

  4-10       Panel Field That Replaces a TDMS Form Field with the SIGNED NUMERIC Picture Type

  4-11       Form Data Items and Panel Fields for Dates and Times

  4-12       RECEIVE Response That Maps Date and Time

  4-13       RECEIVE Response for Explicitly Mapped Date and Time

  4-14       Form Data and Panel Field Declarations for DATE, TIME, and ADT Data Types

  5-1        Enabling a Form

  5-2        Enabling More Than One Form

  5-3        FORMS$SEND Call

  5-4        FORMS$RECEIVE Call

  5-5        FORMS$TRANSCEIVE Call

  5-6        FORMS$CANCEL Call

  5-7        FORMS$DISABLE Call

  5-8        DISABLE RESPONSE That Clears the Screen

  5-9        Request Exit Reponse for Printing Panels

  5-10       Emulating AFKs with Functions and Responses

  5-11       Viewport and Panel That Replace a TDMS Message Line

  5-12       Form Declaration for Sending Messages

  5-13       Program Record and FORMS$SEND Call for Displaying Messages

  8-1        Function Declaration for a Built-In Function

  8-2        Function Declaration for a Function You Name

  8-3        New Definition for the NEXT ITEM Function

  8-4        Definition for the CHANGE_EMPLOYEE Function

  8-5        Menu Panel with Choice Processing

  8-6        Declarations of Help Messages

  8-7        Declaring and Using Help Panels

  8-8        Function Responses That Create TDMS-Like Help

  8-9        Declaration of Form Data Groups

  8-10       Declaration of Panel Fields to Display a Form Data Group

  8-11       Declaration of a Form Record That Passes Data to Form Data Groups

  8-12       Program Record That Passes Group Data

  8-13       Declarations of the Elements That Control Array Transfer and Scrolling

  8-14       Tracked Form Data Items

  8-15       Shadow Record Declaration

  8-16       Escape Routine in a COBOL Program

  8-17       FORMS$ENABLE Call for Escape Routines

  8-18       CALL Response Step

  8-19       Panel Field That Needs Check Digit Validation

  FIGURES

  5-1        Implicit Send Data Transfer in DECforms

  5-2        Implicit Receive Data Transfer in DECforms

  5-3        Implicit Transceive Data Transfer in DECforms

  7-1        FDE Main Menu

  7-2        Panel Editor Screen Display

  7-3        FDE Choose, Create Panel

  7-4        FDE Create Panel

  7-5        FDE Color Choice Panel

  7-6        Panel Editor Display Attributes Menu

  7-7        Panel Editor Field Description Panel

  8-1        Appearance of Groups on the Display

  8-2        Operation of a Scrolled Region

  TABLES

  2-1        DECforms Requests and Associated Responses

  3-1        TDMS Converter Output for TDMS Picture Strings

  3-2        Form Data Item Data Types That Replace TDMS Picture Strings

  3-3        Compatible Data Types for Conversion

  3-4        TDMS Form Field Definitions

  3-5        Comparison of DECforms Built-In Functions and TDMS Key Functions

  7-1        Comparison of DECforms Display Attributes and TDMS Form Video Attributes

  7-2        Comparison of DECforms Field Attributes and Field Validators and TDMS Field and Validation Attributes

  7-3        Comparison of DECforms Picture Characters and TDMS Picture Characters

  8-1        Meaning of Shadow Record Characters