Business BASIC 86 Reference Manual Describes the MAI Basic Four Business BASIC 86 Language Used on BOSS/VS and BOSS/IX Systems
Total Page:16
File Type:pdf, Size:1020Kb
PAGE STATUS Effective Date Page Status iii/iv Table of Contents v through x April, 1987 Preface xi/xii April, 1987 Section 1 1-1 through 1-6 April, 1987 Section 2 2-1 through 2-6 April, 1987 Section 3 3-1 through 3-14 April, 1987 Section 4 4-1 through 4-116 April, 1987 Section 5 5-1 through 5-42 April, 1987 Section 6 6-1 through 6-22 April, 1987 Section 7 7-1 through 7-16 April, 1987 Section 8 8-1 through 8-18 April, 1987 Section 9 9-1 through 9-28 April, 1987 Section 10 10-1 through 10-34 April, 1987 Section 11 11-1 through 11-38 April, 1987 Appendix A A-l through A-10 April, 1987 Appendix B B-l through B-50 April, 1987 Appendix C C-l through C-2 April, 1987 Appendix D D-l through D-4 April, 1987 Appendix E E-l through E-2 April, 1987 Appendix F F-l through F-8 April, 1987 Appendix G G-l through G-12 April, 1987 Index 1-1 through 1-18 April, 1987 iii/iv M6262A TABLE OF CONTENTS Page SECTION 1 INTRODUCTION Overview ..............................................1-1 Scope .................................................1-1 Compatibility .........................................1-1 Contents ..............................................1-2 Conventions ...........................................1-3 Symbols .............................................1-3 Parameter Abbreviations .............................1-4 Input Terminators ...................................1-6 SECTION 2 FEATURES OF BUSINESS BASIC 86 Overview ..............................................2-1 Operating Modes .......................................2-1 Console Mode ........................................2-1 Program Mode ........................................2-1 Operating System Access ...............................2-2 Input/Output Devices ..................................2-2 I/O Directives ......................................2-2 Public Programming ....................................2-4 Input Buffering .......................................2-4 Retain Buffering ......................................2-5 Control Branching .....................................2-5 SECTION 3 LANGUAGE FORMAT Overview ..............................................3-1 Statement Format ......................................3-1 Statement Numbers ..................................3-1 Directives .........................................3-2 Parameters .........................................3-2 Compound Statements ................................3-2 Variables, Constants and Expressions ................3-3 Numbers...........................................3-3 Variable Names....................................3-4 Field Variables...................................3-4 Simple Numeric Variables..........................3-4 Subscripted Numeric Variables (DIM)...............3-4 Arithmetic Expressions............................3-5 String Constants..................................3-6 String Variables..................................3-6 Subscripted String Variables (DIM)................3-6 String Expressions................................3-7 String Comparison.................................3-7 Logical Expressions...............................3-7 v M6262A TABLE OF CONTENTS (cont©d) Page SECTION 3 LANGUAGE FORMAT (cont©d) Output Data Formatting .................................3-8 Positioning Data Display ............................3-9 Numeric Editing .....................................3-10 Non-Formatted Printing of Numeric Values ............3-12 SECTION 4 DIRECTIVES SECTION 5 FUNCTIONS SECTION 6 SYSTEM VARIABLES SECTION 7 INPUT /OUTPUT OPTIONS Overview ..............................................7-1 SECTION 8 MNEMONICS Overview ...............................................8-1 Mnemonic Format .....................................8-1 VFU Definition .........................................8-2 Mnemonics Descriptions .................................8-3 Terminal Control ....................................8-5 Printer Control .....................................8-10 OS Control ..........................................8-15 SECTION 9 ERROR PROCESSING Introduction ...........................................9-1 Non-catastrophic Errors .............................9-1 Error Processing ....................................9-1 Catastrophic Errors .................................9-2 Error Codes ............................................9-2 SECTION 10 BOSS/IX SPECIFIC INSTRUCTIONS Overview ...............................................10-1 Command Line Options ...................................10-1 Options .............................................10-1 Command String ......................................10-2 Examples ............................................10-3 Instructions ...........................................10-4 M6262A vi TABLE OF CONTENTS (cont©d) Page SECTION 11 BOSS/VS SPECIFIC INSTRUCTIONS Overview ...............................................1-1 MAGNET and NS Subroutines ..............................11-1 APPENDIX A FEATURES OF THE BUSINESS BASIC PROGRAMMING ENVIRONMENT Overview ...............................................A-l Ghost Tasks ............................................A-l Restrictions on Ghost Programs ......................A-l Communication With a Ghost Task .....................A-2 Public Programming .....................................A-3 Restrictions on Public Programming ..................A-4 Input Buffering ........................................A-5 Clearing the Input Buffer ...........................A-5 Escape Processing ...................................A-5 TBL= Processing .....................................A-5 Error Processing ....................................A-6 Field Protection .......................................A-8 APPENDIX B MULTI-KEYED FILES Introduction ...........................................B-1 Applications for Multi-Keyed Files .....................B-3 Existing Applications That Use Sets of Files ........B-3 Existing Applications That Use the Sort Utility .....B-3 Enhancement of Existing Applications ................B-4 Rewriting Old Or Writing New Applications ...........B-4 The Benefits of Using Multi-Keyed Files ................B-4 Reduced File Maintenance ............................B-4 Improved Data Integrity .............................B-4 Improved Performance ................................B-5 Reduced Disk Space Requirements .....................B-5 Reduced Complexity of Applications ..................B-5 The BB86 Syntax for Multi-Keyed Files ..................B-6 Creating a Multi-Keyed File .........................B-6 Format String .......................................B-6 Field Information ...................................B-9 Variable-length Fields ..............................B-10 Composite Fields ....................................B-ll Fields That Don©t Follow Each Other .................B-14 Gaps In The Record ..................................B-l7 Reading Records From a Multi-Keyed File ................B-17 Examples ............................................B-17 Expanded KEY= Capabilities ..........................B-18 Reading Using FIELD ALIAS ...........................B-19 vii M6262A TABLE OF CONTENTS (cont©d) Page APPENDIX B MULTI-KEYED FILES (cont©d) RETAIN and UNPACK ....................................B-20 Other Variations On the READ Statement ...............B-21 Writing Records to a Multi-Keyed File ..................B-21 Removing Records from a Multi-Keyed File ...............B-24 New Language Features ..................................B-24 The KEY Function .....................................B-25 The FMTINFO Function .................................B-25 INITFILE .............................................B-28 SETFIELD .............................................B-28 FIELD ALIAS ..........................................B-28 Miscellany ...........................................B-29 File Creation Examples .................................B-30 Sample Programs ........................................B-32 Printing a Multi-Keyed File .........................B-36 Updating a Multi-Keyed File .........................B-38 Loading Data into a Multi-Keyed File ................B-39 Converting Existing Applications .......................B-39 Select an Appropriate Program .......................B-39 Conversion Approaches ...............................B-40 Selection of Keysets ................................B-40 Selecting NOKEY Fields ..............................B-41 Finding Records By NOKEY Fields .....................B-41 Suggestions for Conversion ..........................B-41 Data Layout Diagrams...............................B-41 Field Separator Characters.........................B-42 Subfields..........................................B-42 The WriteThru File Attribute on BOSS/VS............B-44 Definition of Keysets for Conversion...............B-44 Recovery of Multi-Keyed Files on BOSS/VS ...............B-44 Concurrency and Integrity ...........................B-44 Tools Available .....................................B-45 File Recovery Sequence ..............................B-45 Recovering Multi-Keyed Files on BOSS/IX ................B-47 Template File .......................................B-47 Disk Space Requirements .............................B-47 User Interface ......................................B-48 Single User Mode ....................................B-48 Repairing a Multi-Keyed File ...........................B-49 APPENDIX C VARIABLE TABLES FOR BOSS/IX APPENDIX D ASCII CHARACTER CHARTS Character Codes ........................................D-l Explanation