PreviousIf You're Using... COBOL System Library RoutinesNext

Chapter 3: Migrating from 16-bit

If you have come to Net Express from the 16-bit system Object COBOL V3.4 or Workbench V3.4, or you should be aware of the following issues arising from the move to 32-bit.

For advice on moving from 16-bit Dialog System V2.5, see the online book Dialog System User's Guide.

3.1 Description of Features

Features are listed alphabetically. If a feature isn't mentioned, we believe no change is needed.

3.1.1 List of Features


3.1.1.1 PC_WIN... Printer Routines

Library routines to handle a printer.

These are not in Net Express. You should change your code to call the equivalent portable routines that have the prefix PC_PRINTER.


3.1.1.2 Call-by-Number Routine - x"91" Function 69

Library routine to scan a directory.

On 32-bit Windows, a parameter of "*" doesn't pick up any filename with an extension, whereas on 16-bit Windows it does.


3.1.1.3 Call-by-Number Routine - x"d0"

Library routine to allocate memory.

The call-by-number routine x"d0" is superseded by the CBL_ALLOC_MEM routine, which you should use for preference.

Memory allocated using the call-by-number routine x"d0" is always initialized to spaces in this product. In the 16-bit COBOL systems, if the DEFAULT-BYTE directive is used to set the default filler byte to a value other than the default (spaces), x"d0" memory is initialized to that new value. Although not documented behavior, your program might be relying on this. Ensure that you explicitly initialize any x"d0" data, rather than relying on what the run-time system has initialized it to.


3.1.1.4 Call-by-Name Routine - CBL_CHANGE_DIR

Library routine for changing the current directory.

On 32-bit Windows, if you include a drive-name in the directory specification, the current drive is also changed. On 16-bit Windows, the current drive is always left unchanged.


3.1.1.5 Call-by-Name Routines for Handling Virtual Colormaps

16-bit:
The following three call-by-name routines are available only on 16-bit COBOL systems:

CBL_SCR_CREATE_VC Create an alternative colormap
CBL_SCR_ALLOCATE_VC_COLOR Store colors in the virtual colormap
CBL_SCR_DESTROY_VC Reinstate the system colormap

3.1.1.6 CCI filenames

CCI user-level filenames are different for 32-bit. They are as follows:

ccixx32.lib
ccixx32.dll

where xx represents the protocol supported, and is one of the following:

TC TCP/IP (CCITCP)
NB NetBEUI (CCINETB)
IX Novell IPX (CCIIPX)
DE Dynamic Data Exchange (CCIDDE)

In all environments where CCITP process registration demons are available this module is provided as ccitcp2.exe.


3.1.1.7 Compiler Directives

The following compiler directives available in the 16-bit COBOL systems are not needed on 32-bit Object COBOL systems, including Net Express. You need not remove these directives from your existing code, as the compiler issues an "Ignored" message and continues:

64KPARA FASTLINK PROTMODE
64KSECT FIXING REGPARM
AUXOPT MASM SEGCROSS
BADSIGNS MODEL SEGSIZE
CHECKNUM OPTSIZE SIGNCOMPARE
DATALIT OPTSPEED SMALLDD
EANIM PARAMCOUNTCHECK TABLESEGCROSS
EXPANDDATA PARAS TRICKLECHECK

The following directives are available in both 16-bit and 32-bit but are intended for use only in 16-bit. You should remove them from your code for Net Express.

01SHUFFLE
CHIP
FLAG-CHIP

The directive GNT is used to create .gnt code. The 16-bit directive OMF"GNT" is also supported and has the same effect.

The ASMLIST directive is supported but behaves differently.

The TARGET directive is supported, but does not accept arguments pertinent to 16-bit.

The TRICKLE directive is supported but is generally not needed, as the 32-bit compiler can work out if a program trickles.


3.1.1.8 Litlinked Calls

Calls that are coded using the "__" (double-underscore) prefix should be recoded to use call convention 8. We strongly recommend this method for forcing a litlinked call. If you need to litlink calls using the double underscore convention, then you should compile the program using the LITLINK(2) Compiler directive.

You can statically link individual calls by using call convention 8. Using this call convention on a CALL literal statement causes the Compiler to declare the literal as an external symbol, so it is resolved at link time, rather than at run time. This call convention can be combined with other call conventions. For example, call convention 10 gives a static linked call to a sub-program which removes the parameters from the stack.


3.1.1.9 Panels Version 2

3-D objects drawn using Panels Version 2 look smaller on Net Express than on 16-bit. Net Express uses the native Windows 95 or Windows NT 3-D effects, instead of the public domain DLL used on 16-bit. On 16-bit, a 3-D sunken border is drawn around the outside of controls such as entry fields, list boxes and combo boxes. With the native effects, the border is drawn around the inside of the controls, so the resulting controls look smaller.


3.1.1.10 Run-time Configuration

In Net Express you can, in addition to run-time switches, also configure certain run-time behavior through the following run-time configurables:


3.1.1.11 Run-time Switches

The following run-time switches, which are available in the 16-bit COBOL systems, either are not available or have a different meaning in Net Express:

A* K1 L5 S6
B2* K2 L6 /h
C* K3 M* /s
C1 L M2 /m
C2 L1 P /p
F1 L2 P1
G L3 S2
I1 L4 S3

* These switches have a different meaning in Net Express.

If your application is explicitly reading or setting any of these switches, you should remove these dependencies on them.


Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousIf You're Using... COBOL System Library RoutinesNext