HP OpenVMS Systems Documentation

Content starts here

User Manual

Previous Contents Index

B.3 Errors Not Generated by HP BASIC

Table B-2 contains errors that cannot be generated in HP BASIC. However, they can be displayed with the ERT$ function and are included for completeness.

Table B-2 Errors Not Generated by HP BASIC
Number Text
3 ?Account or device in use
6 ?Not a valid device
8 ?Device not available
13 ?User data error on device
16 ?Name or account now exists
17 ?Too many open files on unit
19 ?Disk block is interlocked
20 ?Pack ids don't match
21 ?Disk pack is not mounted
22 ?Disk pack is locked out
23 ?Illegal cluster size
24 ?Disk pack is private
25 ?Disk pack needs 'cleaning'
26 ?Fatal disk pack mount error
27 ?I/O to detached keyboard
30 ?Device not file-structured
32 ?No buffer space available
33 ?Odd address trap
34 ?Reserved instruction trap
36 ?SP stack overflow
37 ?Disk error during swap
38 ?Memory parity (or ECC) failure
39 ?Magtape select error
40 ?Magtape record length error
41 ?Non-res run-time system
44 ?Matrix or array too big
47 ?Line too long
60 ?Integer overflow, FOR loop
62 ?No run-time system
65 ?Illegal MAGTAPE( ) usage
68-70 unused
71 ?Statement not found
74 ?Undefined function called
75 ?Illegal symbol
76 ?Illegal verb
77 ?Illegal expression
78 ?Illegal mode mixing
79 ?Illegal IF statement
80 ?Illegal conditional clause
81 ?Illegal function name
82 ?Illegal dummy variable
83 ?Illegal FN redefinition
84 ?Illegal line number(s)
85 ?Modifier error
86 ?Can't compile statement
87 ?Expression too complicated
90 %Inconsistent function usage
91 ?Illegal DEF nesting
92 ?FOR without NEXT
93 ?NEXT without FOR
94 ?DEF without FNEND
95 ?FNEND without DEF
96 ?Literal string needed
98 ?Syntax error
99 ?String is needed
100 ?Number is needed
106 %Inconsistent subscript use
107 ?ON statement needs GOTO
108 ?End of statement not seen
109 ?What?
110 ?Bad line number pair
111 ?Not enough available memory
112 ?Execute only file
113 ?Please use the run command
114 ?Can't CONTinue
115 ?File exists-RENAME/REPLACE
117 ?Matrix or array without DIM
118 ?Bad number in PRINT USING
119 ?Illegal in immediate mode
120 ?PRINT-USING buffer overflow
121 ?Illegal statement
125 ?Wrong math package
135 ?Illegal usage
140 ?Index not initialized
163 ?No file name
165 ?Cannot position to EOF
167 ?Illegal record format
169 unused
172 ?Record lock failed
180 ?No support for operation in task
182 ?Network operation rejected
184 ?Unaligned REMAP variable
198-225 unused
230 ?No fields in image
231 ?Illegal string image
232 ?Null image
233 ?Illegal numeric image
234 ?Numeric image for string
235 ?String image for numeric
236 ?TIME limit exceeded
237 ?First arg to SEG$ greater than second
241 ?Floating overflow
242 ?Floating underflow
243 ?CHAIN to nonexistent line number
244 ?Exponentiation error
248 ?Illegal return from subroutine
249 ?Argument out of bounds
251 ?Recursive subroutine call
254-255 unused
294-300 unused

Appendix C
Optional Programming Productivity Tools

This appendix provides an overview of optional programming productivity tools. These tools are not included with the HP BASIC software; they must be purchased separately. Using these tools can increase your productivity as an HP BASIC programmer.

The following products are briefly described in this appendix:

  • Digital Language Sensitive Editor for OpenVMS (LSE) and Digital Source Code Analyzer for OpenVMS (SCA) ( Section C.1)
  • Oracle CDD/Repository ( Section C.2)
  • Database Management System (DBMS) ( Section C.3)
  • Digital Test Manager for OpenVMS ( Section C.4)
  • Digital Code Management System for OpenVMS (CMS) ( Section C.5)

For more information on using these tools, see the listed documentation at the end of each section.

For information about how to purchase these tools, contact your HP sales representative.

C.1 Language Sensitive Editor (LSE) and Source Code Analyzer (SCA)

The Digital Language Sensitive Editor for OpenVMS (LSE) and the Digital Source Code Analyzer for OpenVMS (SCA) must be purchased separately. LSE is a powerful and flexible text editor designed specifically for software development. LSE has important features that help you produce syntactically correct code in HP BASIC. SCA is an interactive tool that is used to perform program analysis.

LSE and SCA are closely integrated products; generally, SCA can be invoked through LSE. LSE provides additional editing features that make SCA program analysis more efficient. In addition, LSE and SCA, in conjunction with the HP BASIC compiler, provide a set of new enhancements supporting source code designing and review.

For more information about LSE and SCA, see the Guide to Language-Sensitive Editor for VMS Systems and Guide to Source Code Analyzer for VMS Systems.

C.1.1 Preparing an SCA Library

SCA stores data generated by the HP BASIC compiler in an SCA library. The data in the SCA library contains information about all symbols, modules, and files encountered during a specific compilation of the source.

After creating and initializing the OpenVMS directory of the SCA library, direct the HP BASIC compiler to generate data analysis files by appending the /ANALYSIS_DATA qualifier to the HP BASIC command as follows:


This command line compiles the input files PG1.BAS, PG2.BAS, and PG3.BAS, and generates corresponding output files for each input file with the file types OBJ and ANA. SCA puts these files in your current default directory.

Load the information in the data analysis files into your SCA library with the LOAD command as follows:


This command loads your library with the modules contained in the data analysis files PG1.ANA, PG2.ANA, and PG3.ANA.

After the SCA library has been prepared, enter LSE to begin an SCA session. Within this context, the integration of LSE and SCA provides commands that can be used only within LSE.

C.1.2 Compiling From Within LSE

To compile a completed HP BASIC program, enter the following command at the LSE prompt:


To compile an HP BASIC program that contains placeholders and design comments, include the following qualifiers to the previous command:


The /ANALYSIS_DATA qualifier causes the compiler to generate an analysis data file containing source code analysis information. This information is provided to the SCA library.

The /DESIGN qualifier instructs the HP BASIC compiler to recognize placeholders and design comments as valid program elements. If the /ANALYSIS_DATA qualifier has also been specified, the HP BASIC compiler includes information on placeholders and design comments in the analysis data file.

C.1.3 HP BASIC Support for LSE and SCA Features

This section describes information specific to BASIC for programming language placeholders and tokens.

LSE accepts keywords, or tokens, for all languages with LSE support. However, the specific tokens themselves are language defined. For example, you can expand the [MAT] token only when using HP BASIC.

Likewise, LSE provides placeholders, or prompt markers, for all languages with LSE support. However, as with tokens, the specific text or choices these markers call for are language defined. For example, you see the [record-declarations] placeholder only when using HP BASIC.


Keywords such as TYPE, VARIANT, IF, FOR, and OPEN, can be tokens as well as placeholders. Therefore, any time you are in LSE with the language set to HP BASIC, you can type one of these words and press Ctrl/E to expand the construct.

Remember that braces ({}) enclose required placeholders and brackets ([]) enclose optional placeholders. Note that when you erase an optional placeholder, LSE also deletes any associated text before and after that placeholder.

You can use the SHOW TOKEN and SHOW PLACEHOLDER commands to display a list of all HP BASIC tokens and placeholders, or a particular token or placeholder. For example:

LSE> SHOW TOKEN IF              {lists the token IF}
LSE> SHOW TOKEN                 {lists all tokens}

To copy the listed information into a separate file, first enter the appropriate SHOW command to put the list into the $SHOW buffer. Next, enter the following command:

LSE> WRITE filename.filetype

You can use the PRINT command to print the file you created.

C.2 CDD/Repository

HP BASIC supports CDD/Repository. The current version of CDD/Repository is compatible with previous versions of CDD.

See Chapter 21 for more information about CDD/Repository.

C.3 Database Management System (DBMS)

DBMS is a multiuser, general-purpose, CODASYL-compliant database management system. DBMS is used for accessing and administrating databases ranging in complexity from simple hierarchies to complex networks with multilevel relationships. DBMS supports full concurrent access in a multiuser environment without compromising the integrity and security of your database.

For more information, see the DBMS documentation.

C.4 Digital Test Manager for OpenVMS

The Test Manager helps test software during development and maintenance. This tool automates the organization, execution, and review of tests and allows several developers to use one set of tests at the same time.

With the Test Manager, you can describe your tests, organize them by assigning them to groups, and choose combinations of tests to run by test name or by group. The Test Manager executes the tests selected and then compares the result with the expected results.

For more information, see the Guide to Test Manager for VMS Systems.

C.5 Code Management System for OpenVMS (CMS)

The Code Management System for OpenVMS (CMS) is a program librarian for software development and evolution. It is comprised of a set of commands that enable you to manage files of an ongoing project.

For more information about CMS, see the Guide to Source Code Analyzer for VMS Systems.

Index Contents