home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
vabasi11.zip
/
IP21153O.ZIP
/
OS2
/
CLIENT
/
VERSION1.TXT
< prev
Wrap
Text File
|
1997-06-23
|
47KB
|
1,041 lines
========================================================================
IBM VisualAge for Basic for OS/2 and for Windows Version 1.1 (June 1997)
========================================================================
DESCRIPTION OF KNOWN DEFECTS AND RESTRICTIONS IN THIS VERSION
The known defects and restrictions are grouped in the following
categories:
A. Building server procedures
B. Calling server procedures
C. Database access
D. Language elements
E. Miscellaneous
F. Run-time problems
G. User Interface
H. Communications Components
I. Country-specific information
------------------------------------------------------------------------
A. Building Server Procedures
------------------------------------------------------------------------
------------------------------------------------------------------------
A.1. Building Server Procedures: Replacing a server procedure on a DB2
server
During server procedure development, set the database manager
configuration using KEEPDARI=NO, so that DB2 will unload server
procedures after each call. (DB2 loads a server procedure into memory
when it runs, and may not unload it from memory to let you replace it.)
For execution, set KEEPDARI=YES to give better performance, so that the
server procedures do not need to be reloaded each time they are run.
With KEEPDARI=YES, the following message may appear: "Stored Procedure
DLL cannot be created because it is in use." This will happen if you
are trying to rebuild a server procedure which has already been run by
DB2. Stopping and restarting DB2 will free the server procedure from
memory, allowing you to rebuild it.
------------------------------------------------------------------------
A.2. Building Server Procedures: Running a server procedure on a DB2
server in UNFENCED mode
Do not run a server procedure built using VisualAge for Basic on DB2
in UNFENCED mode. For this version, run server procedures in FENCED
mode.
------------------------------------------------------------------------
A.3. Building Server Procedures: Building the UNITS UDF sample
Before building the UDF in vabasic\samples\udf\units\unitudf.prj,
edit the assignment statement of the global variable Path to use the
path (with a trailing "\" or "/") of the location of the UDF built on
the database server.
To run the units user-defined function on an AIX server, copy
only the units.dat file to the AIX server. Numbers in a
units.rec file generated on OS/2 or Windows will not be in the
correct binary format for AIX. The units.dat file, however, is
entirely in ASCII format.
For additional details about this and other UDF samples, browse the
README.UDF file in vabasic\samples\udf.
------------------------------------------------------------------------
B. Calling Server Procedures
------------------------------------------------------------------------
-------------------------------------------------------------------------
B.1. Calling Server Procedures: Calling more than 5 stored procedures
In DB2 for OS/2, Version 2.1.0, no more than 5 different stored
procedures can be invoked by one application. The sixth and subsequent
calls to different stored procedures receive SQL error code 1131. This
restriction is removed in DB2 for OS/2, Version 2.1.1 or later.
In DB2 for OS/2, Version 2.1.0 and later, an application can call the
same stored procedure as many times as system resources permit.
------------------------------------------------------------------------
B.2. Calling Server Procedures: Matching levels of CLI
When calling a stored procedure using CLI, make sure the levels of CLI
support on the client and server machines are the same, especially if the
client and server are on different operating systems.
------------------------------------------------------------------------
B.3. Calling Server Procedures: Calling from a generated executable
For OS/2, when a stored procedure is invoked from a generated executable,
Visual Age for Basic will display the following message when running
the executable:
"Priority cannot be set for the current thread".
This message can be suppressed by setting an environment variable
as follows:
set VWSPSETPRTY=NO
This environment setting should be made by each OS/2 client running the
generated executable.
------------------------------------------------------------------------
B.4. Calling Server Procedures: For UDFs with VARCHAR input or result
arguments
A DB2 UDF VARCHAR parameter should be declared as Basic data type
"string", not as a sqlvarchar structure. The result should be
NULL terminated ( & with chr$(0) before return). However, there have
been problems reported for VARCHAR result parameters when the client and
the server are on different platforms.
------------------------------------------------------------------------
B.5. Calling Server Procedures: Passing string arguments to a stored
procedure using SP OCX
The SP OCX pads a string argument with nulls to a length of 256,
whether the string is fixed or varying length. It also truncates
any input string at 255 (adding either a null or garbage to make
a length of 256), and any output string at 256. The stored
procedure, which declares the parameter as a varying-length
string, can test for the first null with the InStr function and
use the Left$ or Mid$ function to obtain the original string:
original_string = Left$(input_string, 1, InStr(input_string, Chr$(0)))
------------------------------------------------------------------------
B.6. Calling Server Procedures: Debugging server procedures when
client has an open cursor
If a client procedure has an open SQL cursor and calls a
server procedure which (a) contains embedded SQL and (b) has been
built with remote debug enabled, then subsequent processing with
the cursor fails since DB2 will have closed the cursor. To bypass
the problem, debug the procedures locally before making them server
procedures, and then build them with remote debug disabled.
------------------------------------------------------------------------
B.7. Calling Server Procedures: Bad characters in AIX server messages
When doing a remote debug of a server procedure running on an AIX server,
there may be times when messages in the debugger contain bad characters.
If messages contain bad characters, then the AIX server may be using
a different language locale than the X Windows system displaying the
debugger. Make sure the locale setting of the debugger client and
server are the same language.
If a user wants to check the contents of the message in English, then
change the LANG setting in the file CONFIG.VW located on the AIX server
in $HOME/$SQLLIBDIR:
LANG=En_US
------------------------------------------------------------------------
C. Database Access
------------------------------------------------------------------------
------------------------------------------------------------------------
C.1. Database Access: CLI SQLProcedures function
The CLI SQLProcedures function cannot be used to access information from
the DB2CLI.PROCEDURES table that VisualAge for Basic has inserted.
Attempting this results in a CLI0166E PARMLIST syntax error, because
the VisualAge for Basic parameter descriptions currently use Basic
datatypes, which are not supported by CLI. You can use the CLI procs
sample to access only information that respects the restrictions
documented in the DB2 for OS/2 CLI Guide and Reference, Appendix G.
See the vabasic\samples\cli\procx.prj sample for how to bypass this
restriction.
------------------------------------------------------------------------
C.2. Database Access: DB2 not started or CONNECT RESET missing
If a message appears in the Code Window saying "DB2 is not started or a
CONNECT RESET statement is missing," and you have verified that DB2 is
started and you have appropriate CONNECT RESET statements in place, exit
VisualAge for Basic and then start it again.
If the problem persists, then one reason may be that the DB2 server
being accessed has the configuration setting AUTHENTICATION set to
SERVER. To determine this setting, issue the command
db2 get dbm cfg | more
from a DB2 Command Line window on the DB2 Server.
To avoid such connection errors, use the Options -> Database -> Set
database logon information menuitem in the Project Window of VisualAge
for Basic with DB2 Support to enter an userid and password that is
authorized to the DB2 server.
------------------------------------------------------------------------
C.3. Database Access: DB2 Patches and the Data Component
If you are planning to develop and/or run a VisualAge for Basic
application that uses the Data Component and/or Data Access classes to
access a DB2 database, then each client needs to have several DB2 patches
configured. These patches need to be configured on every client
workstation, and for each DB2 database alias defined on a client
workstation. NOTE: these steps are necessary for Windows 95 and
Windows NT users of VisualAge for Basic who accessing a DB2 Version 2.x
Server or users on Windows 95 and Windows NT who have a DB2 Version 2.x
Software Developer's Kit installed. Users with DB2 Version 5 Server
and/or Software Developer's Kit installed are not affected.
1. In the "DB2 for Windows 95" or "DB2 for Windows NT" menu/folder,
locate the "DB2 CLI/ODBC Administrator" and run it. If you do not
have this item, then your level of the DB2 SDK may not contain these
patches.
2. Select a DB2 Alias and, if not done already, click the "Add as ODBC"
button.
3. The selected alias should now also appear in the "ODBC Data Source
Name" column.
4. Click the "Configure" button.
5. A message may appear asking whether to connect to the DB2 Alias.
click the "Yes" button.
6. A logon screen may appear. Enter a userid and password authorized
to the database and click "Ok".
7. A message "Connect completed successfully" may appear. Click "Ok".
8. A "ODBC Data Source Configuration" notebook appears. In the lower
right portion of this notebook, Click the tab labeled with two
downward pointing arrows. This scrolls the visible notebook tabs
down by one tab.
9. The tab "Patches" should now appear along the right side of the
notebook. Click this tab.
10. The "PATCH1:" notebook page appears, listing a number of available
patches provided by DB2. See section 9.2.2 of the DB2 SDK
README.TXT file for detailed descriptions of these patches.
11. Select the following patches. The cumulative total displayed for
PATCH1 should be 1485:
- Map COUNT(colname) to COUNT(*)
- Map timestamp values to date values
- Map timestamp values to time values
- Null terminate DBCS strings
- Permit MS Access, Visual Basic handshake
- Return primary key ahead of unique index
- MS Visual Basic fix for empty searched update/delete
12. Click "OK".
13. Message "Save changes to the DB2CLI.INI file?" appears. Click "OK".
14. Double click in upper left corner of notebook to close the notebook.
15. Click the "Exit" button to end the DB2 CLI/ODBC Administrator.
------------------------------------------------------------------------
C.4. Database Access: Can't Load xxODBCxx.DLL Error Message
On Windows NT and Windows 95, if you get the error message "Can't load
xxODBCxx.DLL" whenever starting VisualAge for Basic, then this indicates
that you do not have an ODBC driver installed. If you are planning on
using the Data Component and/or Data Access classes, then you need to
install the ODBC driver shipped with the database management system you
will be accessing. If you are not planning to do database access using
ODBC, then you can suppress this error message by renaming the file
\VABASIC\BIN\VWODBC.DLL (Ex., VWODBC.BLL).
------------------------------------------------------------------------
C.5. Database Access: Starting ODBCADM.EXE on OS/2
When running the ODBC driver manager (ODBCADM.EXE) from an OS/2 command
window, use the start command (i.e., 'start odbcadm'). This will create
a separate session that may be closed after exiting the driver manager.
------------------------------------------------------------------------
C.6. Database Access: Resizing sample dialogs
In many Embedded SQL and CLI samples in the \VABASIC\SAMPLES\EMBED and
\VABASIC\SAMPLES\CLI subdirectories, there are small secondary dialogs
that appear asking for input like the database alias, logon userid, or
logon password. The dialogs have OK and Cancel buttons, but they do not
appear until one has resized the dialog. Resizing in any direction will
display the buttons.
------------------------------------------------------------------------
C.7. Database Access: The Data Component and DB2 Support
The Data Component is not working on the Windows version of VisualAge
for Basic with DB2 Support. The component works correctly on VisualAge
for Basic (i.e., without DB2 Support). To access DB2 databases, an
application can use the Data Component and Data Access classes in
VisualAge for Basic, or the application can use embedded SQL and/or CLI
in VisualAge for Basic with DB2 Support.
------------------------------------------------------------------------
D. Language Elements
------------------------------------------------------------------------
------------------------------------------------------------------------
D.1. Language Elements: PrintForm method
The PrintForm method on a form is not implemented.
Details: The printer does not behave as expected when the following code
is entered in the Form_Click method:
printer.print "This may never print"
printer.enddoc
In addition, there should be an implicit Printer.EndDoc when the
application has finished executing (providing it has printed something).
Workaround: save the form to a file and print it from there.
------------------------------------------------------------------------
D.2. Language Elements: Title Property - not working in a generated
executable.
On all platforms the Title property does not work properly when
set in a generated executable.
------------------------------------------------------------------------
D.3. Language Elements: String DataType byte size
The description of the Byte Size for a String datatype. as described in
the DataType appendix of the Language Reference, is incorrect. The
correct description is below:
Byte Size
English International(Multibyte)
Win32 VariantString Unicode Unicode
2 bytes/char. 2bytes/character
String Type 1 byte/char. Multibyte per character
OS/2, AIX 1 byte/char. Multibyte per character
to a max of 2 billion.
------------------------------------------------------------------------
E. Miscellaneous
------------------------------------------------------------------------
------------------------------------------------------------------------
E.1. Miscellaneous: Creating a SOM object on a form
When you create a SOM object on a form, VisualAge for Basic may crash.
Details: when you select a SOM class from the Component Catalog, and use the
Toolbox to create a SOM object on a form, VisualAge for Basic may crash.
SOM objects that may cause this error include: AttributeDef, ConstantDef,
Contained, ExceptionDef, InterfaceDef, ModuleDef, OperationDef,
ParameterDef, SOMDClientProxy, SOMMSingleInstance, and TypeDef.
Actions that may cause this error include:
-- Selecting the object on the form and clicking on the Delete key.
-- Going to the File menu and selecting New Project
-- Going to Project Window Run Menu and clicking on Run, then on End
------------------------------------------------------------------------
E.2. Miscellaneous: Renaming DLLs for Microsoft Visual Basic 4.0
If you plan to use both Microsoft Visual Basic 4.0 and IBM VisualAge for
Basic client, you will need to rename the following DLLs located in the
vabasic\bin directory to a backup name (for example, by replacing the
DLL extension with BLL):
CTL3D32.DLL MSVCR40.DLL
MFC40.DLL MSVCRT40.DLL
MFCO40.DLL OLEPRO32.DLL
------------------------------------------------------------------------
E.3. Miscellaneous: The Two-Dimensional Graphics Part
The Two-Dimensional Graphics Part (shipped with the OpenDoc
runtime), will crash VisualAge for Basic if the "link" pages
are selected from the OpenDoc Properties notebook. The link
pages are not active, so this is not a functional problem.
------------------------------------------------------------------------
E.4. Miscellaneous: The OpenDoc Cookbook part
The OpenDoc Cookbook part is not recommended for use in
VisualAge for Basic at this time.
------------------------------------------------------------------------
E.5. Miscellaneous: The OpenDoc MultiMedia parts
The OpenDoc MultiMedia parts (shipped with the Developer's
Connection) work best if they are first contained within
other container parts. For example, instead of using the
Video Part as the root part of an OpenDoc document, use a
container part as the root and embed the Video Part in it
(example container parts include the Page Layout and Text
Parts shipped with the OpenDoc runtime or the Container Part
shipped with the Warp Toolkit). This is also a useful tip for
other OpenDoc parts that do not behave as expected.
------------------------------------------------------------------------
E.6. Miscellaneous: Generating executables from projects building
Stored Procedures and/or User-Defined Functions
If a project that calls a stored procedure or user-defined function is
also the project that builds them, then there will be error messages
when building and/or executing the project as a generated executable.
The following workaround can be used to build an executable client
application:
1) Start VisualAge for Basic and load the project.
2) Run the application.
3) Stop the application.
4) In the project window, remove any files in the Stored Procedure
or User-Defined Function categories (do NOT save the project).
5) Build an executable file.
6) Exit VisualAge for Basic (do NOT save the project), and run the
generated executable.
------------------------------------------------------------------------
E.7. Miscellaneous: Font Migration
If a font name specified in a VisualAge for Basic application is not
installed on the machine loading or running the application, then the
font will be changed to the default font of the operating system (for
example, System font for Windows NT, System Proportional font for OS/2).
One side effect of this behavior is that invalid font names are not
flagged as errors in the Property Editor or the Code Editor.
------------------------------------------------------------------------
E.8. Miscellaneous: VBX/OCX Migration
Users of Microsoft Visual Basic 3.0 and VBX controls may be able to
migrate their applications into VisualAge for Basic and use the
equivalent OCX. Follow these steps:
1. Save any .FRM files as text files (not binary files) in Microsoft
Visual Basic 3.0.
2. Start VisualAge for Basic for Windows NT
3. In the Project window, select Window ==> Component Catalog.
4. Select the OLE components to be used in the application. As a
component is selected, any applicable icons will be placed in the
ToolBox window.
5. Using a text editor (NotePad, for example), inspect the .FRM files
for the Begin... End sections describing VBX instances. Remove this
section from the form (Save a backup of this form prior to such an
operation). Do NOT remove event logic (ex., vbxname1_click()) from
the form.
6. Save any modified files.
7. Remove the Form1 loaded by VisualAge for Basic from the untitled
project choosing Selected ==> Remove in the Project Window.
8. In the Project Window, select File ==> Add File to load individually
each file of the application, including the modified forms.
9. Choose Selected ==> Show Form to view each form in Design Mode.
Using the ToolBox, add in an OCX instance for each VBX instance
removed from the form(s), giving each the same Name as each VBX
instance had in Visual Basic 3.0. This will preserve the event
logic.
10. Choose File ==> Save Project As to create a .PRJ file that can be
used to load the converted project into VisualAge for Basic. Save
each modified form as a .I formatted file.
------------------------------------------------------------------------
E.9. Miscellaneous: TrueType Fonts
If you are finding text displayed in VisualAge for Basic is just some
garbled graphic characters, then your computer may have a setting
restricting fonts to only TrueType fonts. In the Fonts control panel,
there is a setting determining whether to show only TrueType fonts.
To show non-TrueType fonts on Windows 95:
1) Open the My Computer folder.
2) Open the Control Panel folder.
3) Open the Fonts folder.
4) In the menu of the Fonts folder, select the View -> Options menuitem.
5) In the Fonts Notebook, select the TrueType notebook tab.
6) Uncheck the option Show only TrueType fonts in programs on my
computer.
7) Restart the computer.
To show non-TrueType fonts on Windows NT:
1) Open the Main folder.
2) Open the Control Panel folder.
3) Open the Fonts dialog.
4) In the Fonts dialog, click the TrueType button.
5) Uncheck the option Show only TrueType fonts in applications.
6) Close the Fonts dialog
7) You do not need to restart the computer.
------------------------------------------------------------------------
E.10. Miscellaneous: Passing strings from SOM to VisualAge for Basic
Consider the following C function:
static char myStr[] = "hello world";
SOM_Scope string SOMLINK _my_sub()
{
return(myStr);
}
As per the SOM rules, to allow the memory management of SOM and
VisualAge for Basic to work correctly you must copy all return string
parameters as follows:
static char myStr[] = "hello world";
static char *SOMstrdup(const char *str)
{
char *rtrn = SOMMalloc(strlen(str)+1);
strcpy(rtrn, str);
return str;
}
SOM_Scope string SOMLINK _my_sub()
{
return SOMstrdup(myStr);
}
------------------------------------------------------------------------
E.11. Miscellaneous: Running Tutorial #2
To run tutorial #2, start VisualAge for Basic in a command prompt window
from the \vabasic\samples\tutorial\tutor2 subdirectory. This will
allow VisualAge for Basic to find the SOM.IR file containing the
SOMCalculator class.
------------------------------------------------------------------------
E.12. Miscellaneous: SOM object access and SOMBASE environment variable
When using a SOM object with VisualAge for Basic, the SOMBASE environment
variable must be set. Usually, SOMBASE environment variable is set
automatically by installing a product like VisualAge for C++ or SOM
Toolkit. In some cases, the SOM support of VisualAge for Basic is not
setting SOMBASE. If the level of SOM installed by VisualAge for Basic
is your preferred level, make sure SOMBASE is set to the \VABASIC\SOM
directory.
------------------------------------------------------------------------
E.13. Miscellaneous: Product Descriptions During Install on OS/2
When using the Installation program for VisualAge for Basic on OS/2 from
the CD-ROM, there may be an error message after displaying a product
description. There is a restriction in the installation program that
limits one to browsing only one product description in each invocation
of the install program. This error condition does not occur when
copying the install directory onto a hard disk.
The product descriptions are displayed using the Details -> Product
Description menuitem of the Installation and Maintenance window of
the OS/2 VisualAge for Basic installation program. If the message
"EPFIE112: Unable to transfer C:\OS2\SYSTEM\$EPFINST\EPFIDESC.TMP -
the file is in use or locked" appears, exit and restart the install
program.
------------------------------------------------------------------------
E.14. Miscellaneous: Dialog title of OCX "(Custom)" Properties
The Dialog Window title of any OCX "(Custom)" Property is incorrect.
It is always "Editor's Property".
------------------------------------------------------------------------
E.15. Miscellaneous: Drop down list of SP.OCX on Property Editor
The following properties of SP.OCX do not show a "Dropdown list"
on the Property Editor in VisualAge for Basic:
- DatabaseAlias
- DatabasePassword
- DatabaseSPInfo
Workaround: These values must be typed in, or entered using the (Custom)
property dialog.
------------------------------------------------------------------------
E.16 Miscellaneous: Using the Online Books in NT 4.0
Browsing the Online Books (Ex., Getting Started, Programmer's Guide) on
NT 4.0 may result in crashes in the XVIEW utility. One workaround for
use in the English, Italian, or Brazilian translations of these books
is to change the ShortCut for these books to use the IVIEW utility
instead. IVIEW.EXE is found in the \VABASIC\BIN directory. The XVIEW
utility works well on NT 3.5.1 and Windows 95.
------------------------------------------------------------------------
F. Run-Time Problems
------------------------------------------------------------------------
------------------------------------------------------------------------
F.1. Run-Time Problems: Restriction on dynamic array passing
Because DB2 cannot determine the size of a ReDim-ed array during run
time, it can only handle the default value of MAXARRAYSIZE.
On OS/2 and Windows NT clients, if the array being ReDim-ed is larger
than the default value of MAXARRAYSIZE, it will cause a SQL0822N error
("The SQLDA contains a data address or indicator variable address which
is not valid.").
Solution: VisualAge for Basic provides an environment variable called
MAXARRAYSIZE. Its default values are 64KB on AIX, 10KB on OS/2, and
SQLMAXBLOB on Windows. Set this environment variable to be the same or
larger than the array's ReDim-ed size. For example:
/* OS/2 clients: foo.bas module */
subroutine foo()
Dim array1() as integer
Redim array1(10, 2000);
/* End of subroutine foo() */
In this example, the array's ReDim-ed size (10 x 2000 or 20,000) is
larger than the default value of MAXARRAYSIZE on OS/2 (10KB), so you need
to set the MAXARRAYSIZE environment variable to 20,000 or greater.
To improve performance, you can set MAXARRAYSIZE less than the default
value, as long as it is as large or larger than any ReDim-ed arrays in
your program. Here are the maximum sizes for any ReDim-ed arrays in your
program: OS/2 = 27 KB (27,648 bytes), Windows NT and Windows 95 = 32KB
(32,768 bytes).
------------------------------------------------------------------------
F.2. Run-Time Problems: ScaleWidth/ScaleHeight properties
If a program performs a resize in its code (in other words, changes the
value of the Width and/or Height property), VisualAge for Basic does not
update the ScaleWidth and ScaleHeight properties.
If a user manually resizes a form, VisualAge for Basic updates the
ScaleWidth and ScaleHeight properties correctly.
If the ScaleMode is set to a value different than 1 (Twips), then the
ScaleHeight and ScaleWidth values may be incorrect at runtime.
------------------------------------------------------------------------
F.3. Run-Time Problems: Calling external functions
On OS/2, all function calls made to external functions must be made to
DLLs which use the _system linkage convention. DLLs which use the
_optlink system linkage convention are not supported in this version.
------------------------------------------------------------------------
F.4. Run-Time Problems: SOM Interface Repository Performance Enhancement
The SOM toolkit shipped in VisualAge for Basic is Version 2.1.2. If you
have installed SOM 2.1.4 or later, it includes the ability to add
an index to a SOM Interface Repository (SOMIR). Users of SOMIR files
that don't have an index will notice VisualAge for Basic runs an
application slower the first time than in subsequent runs of the
application. Users of SOMIR files that predate Version 2.1.4 can add
indexes to these files by using the IRINDEX utility
(irindex <SOMIR name>). For additional details, please read the README
file for SOM 2.1.4 or later.
For users planning to install SOM 2.1.4 or later, please note that if you
have a previous version installed that does not include the sample
directories, then you will need to create these directories in order
to complete the installation. The 2.1.4 install program will indicate
which directories are needed.
--------------------------------------------------------------------
F.5. Run-Time Problems: Note for String and Variant usage on Windows
NT and Windows 95
The following issues concern the usage of String and Variant datatypes
in VisualAge for Basic for Windows NT and Windows 95:
(1) Difference of internal code
In VisualAge for Basic, the internal code of a String variable
is the PC code (DBCS PC code in DBCS PC environments). On the other
hand, the internal code of Variant variable type is Unicode to
exploit performance advantages in the interaction with 32bit OLE
automation.
This internal code difference typically appears in the result of
byte operational string functions (such as LenB($), LeftB($),
MidB($), RightB($), etc...).
(2) File & display I/O, interaction with DB2 and CLI/ODBC drivers
Regardless the above internal code difference,
both String type and Variant type variables can be used in the
VisualAge for Basic APIs for file I/O, display I/O, and interaction
with database systems where PC code is expected implicitly.
In case of Variant variables, the output data (from VisualAge for
Basic program) is automatically converted to the String type
representation (PC code), and input data is automatically converted
to a receiving Variant data type representation (Unicode).
Programmers just need to care about putting valid data which is not
corrupted in the variables.
(3) String and Variant variables in OLE automation server/container
Regardless the internal code difference, both String and Variant
variables can be used in OLE automation containers and can call both
16bit and 32bit versions of OLE automation servers. VisualAge for
Basic can convert data types to the one expected by an OLE server
automatically (i.e. if a 32bit OLE server expects BSTR,
VisualAge for Basic converts a String type variable to Variant
representation and then passes it to the OLE server. An OLE server
also performs automatic conversion if necessary according to the OLE
server's responsibility.
(4) String/Variant data conversion by VisualAge for Basic
On the Windows NT and Windows 95 platforms, VisualAge for Basic
automatically performs necessary conversions for String and Variant
types. In this conversion process, if there is invalid data in the
source variable, VisualAge for Basic just removes it and the result
may include no data after the conversion.
------------------------------------------------------------------------
G. User Interface
------------------------------------------------------------------------
------------------------------------------------------------------------
G.1. User Interface: Mnemonic characters not working on OS/2
On OS/2, if Fixpack 17 or later has not been applied, the mnemonic
character (i.e., the accelerator key) in the caption of labels and
buttons (check box, option, and command buttons) does not appear
underlined when using certain fonts. This applies to the VisualAge
for Basic user interface as well as applications written in VisualAge
for Basic.
------------------------------------------------------------------------
G.2. User Interface: OS/2 Support
In some areas where system requirements are mentioned, OS/2 support is
described as OS/2 3.0 (Warp). The correct statement for OS/2 support is
OS/2 3.0 (Warp) or later.
------------------------------------------------------------------------
G.3. User Interface: Editing captions in the Menu Editor
The Edit "textbox" that appears in the menu editor over a menuitem when
changing its caption does not move with the menuitem when the menu
editor scrollbar is used. Clicking on another menuitem will reposition
the edit textbox.
------------------------------------------------------------------------
G.4. User Interface: Screen Resolution Migration
If a form in an application written on a machine with one screen
resolution is migrated to a machine with less screen resolution, and
the form's width and/or height now exceeds the screen size, then an error
occurs when displaying the form in design and run modes.
------------------------------------------------------------------------
G.5. User Interface: Alignment Property on OS/2
OS/2 does not support allow text alignment (i.e., right justify, center,
etc.) of its checkbox, option button, and textbox controls. In
VisualAge for Basic for OS/2, the alignment property of these
components is ignored.
------------------------------------------------------------------------
G.6. User Interface: FontSize Property
When browsing the FontSize property in the Property Editor, the same list
of font sizes is displayed for every font, regardless of whether each
size is supported on the current machine. If an unsupported FontSize
is selected, VisualAge for Basic will use the closest supported FontSize.
------------------------------------------------------------------------
G.7. User Interface: Long File Names in the FileListBox component
On Windows95, the FileListBox component does not display any long file
names. Also, it does not display any file names in a long subdirectory
name. This problem does not occur on OS/2 and Windows NT.
------------------------------------------------------------------------
H. Communication Components
------------------------------------------------------------------------
------------------------------------------------------------------------
H.1.1. Communication Components: SOM requirement
All the Communication Components (APPC, ASYNC, HLLAPI, NetBIOS, TCP/IP)
are created with SOM classes, so you need to set up your environment
to make SOM available on OS/2, Windows NT, and Windows 95.
------------------------------------------------------------------------
H.2.1. NetBIOS: No-Wait functions
In this version, NetBIOS does not support No-Wait functions even if you
can find the API names in the ccnetapi.idl.
------------------------------------------------------------------------
H.2.2. NetBIOS: Sequence octet data type
Some APIs use SOM's sequence octet data type, so when you invoke a
method of NetBIOS or NetBiosAPI class you are required to convert the
received/sent data to an appropriate data type.
e.g.,
If the received data can be processed as a string, first you need
to receive the data in a data type that can handle binary data,
then convert to string data type, or something appropriate.
When sending data, you may code as follows:
Dim IntArrayBuf(50) As Integer
Dim testdata As String
Dim netbios As NetBiosAPI
Set netbios = New NetBiosAPI
testdata = "(Client) SEND-Data from SendWait."
For i = 1 to 32
IntArrayBuf(i-1) = Asc(Mid$(testdata, i, 1))
Next i
rc = netbios.SendWait(0, ncb_lsn, IntArrayBuf, 33)
When receiving data, you may code as follows:
Dim receivebuf As String * 512
Dim IntArrayBuf(50) As Integer
Dim netbios As NetBiosAPI
Set netbios = New NetBiosAPI
rc = netbios.ReceiveWait(0, ncb_lsn, IntArrayBuf, ncb_length)
If rc <> 0 Then
'MsgBox "ReceiveWait error RC = " & rc
GoTo EndProcess
Else
For i = 0 to 511
Mid(receivebuf, i+1, 1) = Chr$( IntArrayBuf(i) )
Next i
'MsgBox "ReceiveWait succeeded!"
End If
To know which API uses SOM sequence octet data type, please refer to
ccnetapi.idl or ccnetapv.idl.
------------------------------------------------------------------------
H.3.1. TCP/IP: Sock_init method
For Windows, Sock_init method issues WSAStartup() system call that
assumes the WinSock version is 1.1 on the Windows environments.
------------------------------------------------------------------------
H.3.2. TCP/IP: Sock_errno method
The Sock_errno method returns the error code set by the last issued
socket call. When a socket call has an error, the return value of
the sock_errno() (OS/2) or WSAGetLastError()(Windows) system calls are
stored in an internal variable, and the value is returned when this
method is called. On OS/2, the Sock_errno method also returns the value
of h_errno for gethostbyaddr() and gethostbyname() calls.
------------------------------------------------------------------------
H.3.3. TCP/IP: ConnectTimeOut property
For OS/2, the ConnectTimeOut property does not affect the ConnectStart
method. This means no timeout occurs and the control immediately returns
an error when connection is not established.
------------------------------------------------------------------------
H.3.4. TCP/IP: Naming convention
The method names of TCPIPSockAPI are almost based on the Socket API
function names. But there are some differences between them because
of the differences across operating systems.
OS/2 Windows Method Name
-------------------------------------------------------
ioctl() ioctosocket() Ioctlsocket()
soclose() closesocket() Soclose()
sock_init() WSAStartup()(*1) Sock_Init()
sock_errno()(*2) WSAGetLastError()(*2) Sock_errno()
(*1) Please refer the "Sock_init method" in this file.
(*2) Please refer the "Sock_errno method" in this file.
------------------------------------------------------------------------
H.4.1. ASYNC: Event driven programming (OnComm/SThreshold/RThreshold)
The OnComm event does not work on all platforms. So, even if you
changed the value of SThreshold/RThreshold value, you will not trigger
events. This means that you cannot write an "Event driven"
asynchronous program using CCCOM. Instead, use the polling mechanism
program described in the example/tutorial.
For an error during a binary file transfer, you can get the error status
by getting the value of FxStatus Property.
------------------------------------------------------------------------
H.4.2. ASYNC: AutoPortOpen
If you set the AutoPortOpen property to False and start the project,
CCCOM automatically searches and opens an available serial port, if
possible. After that, if you set the AutoPortOpen to False, the port is
not open when you set the CommPort property. If you set AutoPortOpen
to True, the port will be opened automatically when you change or
set the CommPort property.
------------------------------------------------------------------------
H.4.3. ASYNC: Sample program
In the ASYNC sample program in ...\samples\comm\async, when you
push the "File Receive" or "File Send" buttons, a file transferred
message appears immediately on the TextBox1. But the actual file
transfer is going in a separate thread. You can confirm real transfer
completion by getting the value of FxStatus. If the file transfer is
on going, FxStatus is 4. If it completed, it will be 0.
------------------------------------------------------------------------
H.4.4. ASYNC: Binary file transfer
When using the Binary file transfer functions of CCCOM component:
- In YMODEM and ZMODEM, you can not download more than 1 file at
one time. If you set the Download property to "", only 1 file
will be stored.
- In the ZMODEM protocol, XferFileSize sometimes indicate a size
twice as much as the original size.
- XMODEM is more stable than YMODEM and ZMODEM. ZMODEM also is slower.
The use of XMODEM is strongly recommended.
------------------------------------------------------------------------
H.5.1. HLLAPI: Multiple instances of Esession component
When you create more than 2 Esession components in a project, you cannot
assign separate SessionID property values for each component. Once you
change the SessionID of one component, the other component's SessionID
will be changed to the same ID.
------------------------------------------------------------------------
H.5.2. HLLAPI: String return data
Some methods of Ehllapi SOM class returns a string data (e.g.
QuerySessions, QuerySessionStatus, etc.). You can not get the entire
value as in REXX-HLLAPI because the data after NULL will be lost and
is not seen in Basic. "Lost" information includes Host Row/Column and
Codepage information. To see these values, read the corresponding
properties of the Esession component.
------------------------------------------------------------------------
I. Country-specific information
------------------------------------------------------------------------
------------------------------------------------------------------------
I.1. Country: DBCS Font Name
Statements in the Sub main in samples\db2api\util.bas and in
samples\cli\samputil.bas set the font name for the iOutput form
to "Courier" so that output can be displayed in aligned columns.
In a DBCS environment, the Courier font cannot display double-byte
characters; therefore, DBCS users should change the font name to
MINCHO or some other DBCS font.
------------------------------------------------------------------------
I.2. Country: DBCS Data in CLI calls
When passing arguments that contain DBCS characters in CLI calls, be
sure to use byte counting, not character counting, functions like LenB,
InStrB, MidB.
------------------------------------------------------------------------
I.3. Country: Distribution of INTSTRNG.DLL
All the country dependent functions, such as IME (Input Method Editor)
related functions and DBCS character comparison functions, are stored in
the DLL named INTSTRNG.DLL. If you distribute an executable file which
calls INTSTRNG.DLL, in Japan, make the directory named "081" (for OS/2)
or "JPN" (for Windows) under the subdirectory that stores other DLL
files, then put the INTSTRNG.DLL there.
------------------------------------------------------------------------
I.4. Country: Italian Codepage for AIX
When using the remote debugging feature of the VisualAge for Basic
Server on AIX on an Italian RS/6000, some characters may not display
correctly using the default locale installed on the server. The locale
IBM 850 will display characters correctly. Characters affected are ones
with accents and other features.
------------------------------------------------------------------------
I.5. Country: Entering special characters in the Property Editor
When using the Alt + <ASCII code> sequence to enter a character, some
sequence numbers will not work correctly in the Property Editor (ex.,
Alt + 163 will tab into another property). To get around this problem,
set the Num Lock key on. Some numbers may appear along with the desired
character, but these can be removed using the Delete or Backspace keys.
------------------------------------------------------------------------
I.6. Country: Displaying DBCS errors message on AIX server
When using the Remote Debug capabilities of VisualAge for Basic Server
on an AIX server using a DBCS locale, enter the following settings in
the .Xdefaults file of the userid that owns the DB2/6000 database
instance(s):
*fontList: -dt-interface user-medium-r-normal-l*-*:
*XmText.fontList: -dt-interface user-medium-r-normal-l*-*:
This setting is needed to display correctly error messages containing
double-byte characters.
------------------------------------------------------------------------
I.7. Country: Displaying Simplified Chinese characters in the Code
Editor
The default System font on the Simplified Chinese version of Windows NT
and Windows 95 is a True Type font. The code editor of VisualAge for
Basic does not display Simplified Chinese characters correctly when
using this font. To correct the problem, select a non-True Type font,
such as MINCHO or the "Ming" font, and enable this font in the Code
Editor. Example:
1) Edit the file \VABASIC\CONFIG\INSTPREF.INI
2) In the [Application] stanza, add the following lines:
EditComponents.Font.FontName=MINCHO
EditComponents.Font.Size=12
3) Save this file, and restart VisualAge for Basic
------------------------------------------------------------------------
I.8. Country: Cursor position on a character in the Code Editor.
For SBCS characters, the cursor should appear along the front edge of the
current character. For DBCS characters, the cursor may appear further
within the current character.
------------------------------------------------------------------------
I.9. Country: KeyAscii value of KeyPress event
In any DBCS environment, KeyAscii value of KeyPress event does not
carry the correct double byte character code.
On OS/2, the bytes are returned in the reverse order.
On Windows, only the first byte of the DBCS character is returned.
This function works correctly for the SBCS input.