<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dataflex.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mikepeat</id>
	<title>DataFlex Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dataflex.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mikepeat"/>
	<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Special:Contributions/Mikepeat"/>
	<updated>2026-04-30T16:20:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Using_the_REST_Library&amp;diff=3507</id>
		<title>Using the REST Library</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Using_the_REST_Library&amp;diff=3507"/>
		<updated>2022-01-25T15:39:58Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Changing where to get the library&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The simple example of a [[RESTful Service Theory|RESTful service]] set out in the article [[A Simple RESTful Service]] involved quite a bit of work to produce an API for only one table.&lt;br /&gt;
&lt;br /&gt;
An alternative approach is to use the REST library I ([[user:mikepeat|Mike]]) have created, which can be downloaded from &amp;lt;s&amp;gt;[[File:RESTLibrary.zip]]&amp;lt;/s&amp;gt; (that one now obsolete) [https://github.com/DataFlexCode/UIG-REST-Library here] on [https://github.com/DataFlexCode GitHub/DataFlexCode].&lt;br /&gt;
&lt;br /&gt;
To use it, &amp;lt;s&amp;gt;unzip that file&amp;lt;/s&amp;gt; download it (via a Git &amp;quot;pull&amp;quot; request) into some directory, then, from the workspace you are developing in, use that as a library; in the Studio do: Tools --&amp;gt; Maintain Libraries... --&amp;gt; Add Library, then navigate to where you &amp;lt;s&amp;gt;unzipped&amp;lt;/s&amp;gt; downloaded it and within it select the &amp;quot;RESTLibrary.sws&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
That will add a new section to the Studio&#039;s Class Palette entitled &amp;quot;REST&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
With the WebApp project selected in the Studio, do: File --&amp;gt; New --&amp;gt; Other --&amp;gt; DataFlex Source File, naming it, for this example, &amp;quot;WebOrderAPI&amp;quot;, which will create a blank package file. Into that, from the new REST section of the class palette, drag an object of the cRESTfulService class. Rename the object &#039;&#039;&#039;oWebOrderAPI&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Then again do: File --&amp;gt; New --&amp;gt; Other --&amp;gt; DataFlex Source File, this time naming it &#039;&#039;&#039;ApiCustomersHandler&#039;&#039;&#039;. Into that blank file drag an object of the cRestResourceHandler class. Change the object&#039;s name to oApiCustomersHandler and set its psInterfacePath property (an empty string by default) to &amp;quot;&#039;&#039;&#039;customers&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Then in the DDO Explorer pane (lower-right in the Studio by default) click the &amp;quot;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;+&amp;lt;/font&amp;gt;&amp;quot; book icon (Add DDO: [[File:Add DD.jpg|15px]]) and select the cCustomerDataDictionary.&lt;br /&gt;
&lt;br /&gt;
Drag a cRESTApiObject from the class palette to below the comment &amp;quot;&#039;&#039;Add your cRESTApiObjects here&#039;&#039;&amp;quot;. Rename it to &amp;quot;oCustomers&amp;quot;. Set its phoDD property to oCustomer_DD, its psCollName (collection name) property to &amp;quot;&#039;&#039;&#039;customers&#039;&#039;&#039;&amp;quot; (plural) and its psInstName (instance name) property to &amp;quot;&#039;&#039;&#039;customer&#039;&#039;&#039;&amp;quot; (singular).&lt;br /&gt;
&lt;br /&gt;
Uncomment one of the &amp;quot;Send AddListColumn&amp;quot; lines and change its &amp;quot;Table.Column&amp;quot; to &#039;&#039;&#039;Customer.Customer_Number&#039;&#039;&#039;, then copy that line and make the copy for &#039;&#039;&#039;Customer.Name&#039;&#039;&#039;. (You can keep adding those to your heart&#039;s content, but lists should be sparing of such detail.)&lt;br /&gt;
&lt;br /&gt;
Go back to your WebOrderAPI file and under the comment line: &#039;Add &amp;quot;Use&amp;quot; statements for your cResourceHandler objects here:&#039; add the line: &amp;quot;&#039;&#039;&#039;Use APICustomersHandler.pkg&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For development you may want to change the pbVerboseErrors setting to True, although for deployment it should probably be set back to False, to avoid confusing users with a pile of technical detail, which they neither should, nor want to, be exposed to.&lt;br /&gt;
&lt;br /&gt;
You should perhaps, for future-proofing a real API, change the psPath setting from its default of &amp;quot;api&amp;quot; to &amp;quot;&#039;&#039;&#039;api/v1&#039;&#039;&#039;&amp;quot; (to provide for v2, v3 and so on in the future) - Note: this will change the URL which you use to make calls to it.&lt;br /&gt;
&lt;br /&gt;
That should leave you with (some additional comments are mine):&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WebOrderAPI.pkg&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Use cRESTfulService.pkg&lt;br /&gt;
&lt;br /&gt;
Object oWebOrderAPI is a cRESTfulService&lt;br /&gt;
    Set psPath to &amp;quot;api/v1&amp;quot;       // Changed to provide for future versions&lt;br /&gt;
    Set pbVerboseErrors to True  // For development only, return to False for deployment&lt;br /&gt;
    &lt;br /&gt;
    // Add &amp;quot;Use&amp;quot; statements for your cResourceHandler objects here:&lt;br /&gt;
    Use APICustomersHandler.pkg  // You add this line&lt;br /&gt;
    &lt;br /&gt;
    Procedure APIRoot&lt;br /&gt;
        Handle hoResp&lt;br /&gt;
        &lt;br /&gt;
        Get CreateJsonObject to hoResp&lt;br /&gt;
        Send AddRegisteredCollections hoResp        &lt;br /&gt;
        &lt;br /&gt;
        Send OutputJson hoResp&lt;br /&gt;
    End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    Procedure ProcessHttpRequest String sVerb&lt;br /&gt;
        String sPart0&lt;br /&gt;
        &lt;br /&gt;
        Get PathPart 0 to sPart0&lt;br /&gt;
        Move (Lowercase(sPart0)) to sPart0&lt;br /&gt;
        &lt;br /&gt;
        Case Begin&lt;br /&gt;
        &lt;br /&gt;
            Case ((sVerb = C_httpGet) and (sPart0 = &amp;quot;&amp;quot;))&lt;br /&gt;
                Send APIRoot&lt;br /&gt;
                Case Break&lt;br /&gt;
            &lt;br /&gt;
            Case (IsRegisteredPath(Self, sPart0))&lt;br /&gt;
                Send AutoProcess sPart0&lt;br /&gt;
                Case Break&lt;br /&gt;
        &lt;br /&gt;
            Case Else&lt;br /&gt;
                Send UnrecognisedOperation&lt;br /&gt;
                Case Break&lt;br /&gt;
        &lt;br /&gt;
        Case End&lt;br /&gt;
        &lt;br /&gt;
    End_Procedure&lt;br /&gt;
&lt;br /&gt;
End_Object&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;APICustomersHandler.pkg&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Use cRESTResourceHandler.pkg&lt;br /&gt;
Use cCustomerDataDictionary.dd&lt;br /&gt;
Use cRESTAPIObject.pkg&lt;br /&gt;
&lt;br /&gt;
Object oAPICustomersHandler is a cRESTResourceHandler&lt;br /&gt;
// Add your data-dictionary objects here&lt;br /&gt;
&lt;br /&gt;
    // Use the DDO Explorer in the Studio to select DDOs:&lt;br /&gt;
    Object oCustomer_DD is a cCustomerDataDictionary&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Set Main_DD to oCustomer_DD&lt;br /&gt;
&lt;br /&gt;
    Set psInterfacePath to &amp;quot;customers&amp;quot;  // We have to set this&lt;br /&gt;
&lt;br /&gt;
// Add your cRESTApiObjects here (below the Set Main_DD line)&lt;br /&gt;
&lt;br /&gt;
    // Simply drag cRESTApiObjects here from the Studio&#039;s Class Palette&lt;br /&gt;
    Object oCustomer is a cRESTApiObject&lt;br /&gt;
        Set phoDD       to oCustomer_DD  // We have to set these three&lt;br /&gt;
        Set psCollName  to &amp;quot;customers&amp;quot;   // properties for the object&lt;br /&gt;
        Set psInstName  to &amp;quot;customer&amp;quot;    // to work properly&lt;br /&gt;
        &lt;br /&gt;
        // Send AddListColumn File_Field Table.Column&lt;br /&gt;
        Send AddListColumn File_Field Customer.Customer_Number  // These lines determine&lt;br /&gt;
        Send AddListColumn File_Field Customer.Name             // the columns in the list&lt;br /&gt;
        &lt;br /&gt;
        Procedure PostProc Handle hoResp Integer iMode&lt;br /&gt;
            Forward Send PostProc hoResp iMode&lt;br /&gt;
            &lt;br /&gt;
            // Add dependant collections (or other links) in here, e.g.:&lt;br /&gt;
            // Send AddCollection hoResp &amp;quot;{name}&amp;quot; (InstURL(Self, iMode) + &amp;quot;/{collectionName}&amp;quot;)&lt;br /&gt;
            // Send AddLink hoResp &amp;quot;{name}&amp;quot; {identifier} {URL}&lt;br /&gt;
        End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
End_Object&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can immediately see the saving: 81 lines (most of which were written for you and a couple of which are comments I have added for clarification) vs. the 574 lines in the [[A Simple RESTful Service|Simple]] example, while most of the functionality is essentially the same (a careful examination will reveal a bit more &amp;quot;[https://en.wikipedia.org/wiki/HATEOAS &#039;&#039;HATEOAS&#039;&#039;]&amp;quot;-type information in some of the returned JSON in the former).&lt;br /&gt;
&lt;br /&gt;
In addition, this approach has much more generality and extensibility: additional cRESTApiObjects, and the corresponding DDOs, can be added to the cApiCustomersHandler to provide for dependant sub-collections (since customers have orders, and orders have details), while other cRESTResourceHandler objects can be added to handle other top-level collections (orders, vendors, inventory, salespeople and so on).&lt;br /&gt;
&lt;br /&gt;
The library (in the cRESTApiObjects) provides mechanisms to exclude specific fields from the interface (Send AddExcludeColumn &#039;&#039;Table.Column&#039;&#039;), or mark them as read-only through it (Send AddReadOnlyColumn &#039;&#039;Table.Column&#039;&#039;), include parent columns in collections or instances (through the AddListColumn and AddInstanceColumn procedures) and even provide calculated pseudo-columns (AddListFunctionColumn and AddInstanceFunctionColumn). Entire collections can be set as read-only (pbReadOnly), no-update (pbNoUpdate) or no-delete (pbNoDelete).&lt;br /&gt;
&lt;br /&gt;
In your browser, or testing tool such as [https://www.getpostman.com/ Postman] or the DataFlex [[Consuming RESTful Services in DataFlex|RESTTest view]] in another article in this series, you can access this one as &amp;quot;.../api/v1&amp;quot; (or just &amp;quot;.../api&amp;quot; if you didn&#039;t make the versioning change to the psPath setting).&lt;br /&gt;
&lt;br /&gt;
====Security====&lt;br /&gt;
&lt;br /&gt;
This example does not have any security built into it yet, but the cRESTfulService class does understand a bit about Basic Auth, so we can add the following short OnPreRequest procedure to the oWebOrderAPI object:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
    Procedure OnPreRequest String sVerb String sPath&lt;br /&gt;
        tBasicAuthCredentials tCreds&lt;br /&gt;
        Boolean bOK&lt;br /&gt;
        &lt;br /&gt;
        Set psUsername to &amp;quot;&amp;quot;  // Reset it to blank at the start of *every* request&lt;br /&gt;
        Get BasicAuthCredentials to tCreds&lt;br /&gt;
        &lt;br /&gt;
        If (tCreds.sUserName &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Begin&lt;br /&gt;
            Clear WebAppUser&lt;br /&gt;
            Move tCreds.sUserName to WebAppUser.LoginName&lt;br /&gt;
            Find Eq WebAppUser by Index.1&lt;br /&gt;
            &lt;br /&gt;
            If (Found) Begin&lt;br /&gt;
                Move (ComparePasswords(ghoWebSessionManager, Trim(WebAppUser.Password), ;&lt;br /&gt;
                                                             tCreds.sPassword)) to bOK&lt;br /&gt;
                                                             &lt;br /&gt;
                If bOK ;&lt;br /&gt;
                    Set psUsername to tCreds.sUserName&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
    End_Procedure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, that relies on the ComparePasswords function of the WebSessionManager object, which will not be present in a Basic Web Project, so if using such, you would have to replace that, perhaps with a simple:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
                Move (Trim(WebAppUser.Password) = Trim(tCreds.sPassword)) to bOK&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which assumes that you are not using encrypted passwords, however how to handle those is left as an exercise for the reader!&lt;br /&gt;
&lt;br /&gt;
Then at the top of the file add &amp;quot;&#039;&#039;&#039;Open WebAppUser&#039;&#039;&#039;&amp;quot;, while at the top of the oWebOrderAPI object add &amp;quot;&#039;&#039;&#039;Property String psUsername&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Finally, right at the beginning of the ProcessHttpRequest procedure add:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
        If (psUsername(Self) = &amp;quot;&amp;quot;) Begin&lt;br /&gt;
            Send BasicAuthRequired &amp;quot;Web Order API&amp;quot;&lt;br /&gt;
            Procedure_Return&lt;br /&gt;
        End&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fuller instructions for creating an API using the REST library can be found in [https://docs.google.com/document/d/1N3BvvygKfjKO_5TMosWrR8aahI-5VOz6-z-8jSqA_to/edit?usp=sharing my course notes from Synergy 2019], although complete documentation for the library has sadly yet to make it to the top of my &#039;&#039;ToDo&#039;&#039; pile (it will be a &#039;&#039;lot&#039;&#039; of work).&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
*[[REST]]&lt;br /&gt;
*[[RESTful Service Theory]]&lt;br /&gt;
*[[RESTful Services in DataFlex]]&lt;br /&gt;
*[[Consuming RESTful Services in DataFlex]]&lt;br /&gt;
*[[Creating RESTful Services in DataFlex]]&lt;br /&gt;
*[[A Simple RESTful Service]]&lt;br /&gt;
* https://github.com/DataFlexCode/UIG-REST-Library&lt;br /&gt;
&lt;br /&gt;
[[Category:REST]][[Category:Web Services]]&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=CIniFile&amp;diff=3488</id>
		<title>CIniFile</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=CIniFile&amp;diff=3488"/>
		<updated>2021-08-11T08:01:31Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Sets _not_ Gets!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An object of the &#039;&#039;&#039;cIniFile&#039;&#039;&#039; class can be used for reading information avaiable from an INI file.&lt;br /&gt;
&lt;br /&gt;
INI files are often used to store user preferences or setup options for applications.&lt;br /&gt;
&lt;br /&gt;
==INI files==&lt;br /&gt;
In [[Visual DataFlex]] you can freely use as many INI files as you require, however the two-level structure of INI files (sections and keys) means that there is often no need to use more than one.  Here, for example, is a boot.ini file (usually found in the root directory of the system drive of Windows operating systems):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[boot loader]&lt;br /&gt;
timeout=30&lt;br /&gt;
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS&lt;br /&gt;
&lt;br /&gt;
[operating systems]&lt;br /&gt;
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=&amp;quot;Microsoft Windows XP Professional&amp;quot; /fastdetect /NoExecute=OptIn&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, it defines two sections - [boot loader] and [operating systems] - each with different settings within them.&lt;br /&gt;
&lt;br /&gt;
==Visual DataFlex Workspace files==&lt;br /&gt;
Another example are the workspace configuration files used by [[Visual DataFlex]] itself (by default named &amp;quot;Config.ws&amp;quot;, showing that they don&#039;t have to use the .ini extension - see the article in &amp;quot;See Also&amp;quot; below), which must exist in the same directory the program is run from (usually the &amp;quot;Programs&amp;quot; subdirectory of the workspace).  Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Workspace]&lt;br /&gt;
Home=..\&lt;br /&gt;
AppSrcPath=.\AppSrc&lt;br /&gt;
AppHTMLPath=.\AppHtml&lt;br /&gt;
BitmapPath=.\Bitmaps&lt;br /&gt;
IdeSrcPath=.\IdeSrc&lt;br /&gt;
DataPath=.\Data&lt;br /&gt;
DDSrcPath=.\DdSrc&lt;br /&gt;
HelpPath=.\Help&lt;br /&gt;
ProgramPath=.\Programs&lt;br /&gt;
FileList=.\Data\Filelist.cfg&lt;br /&gt;
Description=MyFirstProject&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here only a single section - [Workspace] - is defined, however the fact that an INI file can have as many sections as it needs means that you can use this very file to set up options for how you want your program to behave.&lt;br /&gt;
&lt;br /&gt;
Note that section names (the ones in the square brackets), key names (&amp;quot;Home&amp;quot;, &amp;quot;AppSrcPath&amp;quot;, etc.) and key values can all contain spaces (although for my own part I prefer not to use those and depend on [http://en.wikipedia.org/wiki/Camelcase camelCase] to supply readability).&lt;br /&gt;
&lt;br /&gt;
==INI file advantages==&lt;br /&gt;
The advantage of the INI file approach is that it can make programs configurable for different environments or uses without them having to be recompiled with different settings each time: the program can be made with a set of default values which can then be overridden at run-time by the settings in an INI file.  It has the advantage over Registry settings, which perform very much the same function, in that you don&#039;t need any special rights on the machine to set it up and make changes to it: you are just working with text files, so security policy issues about who has rights to the [http://en.wikipedia.org/wiki/Windows_Registry Windows Registry], or who can run RegEdit or RegEdit32 do not apply - if you can run Notepad and modify files you can configure your application.&lt;br /&gt;
&lt;br /&gt;
Here is an example where an additional section allowing the configuration of a database location and login has been added:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Workspace]&lt;br /&gt;
Home=..\&lt;br /&gt;
AppSrcPath=.\AppSrc&lt;br /&gt;
AppHTMLPath=.\AppHtml&lt;br /&gt;
BitmapPath=.\Bitmaps&lt;br /&gt;
IdeSrcPath=.\IdeSrc&lt;br /&gt;
DataPath=.\Data&lt;br /&gt;
DDSrcPath=.\DdSrc&lt;br /&gt;
HelpPath=.\Help&lt;br /&gt;
ProgramPath=.\Programs&lt;br /&gt;
FileList=.\Data\Filelist.cfg&lt;br /&gt;
Description=MyFirstProject&lt;br /&gt;
 &lt;br /&gt;
[Database Login]&lt;br /&gt;
Server=big-iron.database-servers.local&lt;br /&gt;
Login=itsme&lt;br /&gt;
Password=letmein&lt;br /&gt;
Database=Accounting&lt;br /&gt;
Driver=MSSQLDRV&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Combining these factors - the fact that there is probably no need to have more than one INI file, and the fact that [[Visual DataFlex]] requres one anyway - means that for most purposes you can just add what you need to the existing workspace configuration file.&lt;br /&gt;
&lt;br /&gt;
==Accessing INI files==&lt;br /&gt;
So how do you access that information in your program?&lt;br /&gt;
&lt;br /&gt;
For most purposes the information in an INI file will only be read at program start-up.  This means that (a) the oApplication object is a good place to do such things (see the article in  &amp;quot;See Also&amp;quot; below for some guidance on sub-classing the cApplicatiion class) and (b) the cIniFile object need not be retained after it has been used.  (Of course you might have different requirements, but here we will assume these are true.)&lt;br /&gt;
&lt;br /&gt;
So... in your oApplication object (perhaps in the &amp;quot;OnCreate&amp;quot; procedure, perhaps elsewhere, such as in &amp;quot;Construct_Object&amp;quot; or &amp;quot;End_Construct_Object&amp;quot;) what you need to do is dynamically create a cIniFile object, use it to get the information you want, then destroy it again.  You also want to be able to access the workspace configuration file for the application, perhaps without knowing ahead of time what that is actually called.&lt;br /&gt;
&lt;br /&gt;
Here is one way of doing it (&#039;&#039;&#039;&#039;&#039;note&#039;&#039;&#039; - this code is assumed to be in the oApplication object or a sub-class of the cApplication class; the only place this matters is in the &amp;quot;Set psFileName ...&amp;quot; line, where &amp;quot;Self&amp;quot; will refer to the oApplication object, and where the various properties are held&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String  sServer sLogin sPW sDrv sDB&lt;br /&gt;
Boolean bLogin&lt;br /&gt;
Handle  hoIni&lt;br /&gt;
 &lt;br /&gt;
// Retrieve your application defaults into local variables&lt;br /&gt;
Get psServer   to sServer&lt;br /&gt;
Get psLogin    to sLogin&lt;br /&gt;
Get psPassword to sPW&lt;br /&gt;
Get psDriver   to sDrv&lt;br /&gt;
Get psDatabase to sDB&lt;br /&gt;
Get pbDoLogin  to bDB&lt;br /&gt;
&lt;br /&gt;
Get Create U_cIniFile to hoIni    // Create INI file object&lt;br /&gt;
&lt;br /&gt;
// Make it use the workspace configuration file&lt;br /&gt;
Set psFileName of hoIni to (psWorkspaceWSFile(phoWorkspace(Self)))&lt;br /&gt;
&lt;br /&gt;
// Read the information&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Server&amp;quot;,   sServer)) to sServer&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Login&amp;quot;,    sLogin))  to sLogin&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Password&amp;quot;, sPW))     to sPW&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Driver&amp;quot;,   sDrv))    to sDrv&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Database&amp;quot;, sDB))     to sDB&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;DoLogin&amp;quot;,  bLogin))  to bLogin&lt;br /&gt;
&lt;br /&gt;
Send Destroy of hoIni             // And Destroy it again&lt;br /&gt;
&lt;br /&gt;
// Set the properties to make the information persistent&lt;br /&gt;
Set psServer   to sServer&lt;br /&gt;
Set psLogin    to sLogin&lt;br /&gt;
Set psPassword to sPW&lt;br /&gt;
Set psDriver   to sDrv&lt;br /&gt;
Set psDatabase to sDB&lt;br /&gt;
Set pbDoLogin  to bDB&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will retrieve the values set in the second workspace file example above.  Note that in that example, the &amp;quot;DoLogin&amp;quot; value is not present - the &amp;quot;&#039;&#039;ReadString&#039;&#039;&amp;quot; method of the cIniFile class lets you supply a default value to use if the setting is not present, and here we have used the bLogin variable, which was set from the pbDoLogin property, and which is then used to set that property again... so the fact that the setting is absent (not &amp;quot;&#039;&#039;missing&#039;&#039;&amp;quot; - it is deliberate!) means that the default property remains unchanged.&lt;br /&gt;
&lt;br /&gt;
You could save some code by not retrieving the properties into local variables first, but using the properties as defaults directly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dataflex&amp;quot;&amp;gt;&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Server&amp;quot;,   psServer(Self)))   to sServer&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Login&amp;quot;,    psLogin(Self)))    to sLogin&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Password&amp;quot;, psPassword(Self))) to sPW&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Driver&amp;quot;,   psDriver(Self)))   to sDrv&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Database&amp;quot;, psDatabase(Self))) to sDB&lt;br /&gt;
Move (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;DoLogin&amp;quot;,  pbDoLogin(Self)))  to bLogin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or even dispense with the local variables completely:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dataflex&amp;quot;&amp;gt;&lt;br /&gt;
Set psServer   to (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Server&amp;quot;,   psServer(Self)))&lt;br /&gt;
Set psLogin    to (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Login&amp;quot;,    psLogin(Self)))&lt;br /&gt;
Set psPassword to (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Password&amp;quot;, psPassword(Self)))&lt;br /&gt;
Set psDriver   to (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Driver&amp;quot;,   psDriver(Self)))&lt;br /&gt;
Set psDatabase to (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;Database&amp;quot;, psDatabase(Self)))&lt;br /&gt;
Set pbDoLogin  to (ReadString(hoIni, &amp;quot;Database Login&amp;quot;, &amp;quot;DoLogin&amp;quot;,  pbDoLogin(Self)))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But some might consider that a bridge too far!&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
The cIniFile has other methods as well: it can write as well as read (WriteString, DeleteKey and DeleteSection) and can dynamically determine the contents of the file (ReadSections, ReadSection, SectionExists and KeyExists) - see the VDF Help for full information - but the ReadString method is the one you will need in most circumstances.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Passing the workspace as a parameter]]&lt;br /&gt;
&lt;br /&gt;
== External references ==&lt;br /&gt;
* http://en.wikipedia.org/wiki/INI_file&lt;br /&gt;
&lt;br /&gt;
[[Category: Tutorials]]  [[Category: Cookbook]]&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3457</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3457"/>
		<updated>2021-05-20T13:27:38Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Location&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Filelist Entries&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data File Field Names&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
===Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
====How to write correct code for Multiuser Coding Examples:====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating a new record:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Editing an existing record:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Copying data from an existing record in FILE to a new record in NEWFILE:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
====Error 4098 &amp;quot;Bad Relationship&amp;quot;====&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
====Error 4141 &amp;quot;Data set files must support transaction&amp;quot;====&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
====Zerofile command====&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
====Modified Runtimes====&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
====Graphics Commands====&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
===DFAdmin===&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
===DFConfig===&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
===DFMaint===&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
===DFQuery===&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
===DFSetup===&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
===DFSort - Index Utility===&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
*DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
*Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
*Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
===Y2K-Enhanced Features===&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Epoch_Value&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
*If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
*If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SysDate4_State&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Date4_State&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
&lt;br /&gt;
*For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Conv2000 Utility===&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
===Implementation of Y2K-Enhanced Features===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataFlex 3.2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
===Use y2k.pkg===&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A Brief Overview of Y2K.pkg&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Separation Process&#039;&#039;&#039; (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
*Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area. This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
*Create a shared data directory.&lt;br /&gt;
*You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
*How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
:all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
:all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
*Switch to c:\df23 directory&lt;br /&gt;
*Set the DFPATH environment variable:&lt;br /&gt;
*set DFPATH=.;c:\app\data&lt;br /&gt;
*Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
*Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the &#039;&#039;&#039;Data Access Support Forums&#039;&#039;&#039;: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transformation - Converting DataFlex 2.3b Applications to Revision 3.0&#039;&#039;&#039;, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating to Windows with Visual DataFlex&#039;&#039;&#039;, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataFlex and the Year 2000&#039;&#039;&#039;, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataFlex and DLLs&#039;&#039;&#039; White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data Definition in Visual DataFlex&#039;&#039;&#039;, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transactions in DataFlex 3.1&#039;&#039;&#039;, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Online Documentation for DataFlex&#039;&#039;&#039;: https://docs.dataaccess.com/&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98&#039;&#039;&#039;, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConver utility&#039;&#039;&#039;, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Data Access Knowledge Base&#039;&#039;&#039;: https://www.dataaccess.com/Resources/Knowledge-Base-1114. &lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3456</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3456"/>
		<updated>2021-05-20T13:23:19Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Splitting lines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Filelist Entries&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data File Field Names&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
===Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
====How to write correct code for Multiuser Coding Examples:====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating a new record:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Editing an existing record:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Copying data from an existing record in FILE to a new record in NEWFILE:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
====Error 4098 &amp;quot;Bad Relationship&amp;quot;====&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
====Error 4141 &amp;quot;Data set files must support transaction&amp;quot;====&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
====Zerofile command====&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
====Modified Runtimes====&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
====Graphics Commands====&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
===DFAdmin===&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
===DFConfig===&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
===DFMaint===&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
===DFQuery===&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
===DFSetup===&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
===DFSort - Index Utility===&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
*DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
*Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
*Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
===Y2K-Enhanced Features===&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Epoch_Value&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
*If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
*If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SysDate4_State&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Date4_State&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
&lt;br /&gt;
*For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Conv2000 Utility===&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
===Implementation of Y2K-Enhanced Features===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataFlex 3.2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
===Use y2k.pkg===&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A Brief Overview of Y2K.pkg&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Separation Process&#039;&#039;&#039; (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
*Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area. This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
*Create a shared data directory.&lt;br /&gt;
*You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
*How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
:all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
:all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
*Switch to c:\df23 directory&lt;br /&gt;
*Set the DFPATH environment variable:&lt;br /&gt;
*set DFPATH=.;c:\app\data&lt;br /&gt;
*Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
*Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the &#039;&#039;&#039;Data Access Support Forums&#039;&#039;&#039;: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transformation - Converting DataFlex 2.3b Applications to Revision 3.0&#039;&#039;&#039;, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Migrating to Windows with Visual DataFlex&#039;&#039;&#039;, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataFlex and the Year 2000&#039;&#039;&#039;, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataFlex and DLLs&#039;&#039;&#039; White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data Definition in Visual DataFlex&#039;&#039;&#039;, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Transactions in DataFlex 3.1&#039;&#039;&#039;, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; 3.2 Installation &amp;amp; Environment Guide&#039;&#039;&#039;, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Online Documentation for DataFlex&#039;&#039;&#039;: https://docs.dataaccess.com/&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98&#039;&#039;&#039;, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConver utility&#039;&#039;&#039;, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Data Access Knowledge Base&#039;&#039;&#039;: https://www.dataaccess.com/Resources/Knowledge-Base-1114. &lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3455</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3455"/>
		<updated>2021-05-20T12:50:58Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Lines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Filelist Entries&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data File Field Names&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
===Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
====How to write correct code for Multiuser Coding Examples:====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating a new record:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Editing an existing record:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Copying data from an existing record in FILE to a new record in NEWFILE:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
====Error 4098 &amp;quot;Bad Relationship&amp;quot;====&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
====Error 4141 &amp;quot;Data set files must support transaction&amp;quot;====&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
====Zerofile command====&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
====Modified Runtimes====&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
====Graphics Commands====&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
===DFAdmin===&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
===DFConfig===&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
===DFMaint===&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
===DFQuery===&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
===DFSetup===&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
===DFSort - Index Utility===&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
*DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
*Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
*Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
===Y2K-Enhanced Features===&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Epoch_Value&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
*If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
*If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SysDate4_State&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Date4_State&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
&lt;br /&gt;
*For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Conv2000 Utility===&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
===Implementation of Y2K-Enhanced Features===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DataFlex 3.2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
===Use y2k.pkg===&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A Brief Overview of Y2K.pkg&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Separation Process&#039;&#039;&#039; (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
*Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area. This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
*Create a shared data directory.&lt;br /&gt;
*You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
*How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
:all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
:all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
*Switch to c:\df23 directory&lt;br /&gt;
*Set the DFPATH environment variable:&lt;br /&gt;
*set DFPATH=.;c:\app\data&lt;br /&gt;
*Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
*Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base: http://www.dataaccess.com/kbase.asp&lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3454</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3454"/>
		<updated>2021-05-20T12:45:59Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Utilities headings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Filelist Entries&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data File Field Names&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
===Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
====How to write correct code for Multiuser Coding Examples:====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating a new record:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Editing an existing record:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Copying data from an existing record in FILE to a new record in NEWFILE:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
====Error 4098 &amp;quot;Bad Relationship&amp;quot;====&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
====Error 4141 &amp;quot;Data set files must support transaction&amp;quot;====&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
====Zerofile command====&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
====Modified Runtimes====&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
====Graphics Commands====&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
===DFAdmin===&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
===DFConfig===&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
===DFMaint===&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
===DFQuery===&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
===DFSetup===&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
===DFSort - Index Utility===&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Separation Process&#039;&#039;&#039; (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
*Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area. This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
*Create a shared data directory.&lt;br /&gt;
*You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
*How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
:all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
:all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
*Switch to c:\df23 directory&lt;br /&gt;
*Set the DFPATH environment variable:&lt;br /&gt;
*set DFPATH=.;c:\app\data&lt;br /&gt;
*Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
*Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base: http://www.dataaccess.com/kbase.asp&lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3453</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3453"/>
		<updated>2021-05-20T12:43:19Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Runtime errors headings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Filelist Entries&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data File Field Names&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
===Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
====How to write correct code for Multiuser Coding Examples:====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creating a new record:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Editing an existing record:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Copying data from an existing record in FILE to a new record in NEWFILE:&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
====Error 4098 &amp;quot;Bad Relationship&amp;quot;====&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
====Error 4141 &amp;quot;Data set files must support transaction&amp;quot;====&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
====Zerofile command====&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
====Modified Runtimes====&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
====Graphics Commands====&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort - Index Utility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Separation Process&#039;&#039;&#039; (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
*Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area. This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
*Create a shared data directory.&lt;br /&gt;
*You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
*How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
:all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
:all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
*Switch to c:\df23 directory&lt;br /&gt;
*Set the DFPATH environment variable:&lt;br /&gt;
*set DFPATH=.;c:\app\data&lt;br /&gt;
*Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
*Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base: http://www.dataaccess.com/kbase.asp&lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3452</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3452"/>
		<updated>2021-05-19T18:00:29Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Headings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Filelist Entries&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Data File Field Names&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort - Index Utility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Separation Process&#039;&#039;&#039; (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
*Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area. This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
*Create a shared data directory.&lt;br /&gt;
*You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
*How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
:all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
:all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
*Switch to c:\df23 directory&lt;br /&gt;
*Set the DFPATH environment variable:&lt;br /&gt;
*set DFPATH=.;c:\app\data&lt;br /&gt;
*Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
*Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base: http://www.dataaccess.com/kbase.asp&lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3451</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3451"/>
		<updated>2021-05-19T17:58:57Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Spacing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort - Index Utility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Separation Process&#039;&#039;&#039; (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
*Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area. This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
*Create a shared data directory.&lt;br /&gt;
*You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
*How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
:all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
:all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
*Switch to c:\df23 directory&lt;br /&gt;
*Set the DFPATH environment variable:&lt;br /&gt;
*set DFPATH=.;c:\app\data&lt;br /&gt;
*Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
*Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base: http://www.dataaccess.com/kbase.asp&lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3450</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3450"/>
		<updated>2021-05-19T17:56:42Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Lists&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort - Index Utility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Separation Process&#039;&#039;&#039; (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
*Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area. This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
*Create a shared data directory.&lt;br /&gt;
*You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
*How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
:all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
:all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;c:\df32\usr\examples\big;c:\df32\usr\examples\report;c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
*Switch to c:\df23 directory&lt;br /&gt;
*Set the DFPATH environment variable:&lt;br /&gt;
*set DFPATH=.;c:\app\data&lt;br /&gt;
*Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
*Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3449</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3449"/>
		<updated>2021-05-19T17:50:15Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Heading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The -x23 Compiler Flag&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort - Index Utility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3448</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3448"/>
		<updated>2021-05-19T17:49:36Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Headings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort - Index Utility&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3447</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3447"/>
		<updated>2021-05-19T17:45:17Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3446</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3446"/>
		<updated>2021-05-19T17:42:34Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Indent&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
 read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
 read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3445</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3445"/>
		<updated>2021-05-19T17:33:58Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFPATH Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The DFENV Environment Variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Other Environment Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HOME&#039;&#039;&#039; is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFPROG&#039;&#039;&#039; is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PATH&#039;&#039;&#039; is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3444</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3444"/>
		<updated>2021-05-19T17:32:29Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Tidy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3443</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3443"/>
		<updated>2021-05-19T17:30:03Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Indent&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set32.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
 set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
 set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
 set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
 echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \app\src&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Set23.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
 @echo off&lt;br /&gt;
 echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
 set DFENV=        REM blank DFENV env. variable&lt;br /&gt;
 set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
 set DFPROG=.;&lt;br /&gt;
 echo Switching to DataFlex 2.3b Area&lt;br /&gt;
 c:&lt;br /&gt;
 cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3442</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3442"/>
		<updated>2021-05-19T17:26:25Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Indent&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert.&lt;br /&gt;
:: To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3441</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3441"/>
		<updated>2021-05-19T17:23:43Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Files list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx     cleanup.src    customer.dat    customer.fd&lt;br /&gt;
 customer.flx    customer.frm   customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx     custrpt.rpt    date.flx        date.frm&lt;br /&gt;
 dbread.flx      dbread.src     delqry.flx      delqry.src&lt;br /&gt;
 dfask.com       dfauto.exe     dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe      dffile.exe     dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe     dfrun.exe      dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe        flex.cfl       flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd     flexerrs.frm   flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev    haloact2.prn   haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn    halocm25.dev   halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn    halodblo.prn   halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn    halogeni.dev   halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev     haloibme.dev   haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev    haloimwr.prn   haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn    haloljtp.prn   halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev    halopal.prn    halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn    haloqdcl.dev   haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev    halosigm.dev   halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev     halotjet.prn   halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev    invoice.flx    invoice.frm     invt.dat&lt;br /&gt;
 invt.fd         invt.flx       invt.frm        invt.k1&lt;br /&gt;
 invt.k2         invt.k3        invt.tag        items.dat&lt;br /&gt;
 items.fd        items.k1       items.k2        items.tag&lt;br /&gt;
 menu.flx        menu.dat       menu.tag        menu.fd&lt;br /&gt;
 menu.src        menudef.flx    menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx    movement.rpt   pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat       query.tag      query.fd        query.k1&lt;br /&gt;
 query.hlp       read.flx       read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd      sysfile.tag    termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd       vendor.flx     vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag      venrpt.flx     venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3440</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3440"/>
		<updated>2021-05-19T17:16:31Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3439</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3439"/>
		<updated>2021-05-19T17:13:30Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Indent&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3438</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3438"/>
		<updated>2021-05-19T17:12:03Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
* EXCEPTION: You can run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3437</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3437"/>
		<updated>2021-05-19T17:11:15Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
* EXCEPTION: You can run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;,etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE,etc.), provided the expression is used in parentheses.&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Result&lt;br /&gt;
&lt;br /&gt;
 Expression     DataFlex 2.3b  DataFlex 3.2&lt;br /&gt;
 showln (A + B)	    5            &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	    6            &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	    1            &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3435</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3435"/>
		<updated>2021-05-19T11:18:07Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Tabs away!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Batch File: c:\df32\usr\setpath.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; (String(iRev)) &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort&#039;&#039;&#039; - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
 cleanup.flx    cleanup.src     customer.dat    customer.fd&lt;br /&gt;
 customer.flx   customer.frm    customer.k1     customer.tag&lt;br /&gt;
 custrpt.flx    custrpt.rpt     date.flx        date.frm&lt;br /&gt;
 dbread.flx     dbread.src      delqry.flx      delqry.src&lt;br /&gt;
 dfask.com      dfauto.exe      dfcomp.exe      dfconver.exe&lt;br /&gt;
 dfedit.exe     dffile.exe      dfindex.exe     dfpack.exe&lt;br /&gt;
 dfquery.exe    dfrun.exe       dfsetup.exe     filelist.cfg&lt;br /&gt;
 flex.exe       flex.cfl        flexerrs.flx    flexerrs.dat&lt;br /&gt;
 flexerrs.fd    flexerrs.frm    flexerrs.tag    fmac&lt;br /&gt;
 halo3270.dev   haloact2.prn    haloamde.dev    halocljt.prn&lt;br /&gt;
 haloclsr.prn   halocm25.dev    halocolm.prn    halocono.dev&lt;br /&gt;
 halocrna.prn   halodblo.prn    halodeba.dev    haloepjx.prn&lt;br /&gt;
 haloepsn.prn   halogeni.dev    halogncm.prn    haloherc.dev&lt;br /&gt;
 haloibm.dev    haloibme.dev    haloibmg.dev    haloicba.dev&lt;br /&gt;
 haloimgt.dev   haloimwr.prn    haloinda.dev    halojlsr.prn&lt;br /&gt;
 halolasr.prn   haloljtp.prn    halomits.prn    halomult.dev&lt;br /&gt;
 halonine.dev   halopal.prn     halopalm.dev    halopcjr.dev&lt;br /&gt;
 haloprsm.prn   haloqdcl.dev    haloquad.dev    haloquad.prn&lt;br /&gt;
 haloscio.dev   halosigm.dev    halostb.dev     halotecm.dev&lt;br /&gt;
 halotex.dev    halotjet.prn    halotosh.prn    halovdaa.dev&lt;br /&gt;
 halowyse.dev   invoice.flx     invoice.frm     invt.dat&lt;br /&gt;
 invt.fd        invt.flx        invt.frm        invt.k1&lt;br /&gt;
 invt.k2        invt.k3	        invt.tag        items.dat&lt;br /&gt;
 items.fd       items.k1        items.k2        items.tag&lt;br /&gt;
 menu.flx       menu.dat        menu.tag        menu.fd&lt;br /&gt;
 menu.src       menudef.flx     menudef.src     modmenu.flx&lt;br /&gt;
 movement.flx   movement.rpt    pn90230.23b     pn90250.23b&lt;br /&gt;
 query.dat      query.tag       query.fd        query.k1&lt;br /&gt;
 query.hlp      read.flx        read.src        sysfile.dat&lt;br /&gt;
 sysfile.fd     sysfile.tag     termlist.cfg    vendor.dat&lt;br /&gt;
 vendor.fd      vendor.flx      vendor.frm      vendor.k1&lt;br /&gt;
 vendor.tag     venrpt.flx      venrpt.rpt      version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base http://www.dataaccess.com/kbase.asp&lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3434</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3434"/>
		<updated>2021-05-19T11:11:33Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows 95/98/ME&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\windows\command.com&lt;br /&gt;
&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
 Working: c:\app\data&lt;br /&gt;
&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Batch File: c:\df32\usr\setpath.bat&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;An Example Shortcut on Windows NT/2000/XP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; (String(iRev)) &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort&#039;&#039;&#039; - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base http://www.dataaccess.com/kbase.asp&lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3433</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3433"/>
		<updated>2021-05-19T10:52:15Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Formatting &amp;amp; updated forums&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; (String(iRev)) &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort&#039;&#039;&#039; - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: https://support.dataaccess.com/.&lt;br /&gt;
&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base http://www.dataaccess.com/kbase.asp&lt;br /&gt;
&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3432</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3432"/>
		<updated>2021-05-19T10:46:38Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Bolding &amp;amp; lists&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; (String(iRev)) &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFAdmin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
*Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
*It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
*Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
*Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFConfig&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
*Accelerator key definition&lt;br /&gt;
*Color settings&lt;br /&gt;
*Appearance settings for things like currency&lt;br /&gt;
*Date and number format settings&lt;br /&gt;
*Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFMaint&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
*Indexing utility&lt;br /&gt;
*Cleanup utility&lt;br /&gt;
*Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DFSort&#039;&#039;&#039; - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3431</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3431"/>
		<updated>2021-05-19T10:44:00Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Source&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; (String(iRev)) &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
*NEWFILE is a data file where a new record is being created&lt;br /&gt;
*FILE is a data file with an existing record&lt;br /&gt;
*VAR is a variable in the program code&lt;br /&gt;
&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3430</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3430"/>
		<updated>2021-05-19T10:39:51Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Casing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
Get_Attribute DF_File_Revision of CUSTOMER.File_Number to iRev&lt;br /&gt;
Showln &amp;quot;File Revision of Customer File: &amp;quot; (String(iRev)) &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String A&lt;br /&gt;
String B&lt;br /&gt;
Move &amp;quot;3&amp;quot; to A&lt;br /&gt;
Move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3429</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3429"/>
		<updated>2021-05-19T10:37:01Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: underscore&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You &amp;lt;u&amp;gt;can&amp;lt;/u&amp;gt; run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
get_Attribute DF_File_Revision of CUSTOMER.File_Number ;&lt;br /&gt;
    to iRev&lt;br /&gt;
showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
string A&lt;br /&gt;
string B&lt;br /&gt;
move &amp;quot;3&amp;quot; to A&lt;br /&gt;
move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3428</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3428"/>
		<updated>2021-05-19T10:35:57Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: List&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You can run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
*termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
*filelist.cfg&lt;br /&gt;
*data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
*compiled DataFlex programs: *.flx&lt;br /&gt;
*source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
get_Attribute DF_File_Revision of CUSTOMER.File_Number ;&lt;br /&gt;
    to iRev&lt;br /&gt;
showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
string A&lt;br /&gt;
string B&lt;br /&gt;
move &amp;quot;3&amp;quot; to A&lt;br /&gt;
move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3427</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3427"/>
		<updated>2021-05-19T10:34:45Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: List&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
** FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
** EXCEPTION: You can run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
get_Attribute DF_File_Revision of CUSTOMER.File_Number ;&lt;br /&gt;
    to iRev&lt;br /&gt;
showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
string A&lt;br /&gt;
string B&lt;br /&gt;
move &amp;quot;3&amp;quot; to A&lt;br /&gt;
move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3426</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3426"/>
		<updated>2021-05-19T10:32:50Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Code sample&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
String sDirSeparator&lt;br /&gt;
move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
* EXCEPTION: You can run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
get_Attribute DF_File_Revision of CUSTOMER.File_Number ;&lt;br /&gt;
    to iRev&lt;br /&gt;
showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
string A&lt;br /&gt;
string B&lt;br /&gt;
move &amp;quot;3&amp;quot; to A&lt;br /&gt;
move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3425</id>
		<title>Upgrading to DataFlex 3.2</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Upgrading_to_DataFlex_3.2&amp;diff=3425"/>
		<updated>2021-05-19T10:30:48Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Marking code samples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Before you read any further, you need to be aware that DataFlex 3.2 Character Mode is a legacy, unsupported product. That said, we know there are still organisations working with earlier versions of DataFlex Character Mode, who may want to upgrade to v3.2.&lt;br /&gt;
&lt;br /&gt;
This page should be read by anyone upgrading to DataFlex 3.2 from any prior revision. It discusses issues commonly encountered when upgrading. Although the main focus is on changes from revision 2.3 to 3.2, many of the issues discussed here apply to other revisions as well. Specific references to revisions other than 2.3 and 3.2 are made expressly wherever necessary.&lt;br /&gt;
&lt;br /&gt;
The content of this page is based on a whitepaper originally written in May 1998 by Dennis Piccioni from Data Access Worldwide. Updates were made to the content up until 2002, but nothing after that, so some references will be dated.&lt;br /&gt;
&lt;br /&gt;
== Why Upgrade? ==&lt;br /&gt;
&lt;br /&gt;
There are many valid reasons to upgrade to DataFlex 3.2, the most current revision of character-mode DataFlex. Here are just a few of them:&lt;br /&gt;
&lt;br /&gt;
*; Supported Platforms&lt;br /&gt;
: DataFlex 3.2 is tested and supported under the following current operating systems and network operating systems:&lt;br /&gt;
&lt;br /&gt;
:* DOS 6.22&lt;br /&gt;
:* Microsoft Windows 98 SE&lt;br /&gt;
:* Microsoft Windows NT 4 SP6a Workstation and Server&lt;br /&gt;
:* Windows 2000 SP1&lt;br /&gt;
:* SCO Unixware / SCO 7&lt;br /&gt;
:* Hewlett-Packard HP-UX 10.20&lt;br /&gt;
:* IBM AIX 4.2&lt;br /&gt;
:* SCO UNIX Open Server Enterprise 5.04&lt;br /&gt;
:* Sun Solaris 2&lt;br /&gt;
:* Red Hat Linux version 5.0 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
:* Caldera Linux version 1.2 (and higher), kernel 2.2.14 (and higher)&lt;br /&gt;
&lt;br /&gt;
While DataFlex was released prior to Windows ME and XP and thus is not fully tested and supported on those platforms, we have received no reports of unusual problems on those platforms.&lt;br /&gt;
&lt;br /&gt;
*; DOS and Console Mode Runtimes&lt;br /&gt;
:Under Windows 98, ME, NT 4, 2000 and XP, you have a choice of 2 different runtimes for running your DataFlex application. DataFlex 3.2 comes with the standard DOS runtime, dfrun.exe, and a Windows console mode runtime, dfruncon.exe, which gives you several features unique to Windows applications:&lt;br /&gt;
&lt;br /&gt;
:* The ability to load drivers, such as the DataFlex Btrieve driver and the DataFlex ODBC driver.&lt;br /&gt;
:* Use the Windows memory manager instead of the DOS4G memory manager that the DOS runtime uses.&lt;br /&gt;
:* Ability to make DLL calls. See the white paper DataFlex and DLLs for more information on this topic.&lt;br /&gt;
:* Both dfrun.exe and dfruncon.exe are 32-bit programs.&lt;br /&gt;
:*  No recompilation is necessary, simply run dfrun or dfruncon, depending on your need.&lt;br /&gt;
&lt;br /&gt;
*;Object-oriented programming&lt;br /&gt;
:DataFlex was the first fully object-oriented 4th generation programming language (4GL). However, it still fully supports procedural code (in character-mode revisions, not VDF), and even mixed-mode programming.&lt;br /&gt;
&lt;br /&gt;
*;Extended Filelist &lt;br /&gt;
&lt;br /&gt;
:The DataFlex 3.2/Visual DataFlex filelist has been extended from 255 to 4095 data files, eliminating the need for use of multiple filelists for large projects.&lt;br /&gt;
&lt;br /&gt;
:Note: Be careful when mixing data files used with extended filelists in older environments that do not support the extended filelist. Data files that relate to other data files that have file numbers above 255 are changed to file version 4, which cannot be used by older DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;Index Optimization&lt;br /&gt;
:Prior to DataFlex 3.1, all online indexes were updated during every save. Now, only the affected indexes (e.g. those indexes that had a segment value changed) are updated.&lt;br /&gt;
&lt;br /&gt;
:A second index optimization affects record finding. If a data file is searched using an index, the complete record buffer is not pulled into memory unless a field that does not appear in the search index is referenced.&lt;br /&gt;
&lt;br /&gt;
*;Lock Optimization&lt;br /&gt;
:In older DataFlex revisions, when a lock was issued, all open data files were locked. When using object-oriented code with Data_Sets or DataDictionaries in DataFlex 3.2 or VDF, only the files in the current Data_Set or DataDictionary structure are locked.&lt;br /&gt;
&lt;br /&gt;
*;Changing Data File Definitions in a DataFlex Program&lt;br /&gt;
:In DataFlex 3.2 and Visual DataFlex, changes that previously could only be made in the DataFlex utilities, for example DFFile, can now be made in a DataFlex program using API commands. Now you can simply send your customers a disk or email with a DataFlex program that will upgrade their file definition, as opposed to going to the customer site, or sending a consultant, to run DFFile to update the customer&#039;s data files.&lt;br /&gt;
&lt;br /&gt;
:Read more about updating data file definitions in Data Access Nederland&#039;s white paper Data Definition in Visual DataFlex. Most of the code in this paper, with the exception of user interface code, can be used in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
:You can also find information about this topic in the 3.2 and VDF help under:&lt;br /&gt;
&lt;br /&gt;
:* Set_Attribute command&lt;br /&gt;
:* Structure_Start command&lt;br /&gt;
:* Structure_End command&lt;br /&gt;
&lt;br /&gt;
*;Text and Binary Field Support&lt;br /&gt;
:These new field types were added in DataFlex revision 3.0.&lt;br /&gt;
&lt;br /&gt;
*;Character Mode DataDictionary Support&lt;br /&gt;
:The proven DataDictionary technology from Visual DataFlex is integrated into and fully supported in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
== Running on Linux and Unix ==&lt;br /&gt;
&lt;br /&gt;
There are a few differences between the Dos/Windows and Linux and Unix platforms.&lt;br /&gt;
&lt;br /&gt;
*;Path Separator&lt;br /&gt;
:The path separator in Linux and Unix is “/” (slash or forward slash), not “\” (backslash), as in DOS/Windows. In most cases, this paper will use &amp;quot;\&amp;quot; to display DataFlex paths (e.g. &amp;quot;c:\df32\usr&amp;quot;). Please substitute forward slashes as needed.&lt;br /&gt;
&lt;br /&gt;
:If you are writing applications for DOS/Windows and Linux/Unix platforms, you should use the Sysconf function with the Sysconf_Dir_Separator to obtain the path separator in your program code:&lt;br /&gt;
&lt;br /&gt;
::String sDirSeparator&lt;br /&gt;
::move (Sysconf (SYSCONF_DIR_SEPARATOR)) to sDirSeparator&lt;br /&gt;
&lt;br /&gt;
*;Install Location&lt;br /&gt;
:The default install location for DataFlex 3.2 on DOS/Windows is c:\df32.&lt;br /&gt;
:The default install location for DataFlex 3.2 on Linux/Unix is /usr/local/df32.&lt;br /&gt;
&lt;br /&gt;
*;Batch files versus Shell Scripts&lt;br /&gt;
:Where batch files are used in DOS/Windows environments, shell scripts are used in Linux/Unix.&lt;br /&gt;
&lt;br /&gt;
*;File Casing&lt;br /&gt;
:DataFlex source code files in Linux/Unix must have all lowercase names.&lt;br /&gt;
&lt;br /&gt;
:On the new DataFlex 3.2 for Linux CD (part # 555260cd), we have provided 2 shell scripts to aid you in converting your existing files to lowercase names: lcase and lcaser. The lcase script lowercases all files in a single directory and the lcaser script lowercases all files in a directory and all subdirectories of that directory. To execute either script, simply type the script name, with no arguments, in a terminal changed to the directory you wish to affect:&lt;br /&gt;
&lt;br /&gt;
::cd /usr/local/df32/mysourcecode&lt;br /&gt;
::lcase&lt;br /&gt;
&lt;br /&gt;
*;Binary Compatibility&lt;br /&gt;
:DOS/Windows and Linux DataFlex files (data files and programs) created on any Intel x86 platform are binary-compatible, which means that they can be compiled on one platform and run on the other. If you transfer files between platforms using FTP, just transfer binary files using binary mode in FTP.&lt;br /&gt;
&lt;br /&gt;
== Converting Data Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 (and Visual DataFlex) can read from and write to DataFlex data files from revisions as old as 2.3. You do not have to upgrade data files if your file revision of your data files is at least 2.3. However, you can gain new functionality and data integrity by doing so.&lt;br /&gt;
&lt;br /&gt;
Here is a complete breakdown of what needs to be done and what can be done with data files from various DataFlex revisions.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.1 &amp;amp; Visual DataFlex&lt;br /&gt;
:DataFlex 3.2, 3.1 and Visual DataFlex share a common database engine (when using DataFlex data files). Therefore, data files created in these revisions are 100% compatible with each other.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 3.0 - 3.05&lt;br /&gt;
:Data files created between revisions 3.0 and 3.05 have the same file format as DataFlex 3.2 and VDF. However, some bits of the data file were unused at the time. One of these bits is used in DataFlex 3.2 for the Transaction Type setting.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex 2.3b&lt;br /&gt;
:Data files from revision 2.3b can be accessed by all current DataFlex revisions, so it is not necessary to upgrade the file format. If any change to the file definition a 2.3b data file is made using revision 3.X, the file format is automatically updated to the format of that revision.&lt;br /&gt;
&lt;br /&gt;
:There are several valid and useful reasons to upgrade your data files to 3.2/VDF format. This format has several new capabilities and features:&lt;br /&gt;
&lt;br /&gt;
::;* Header Integrity Checking (Introduced in 3.0)&lt;br /&gt;
::: this creates a .hdr file for the specified .dat file, which contains a copy of the data file&#039;s header. Sometimes when a data file is corrupted, the corruption is only in the header of the data file. In that case, if header integrity checking is turned on, this can be fixed easily.&lt;br /&gt;
::;* Dynamic Data Compression (Introduced in 3.0)&lt;br /&gt;
::: There are three types of on-the-fly data compression available, which saves hard disk space with very little overhead.&lt;br /&gt;
::;* Transaction Tracking Support (Introduced in 3.1)&lt;br /&gt;
::: Support for Novell Netware&#039;s Transaction Tracking (TTS). This creates much better data integrity and transaction support when using Netware. &amp;lt;br&amp;gt; Data files created in DataFlex revisions prior to 3.1 will default to a Transaction Type setting of Client_Atomic, which is also the default setting when creating a new data file in DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.3b Revisions (Revisions 2.1 - 2.2)&lt;br /&gt;
:If you are converting from DataFlex revisions prior to 2.3b, you must use revision 2.3b as a go-between.  DataFlex 2.3b came with a utility called dfconver.exe. Executing this utility will automatically convert all data files to 2.3b format.&lt;br /&gt;
&lt;br /&gt;
:You can download the DFConver utility from the DAC FTP Site separately from DataFlex 2.3b. Detailed instructions are provided in the downloaded file.&lt;br /&gt;
&lt;br /&gt;
:DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
&lt;br /&gt;
*;DataFlex Pre-2.1 Revisions (2.0e and below)&lt;br /&gt;
:Data files from these revisions cannot be converted using any utility. These files need to be exported to ASCII (plain text) files and read back into a current (2.3b or greater) data file.&lt;br /&gt;
&lt;br /&gt;
:Note: Whenever a data file format is upgraded to a higher revision, the prior revision can no longer read the changed data files. This rule applies to changes for these revisions:&lt;br /&gt;
&lt;br /&gt;
::* Pre-2.3b to 2.3b (and higher)&lt;br /&gt;
::* 2.3b to 3.X/VDF&lt;br /&gt;
:Note: DataFlex revisions 3.0 - 3.05 can access 3.2/VDF data files, but this should not be done if those files are using Novell Netware&#039;s Transaction Tracking (TTS) in DataFlex 3.2/VDF.&lt;br /&gt;
&lt;br /&gt;
*;Converting Data Files to Revision 3.2 Format&lt;br /&gt;
:If you do want to convert all your data files to 3.2 format, you can do so using the DFMaint utility:&lt;br /&gt;
&lt;br /&gt;
# Go to a command prompt.&lt;br /&gt;
# Run \df32\usr\setpath.bat or other batch process to set your environment for DataFlex 3.2.&lt;br /&gt;
# Run DFMaint.exe.&lt;br /&gt;
# Select &amp;quot;Filelist&amp;quot; from the &amp;quot;Maintenance&amp;quot; menu.&lt;br /&gt;
# Highlight the file to convert. &amp;lt;br &amp;gt; To select all files, choose &amp;quot;Select All&amp;quot; from the &amp;quot;Filelist&amp;quot; menu.&lt;br /&gt;
# Choose &amp;quot;Convert&amp;quot; from the &amp;quot;Database&amp;quot; menu.&lt;br /&gt;
# You will be prompted whether to use a temporary file or convert in place. We recommend the default, &amp;quot;Use temp file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Converting Program Files to the Current Revision ==&lt;br /&gt;
&lt;br /&gt;
* In order to upgrade to a newer revision of DataFlex, you must recompile your source code file(s) to create new DataFlex programs.&lt;br /&gt;
FOR EXAMPLE: A program compiled under DataFlex revision 2.3b will not run under revision 3.2.&lt;br /&gt;
* EXCEPTION: You can run programs compiled under DataFlex revision 2.3 with a 3.0 or 3.01 runtime.&lt;br /&gt;
* You can run programs compiled with the same major revision but a different letter revision, but we recommend always recompiling and running using the identical revision.&lt;br /&gt;
&lt;br /&gt;
== Invalid Characters in Data File Field Names and Data File Rootnames ==&lt;br /&gt;
&lt;br /&gt;
There are a few conventions that were commonly used by DataFlex 2.3 developers that may present problems in DataFlex 3.2. One of these conventions was the use of an &amp;quot;@&amp;quot; character and other undocumented characters in front of the data file rootname in filelist entries and/or the use of such characters in front of data file field names.&lt;br /&gt;
&lt;br /&gt;
This was never supported and will no longer work, because DataFlex now has the ability to use other database drivers, make API calls and other such options, which cannot support such characters at the runtime and driver levels. Even the DataFlex 2.3 User&#039;s Guide documented that the only characters allowed for field names are letters, numbers, underscore (&amp;quot;_&amp;quot;) or the pound sign (&amp;quot;#&amp;quot;), and the field name must start with a letter.&lt;br /&gt;
&lt;br /&gt;
Filelist Entries&lt;br /&gt;
&lt;br /&gt;
In order to remove the invalid characters from filelist entries, you can run the DataFlex File Maintenance Utility (dfmaint).&lt;br /&gt;
&lt;br /&gt;
1. From the Maintenance pulldown menu, select Filelist to display the current filelist entries.&lt;br /&gt;
&lt;br /&gt;
2. Select the filelist entry you wish to edit and press &amp;lt;Enter&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Common symptoms experienced are the inability to open the menu.dat file in the menu program. In this case, you want to select filelist entry number 49, the DataFlex Menu File.&lt;br /&gt;
&lt;br /&gt;
3. Make sure that the rootname does not contain any illegal characters such as &amp;quot;@&amp;quot; or &amp;quot;:&amp;quot;, such as a commonly used rootname entry in DataFlex 2.3b: &amp;quot;@:menu&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Data File Field Names&lt;br /&gt;
&lt;br /&gt;
In order to remove invalid characters from File.Field definitions, you need to open the file using DFFile, the DataFlex File Definition Utility. Some commands, make_file for example, will not work properly with invalid characters in front of file.field names.&lt;br /&gt;
&lt;br /&gt;
Note: You can still use the &amp;quot;@&amp;quot; character in front of a data file&#039;s User Display Name to hide that data file from the user in DFQuery.&lt;br /&gt;
&lt;br /&gt;
== Upgrading Source Code to DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
Properly written source code from prior revisions of DataFlex is fully compatible with revision 3.2 and should compile and operate without problem. The DataFlex 2.3 compiler and runtime were not as strict as the newer versions. In some cases, improper code was allowed to compile and/or run under DataFlex 2.3b, but will generate compiler or runtime errors when used with a newer revision of DataFlex. Data Access Corporation cannot warrant the validity of source code written by someone outside of DAC in every case.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting DataFlex 3.2 ==&lt;br /&gt;
&lt;br /&gt;
The DFPATH Environment Variable&lt;br /&gt;
&lt;br /&gt;
This is the most important environment variable from a DataFlex viewpoint. DataFlex uses this variable to find everything it needs:&lt;br /&gt;
&lt;br /&gt;
termlist.cfg &amp;amp; *.dfr for registration information&lt;br /&gt;
filelist.cfg&lt;br /&gt;
data files: *.dat, *.fd, *.k*, *.tag, *.hdr, *.vld&lt;br /&gt;
compiled DataFlex programs: *.flx&lt;br /&gt;
source code for DataFlex programs: *.src, *.frm, *.inc, *.pkg, ...&lt;br /&gt;
If there are multiple copies of any of the above files along the directories listed in DFPATH, DataFlex will use the first copy that it finds.&lt;br /&gt;
&lt;br /&gt;
The DFENV Environment Variable&lt;br /&gt;
&lt;br /&gt;
The DFENV environment variable was added in DataFlex 3.2 to work around DOS and Windows operating system limitations, such as command line length and environment space.&lt;br /&gt;
&lt;br /&gt;
DFENV points to a file called dfenv.cfg. The variables set in this file will override any variables of the same name in your environment. If dfenv.cfg contains a  DFPATH environment variable, and your current environment also has DFPATH set, the one in DFENV will be used (provided the DFENV environment variable is set). To see your current environment variables, type &amp;quot;set&amp;quot; and press &amp;lt;Enter&amp;gt; at the command prompt.&lt;br /&gt;
&lt;br /&gt;
Other Environment Variables&lt;br /&gt;
&lt;br /&gt;
HOME is an environment variable set in many networking environments, and it may interfere with DataFlex 3.2 running properly if it points to a directory containing another version of DataFlex or parts thereof (watch for files like termlist.cfg and *.dfr - frequent culprits). Specifically, the DataFlex runtime looks for a copy of termlist.cfg first in the directory specified by HOME. Perhaps the best method to avoid problems with HOME is to never store a termlist.cfg file in the directory HOME points to.&lt;br /&gt;
&lt;br /&gt;
DFPROG is an older environment variable used in versions of DataFlex prior to 3.2. You can ignore it or eliminate it from your DataFlex 3.2 environment.&lt;br /&gt;
&lt;br /&gt;
PATH is the environment variable that the operating system uses to find executable files (programs) such as; dfrun.exe, dfcomp.exe, etc.. The directory where the DataFlex executables are located must be part of the PATH environment variable. In the case of DataFlex 2.3b, that directory is c:\df23 and for DataFlex 3.2 that directory is c:\df32\bin (/usr/local/df32/bin on Linux/Unix).&lt;br /&gt;
&lt;br /&gt;
If you experience problems running DataFlex 3.2; just to play it safe, eliminate any additional environment variables until you get DataFlex running. If those environment variables are needed for other applications, you can add them back, once you get DataFlex running properly.&lt;br /&gt;
&lt;br /&gt;
== Setting up Batch Files for running DataFlex 3.2==&lt;br /&gt;
&lt;br /&gt;
Here are some batch file examples for easy switching between versions of DataFlex. These batch files will run only on DOS-based operating systems or in DOS sessions under Windows.&lt;br /&gt;
&lt;br /&gt;
Many programmers, as well as end users, run multiple versions of DataFlex and use batch files to switch from version to version. Here at DAC we are always switching among versions: 3.1d, 3.2, Visual DataFlex 8.1, Visual DataFlex 8.2, etc..&lt;br /&gt;
&lt;br /&gt;
Following are some batch file examples for switching among versions. You’ll want to place these batch files in a directory that is included in your  PATH environment variable (e.g. use a directory c:\batch to be included in your  PATH, to contain all batch files).&lt;br /&gt;
&lt;br /&gt;
Set32.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 3.2 and switch to your application directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 3.2 Environment&lt;br /&gt;
set DFENV=c:\df32\usr\dfenv.cfg&lt;br /&gt;
set DFPATH=     REM blank DFPATH env. variable&lt;br /&gt;
set DFPROG=     REM blank DFPROG env. variable&lt;br /&gt;
echo Switching to DataFlex 3.2 Application Area&lt;br /&gt;
c:&lt;br /&gt;
cd \app\src&lt;br /&gt;
&lt;br /&gt;
Set23.bat&lt;br /&gt;
&lt;br /&gt;
Use this file to set up your environment for running DataFlex 2.3 and switch to your DataFlex 2.3b directory:&lt;br /&gt;
&lt;br /&gt;
@echo off&lt;br /&gt;
echo Setting Up DataFlex 2.3 Environment&lt;br /&gt;
set DFENV=     REM blank DFENV env. variable&lt;br /&gt;
set DFPATH=.;     REM current directory only directory in DFPATH&lt;br /&gt;
set DFPROG=.;&lt;br /&gt;
echo Switching to DataFlex 2.3b Area&lt;br /&gt;
c:&lt;br /&gt;
cd \df23&lt;br /&gt;
&lt;br /&gt;
Note: The DFPROG environment variable is used by DataFlex revisions 2.3 and 3.01 to find the location of its executable files (i.e. dfrun.exe).&lt;br /&gt;
&lt;br /&gt;
Note: Writing batch files and using environment variables are advanced operating system topics. If you want to learn more about these topics, you can consult your operating system manuals or the maker of your operating system. You can also go to your local bookstore and find hundreds of books on using operating systems like DOS, Unix and Windows and creating batch processes for these systems. These topics are NOT supported by Data Access Corporation.&lt;br /&gt;
&lt;br /&gt;
== Creating Shortcuts for Running DataFlex on Windows ==&lt;br /&gt;
&lt;br /&gt;
Under Windows, you usually want to provide a simple shortcut that your end users can click on to start their DataFlex application.&lt;br /&gt;
&lt;br /&gt;
The trick here is to make the shortcut not to the setpath batch file or dfrun.exe, but to command.com. Command.com is the executable program that executes a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows 95/98/ME&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\windows\command.com&lt;br /&gt;
This launches a DOS session under Windows.&lt;br /&gt;
&lt;br /&gt;
Working: c:\app\data&lt;br /&gt;
Starts the session in the specified directory.&lt;br /&gt;
&lt;br /&gt;
Batch File: c:\df32\usr\setpath.bat&lt;br /&gt;
This executes the batch file immediately after starting the DOS session and sets up the session&#039;s environment to run DataFlex.&lt;br /&gt;
&lt;br /&gt;
An Example Shortcut on Windows NT/2000/XP&lt;br /&gt;
&lt;br /&gt;
Target or Command Line: c:\winnt\system32\cmd.exe&lt;br /&gt;
All other parameters are the same as the Windows 95/98/ME example above.&lt;br /&gt;
Starting a DataFlex Application From a Windows Shortcut&lt;br /&gt;
&lt;br /&gt;
You can edit the batch file that is executed when launching an application to have &amp;quot;dfrun&amp;quot; or &amp;quot;dfrun ApplicationName&amp;quot; as the last line in the batch file. This would then launch the DataFlex menu or any desired DataFlex application in that DOS session.&lt;br /&gt;
&lt;br /&gt;
== Using An Existing 2.3b Menu ==&lt;br /&gt;
&lt;br /&gt;
There are 2 pieces to the character-mode DataFlex menu system:&lt;br /&gt;
&lt;br /&gt;
1. The Menu Data File (menu.dat)&lt;br /&gt;
&lt;br /&gt;
This data file contains the entries that make up the menu. It can be edited using the DataFlex Menu Maintenance Utility (&amp;quot;dfrun menudef&amp;quot;). To retain the menu items you had in your 2.3b program, simply copy over the existing menu.dat file.&lt;br /&gt;
&lt;br /&gt;
2. The Menu Program (menu.flx)&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 comes with a brand new, object-oriented,  CUA compliant menu program. This is the default menu that will run with DataFlex 3.2.&lt;br /&gt;
If you wish to use a menu program that more closely resembles the 2.3b style menu program, you can compile menuold.src (\df32\src\source\menuold.src) and then either execute &amp;quot;dfrun menuold&amp;quot; to access this menu or rename menuold.flx to menu.flx to have this menu be used as the default.&lt;br /&gt;
Note: Do not compile and/or run the 2.3b menu.src in DataFlex 3.2. This will not work, which is why menuold.src was provided with DataFlex 3.2.&lt;br /&gt;
&lt;br /&gt;
Note: DataFlex 2.3b came with flex.exe, which was a &amp;quot;loader&amp;quot; program. It called dfrun, and if dfrun ever closed, it called dfrun again. This functionality is not available in a 32-bit DOS program, thus flex.exe is no longer available.&lt;br /&gt;
&lt;br /&gt;
== Accelerator Keys (FlexKeys) ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2 uses CUA compliant accelerator keys, such as F2 to Save, F8 for &amp;quot;find gt&amp;quot;, Shift+F2 to delete, etc.. These keys are quite different from their 2.x predecessors, but it is useful for your end users to learn these keys, because many other applications share the same accelerator keys, making it easier to remember them in the long run. Nevertheless, in the short term, your end user may want to continue using the accelerator keys that they are used to.&lt;br /&gt;
&lt;br /&gt;
For this purpose, we have provided a file that contains the accelerator key definitions as they were in DataFlex 2.3b (\df32\usr\df23ini.cfg) and a second file with the DataFlex 3.2 accelerator key definitions (\df32\usr\df32ini.cfg). You can add a line of code to any DataFlex 3.2 program to read either of these files:&lt;br /&gt;
&lt;br /&gt;
read_dfini &amp;quot;df23ini.cfg&amp;quot; - program starts using definitions from DataFlex 2.3b&lt;br /&gt;
read_dfini &amp;quot;df32ini.cfg&amp;quot; - program starts using definitions from DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
Note: If a program uses a dfini.cfg file and chains to another program, the second program will also use the settings defined in that dfini.cfg file.&lt;br /&gt;
&lt;br /&gt;
By default, the DataFlex 3.2 runtime does not use a dfini.cfg file, all the defaults are hardcoded into the runtime. However, if the runtime encounters a file called dfini.cfg along dfpath, or if a read_dfini statement is in a DataFlex program, it will use the definitions in that file.&lt;br /&gt;
&lt;br /&gt;
== Do&#039;s and Don&#039;ts of Running DataFlex 3.2 and Prior Revisions Concurrently ==&lt;br /&gt;
&lt;br /&gt;
Date Format&lt;br /&gt;
You MUST keep the same date format in all versions of DataFlex that share the same data files! Either use 2 digit years or 4 digit years throughout, do not mix them. You should use 4 digit years rather than 2 digit years, otherwise your applications will have problems the first time a date of 01/01/2000 or later is used.&lt;br /&gt;
&lt;br /&gt;
Specifically, if you use the Y2K-Enhanced capabilities of DataFlex 3.2 or Visual DataFlex, and turn on the Date4_State, dates are automatically saved with 4 digit years. After this, you cannot share this data with versions of DataFlex using dates with 2-digit years.&lt;br /&gt;
&lt;br /&gt;
Transaction Tracking&lt;br /&gt;
You can only use Novell&#039;s Transaction Tracking (TTS) with DataFlex 3.2 or Visual DataFlex. If you do use TTS with these revisions of DataFlex, you cannot share those data files with revisions of DataFlex that do not support TTS, or you will irreparably damage your data files.&lt;br /&gt;
&lt;br /&gt;
Data Format&lt;br /&gt;
If you make changes to your data file definitions (e.g. add a field) in DataFlex 3.2 or Visual DataFlex, DataFlex 2.3b will no longer be able to access these data files.&lt;br /&gt;
&lt;br /&gt;
Note: You can query the version of a DataFlex data file in a DataFlex program by using the &amp;quot;DF_File_Revision&amp;quot; attribute.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
integer iRev&lt;br /&gt;
Open CUSTOMER&lt;br /&gt;
get_Attribute DF_File_Revision of CUSTOMER.File_Number ;&lt;br /&gt;
    to iRev&lt;br /&gt;
showln &amp;quot;File Revision of Customer File: &amp;quot; iRev &amp;quot;.&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expression Evaluation&lt;br /&gt;
&lt;br /&gt;
There have been some changes in the way logical expressions are evaluated in DataFlex revisions 3.2:&lt;br /&gt;
&lt;br /&gt;
The standard mathematical logical operators (&amp;lt;, &amp;gt;, &amp;gt;=, &amp;lt;&amp;gt;, etc.) can be used in addition to the DataFlex logical operators used in DataFlex 2.3b (LT, GT, GE, etc.), provided the expression is used in parentheses.&lt;br /&gt;
&lt;br /&gt;
The Boolean logic operators AND and OR have been added.&lt;br /&gt;
&lt;br /&gt;
The MIN and MAX operators have been added to replace the use of &amp;lt; and &amp;gt; for this purpose, since &amp;lt; and &amp;gt; are now used as logical operators. It is important to realize how this affects evaluation of program code:&lt;br /&gt;
Let&#039;s use an example to illustrate this. Look at the following line of DataFlex code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 &amp;gt; 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, this line would evaluate to show &amp;quot;5&amp;quot;.&lt;br /&gt;
In DataFlex 3.2, this line will evaluate to show &amp;quot;0&amp;quot; (meaning &amp;quot;False&amp;quot;, since 4 is not greater than 5).&lt;br /&gt;
&lt;br /&gt;
The corrected line of code for DataFlex 3.2 to evaluate as it did in DataFlex 2.3 would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
showln (4 MAX 5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The mathematical operators can now be used on strings, making their function more intuitive and compatible with other programming environments. However, this will result in some expressions evaluating differently in DataFlex 3.x than they did in 2.3.&lt;br /&gt;
&lt;br /&gt;
Once again, let&#039;s look at an example to illustrate the differences. Consider the following lines of DataFlex code, and look at the results they will produce in DataFlex 2.3 and DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
string A&lt;br /&gt;
string B&lt;br /&gt;
move &amp;quot;3&amp;quot; to A&lt;br /&gt;
move &amp;quot;2&amp;quot; to B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 	&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
 Expression	DataFlex 2.3b	DataFlex 3.2&lt;br /&gt;
 showln (A + B)	     5	          &amp;quot;32&amp;quot;&lt;br /&gt;
 showln (A * B)	     6	          &amp;quot;3 2&amp;quot;&lt;br /&gt;
 showln (A - B)	     1	          &amp;quot;32&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3, addition of 2 string variables would result in the mathematical addition of the values in the 2 variables; in DataFlex 3.2, the 2 strings are concatenated instead.&lt;br /&gt;
&lt;br /&gt;
== Compiler Errors ==&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, a compiled DataFlex program (a .flx file) will only be created if your source code compilation does not generate any errors.&lt;br /&gt;
The DataFlex 2.3 compiler was very forgiving; it allowed numerous types of incorrect syntax without generating error messages. The newer compiler version has been improved and will often catch errors the 2.3b compiler did not.&lt;br /&gt;
For example, the &amp;quot;Check=&amp;quot; entry option allowed checking for ascii characters without enclosing them in quotes. The DataFlex 3.2 compiler creates an error in this case.&lt;br /&gt;
&lt;br /&gt;
Incorrect syntax (but not caught by 2.3 compiler):&lt;br /&gt;
    Accept FILE.FIELD {Check=1|2|3}&lt;br /&gt;
&lt;br /&gt;
Correct syntax:&lt;br /&gt;
    Accept FILE.FIELD {Check=&amp;quot;1|2|3&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
The -x23 Compiler Flag&lt;br /&gt;
&lt;br /&gt;
For backward compatibility purposes, DAC provided the compiler flag -x23 (i.e. &amp;quot;dfcomp source.src -x23&amp;quot;) for compiling programs as if they had been compiled in 2.3b. This flag was provided until revision 3.04 to allow time for developers to bring their existing programs up to date. Most of the changes in DataFlex that are outlined in this paper and affect existing 2.3 DataFlex code were made to DataFlex with revision 3.0, in about 1990. At some point, a choice must be made between backward compatibility and progress, and as of revision 3.05, the -x23 flag is no longer supported, so you must make the appropriate source code changes to existing DataFlex 2.3 programs.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Error 4155 &amp;quot;Edit Requires Reread or Lock During Save&amp;quot;&lt;br /&gt;
DataFlex 3.2 and Visual DataFlex are much stricter about enforcing proper rules, for multiuser coding, database design and many other areas than prior revisions of DataFlex.&lt;br /&gt;
&lt;br /&gt;
This particular runtime error points out errors in multiuser coding logic. The rules for correcting these coding errors are simple and straightforward:&lt;br /&gt;
&lt;br /&gt;
Whenever a new record is created (i.e. a value is moved to a file.field) a lock command must first be issued. A lock command locks all open data files that are not in read_only mode.&lt;br /&gt;
Whenever an existing record is edited, a reread command of the corresponding data file must first be issued. A reread command rereads all data files specified as arguments for the command and then issues a lock command.&lt;br /&gt;
Whenever an existing record is deleted, the affected data file must be in a locked state.&lt;br /&gt;
For each lock command issued one unlock command must be issued.&lt;br /&gt;
For each reread command issued one unlock command must be issued.&lt;br /&gt;
See the DataFlex Encyclopedia for more information on the lock, reread and unlock commands.&lt;br /&gt;
You must use multiuser licenses for all versions of DataFlex that share data files, because file locking is suppressed in single-user runtimes.&lt;br /&gt;
&lt;br /&gt;
=== How to write correct code for Multiuser Coding Examples: ===&lt;br /&gt;
&lt;br /&gt;
Creating a new record:&lt;br /&gt;
clear NEWFILE&lt;br /&gt;
lock&lt;br /&gt;
    move VAR to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Note: In many instances a reread command instead of a lock command will work with a new record. In this case, you MUST use the reread command without any files listed as parameters. If you try to reread a specific file (e.g. reread CUSTOMER) which does not have an active record, you will get an error &amp;quot;status &amp;lt;&amp;lt;25&amp;gt;&amp;gt; record not found&amp;quot;. There is a slight penalty (time) for using the reread command without any parameters, which is that all open files with an active record that are not flagged read-only will be reread.&lt;br /&gt;
&lt;br /&gt;
Editing an existing record:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move VAR to FILE.FIELD&lt;br /&gt;
    saverecord FILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
Copying data from an existing record in FILE to a new record in NEWFILE:&lt;br /&gt;
reread FILE&lt;br /&gt;
    move FILE.FIELD to NEWFILE.FIELD&lt;br /&gt;
    saverecord NEWFILE&lt;br /&gt;
unlock&lt;br /&gt;
&lt;br /&gt;
* Explanation of terms:&lt;br /&gt;
&lt;br /&gt;
NEWFILE is a data file where a new record is being created&lt;br /&gt;
FILE is a data file with an existing record&lt;br /&gt;
VAR is a variable in the program code&lt;br /&gt;
Note: There are important differences between the saverecord and save commands. The difference is that the save command attaches related ancestral file (parent, grandparent, etc) information, so that information from the related parent record will overwrite information moved manually into the child record buffer when saving. Saverecord does not do anything at all with related files, it only affects the file(s) listed as parameter(s).&lt;br /&gt;
&lt;br /&gt;
You can find additional information on multiuser coding in the white paper Transactions in DataFlex 3.1.&lt;br /&gt;
&lt;br /&gt;
Error 4098 &amp;quot;Bad Relationship&amp;quot;&lt;br /&gt;
We have received some reports of encountering this error from developers upgrading to DataFlex 3.2 or Visual DataFlex. This error will occur at runtime whenever a relationship is found between 2 database fields that are not of exactly the same type and length. Overlap fields are the only exception to this rule; they may relate to either other overlap fields or ASCII fields of the same length.&lt;br /&gt;
&lt;br /&gt;
Note: Many developers using 2.3b used record number relationships, where a field in one database file is related to the RECNUM field in another file. When upgrading to 3.2, suddenly this message appears. This is usually because the &amp;quot;relating from&amp;quot; field was defined as Numeric 6.0, instead of Numeric 8.0, which is the type and length of the RECNUM field.&lt;br /&gt;
&lt;br /&gt;
Error 4141 &amp;quot;Data set files must support transaction&amp;quot;&lt;br /&gt;
If you are using Data_Sets or DataDictionaries in your programs, you must set the affected data files&#039; transaction type to either Client Atomic or Server Atomic, you cannot leave it as None.&lt;br /&gt;
&lt;br /&gt;
Zerofile command&lt;br /&gt;
Older revisions of DataFlex allowed execution of the zerofile command while other users had access to the data file. This is no longer the case. For data integrity reasons, starting with DataFlex 3.2, a data file must be opened exclusively to zerofile it. Otherwise, the error message status 4177 &amp;quot;File access violation, file may be in use filename&amp;quot;  will be triggered.&lt;br /&gt;
&lt;br /&gt;
Modified Runtimes&lt;br /&gt;
If you are using a modified DataFlex runtime, check with the provider of that runtime in regards to any of the issues discussed in this paper.&lt;br /&gt;
&lt;br /&gt;
Graphics Commands&lt;br /&gt;
&lt;br /&gt;
Graphics commands for character-mode DataFlex are no longer supported in any revision newer than 3.01b, so any such commands will have to be removed from the source code of your program(s).&lt;br /&gt;
&lt;br /&gt;
== DataFlex 3.2 Utilities ==&lt;br /&gt;
&lt;br /&gt;
All of the following utilities are documented in the DataFlex 3.2 User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
DFAdmin&lt;br /&gt;
&lt;br /&gt;
DFAdmin is a superset of various other utilities, including, most notably, DFMaint and DFSort. Here are some of its features:&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries, even for multiple filelists, not just the current one (like DFMaint allows).&lt;br /&gt;
&lt;br /&gt;
It allows for mass-manipulation of data files unlike other utilities, like DFFile, which can only manipulate one file at a time.&lt;br /&gt;
&lt;br /&gt;
Accepts command line parameters for all filelist and index manipulation.&lt;br /&gt;
&lt;br /&gt;
Can convert datafiles to and from other database formats (i.e. Btrieve, DB2, ODBC) using DataFlex loadable drivers.&lt;br /&gt;
&lt;br /&gt;
DFConfig&lt;br /&gt;
&lt;br /&gt;
The DFConfig utility now provides much of the functionality provided by DFSetup in DataFlex 2.X, and some new features as well.&lt;br /&gt;
&lt;br /&gt;
Some of the features of DFConfig are:&lt;br /&gt;
&lt;br /&gt;
Accelerator key definition&lt;br /&gt;
&lt;br /&gt;
Color settings&lt;br /&gt;
&lt;br /&gt;
Appearance settings for things like currency&lt;br /&gt;
&lt;br /&gt;
Date and number format settings&lt;br /&gt;
&lt;br /&gt;
Other miscellaneous settings&lt;br /&gt;
&lt;br /&gt;
DFMaint&lt;br /&gt;
&lt;br /&gt;
One of the best new features for developers in DataFlex 3.2 is in the DFMaint utility: The ability to edit the filelist entries! Here you can add, remove, and edit individual entries in your current filelist.cfg.&lt;br /&gt;
&lt;br /&gt;
NOTE: The DFAdmin utility allows editing of multiple filelists, not just the current one (as DFMaint does).&lt;br /&gt;
&lt;br /&gt;
The DataFlex maintenance utility provides access to the following:&lt;br /&gt;
&lt;br /&gt;
Indexing utility&lt;br /&gt;
&lt;br /&gt;
Cleanup utility&lt;br /&gt;
&lt;br /&gt;
Editing of filelist entries&lt;br /&gt;
&lt;br /&gt;
DFQuery&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, the DFQuery utility has been replaced with DFQ, a DataFlex program with the same functionality as DFQuery. Since DFQ is a DataFlex program, it can load database drivers using any available Connectivity Kit for DataFlex.&lt;br /&gt;
&lt;br /&gt;
DFSetup&lt;br /&gt;
&lt;br /&gt;
As of DataFlex revision 3.0, the DFSetup utility only validates and registers serial number, registration name and registration code into the binary file termlist.cfg. All other functionality DFSetup had in DataFlex 2.X has been moved to the DFConfig utility.&lt;br /&gt;
&lt;br /&gt;
DFSort - Index Utility&lt;br /&gt;
&lt;br /&gt;
In DataFlex 3.2, dfsort.exe was introduced as a new utility for reindexing. Dfindex was dropped from the product entirely starting with revision 3.1.&lt;br /&gt;
&lt;br /&gt;
As an alternative, the DFAdmin utility can be used for reindexing. This utility even accepts command line parameters for all index manipulation.&lt;br /&gt;
&lt;br /&gt;
== Year 2000 Issues ==&lt;br /&gt;
&lt;br /&gt;
Now a brief discussion of Year 2000 issues. You can find additional information on this issue in the following:&lt;br /&gt;
&lt;br /&gt;
DataFlex and the Year 2000, N. Joe Potts, Data Access Corporation, December 2, 1997.&lt;br /&gt;
Installation &amp;amp; Environment Guide for all Y2K Enhanced revisions of DataFlex.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
DataFlex has always been Y2K (Year 2000) capable, meaning that developers have always been able to write Y2K-compliant applications. In prior revisions, such as 2.3b, it was usually up to the developer to ensure data was displayed and saved with 4-digit years, but DataFlex already had the capability to store dates with 4-digit years. This meant creating on-screen and report date images with enough room for 4-digit years, and adding 693975 (the integer equivalent of 01/01/1900) to a 2-digit year, wherever dates were used.&lt;br /&gt;
&lt;br /&gt;
In newer revisions of DataFlex (Visual DataFlex, DataFlex 3.2), we have provided an easier method, both for creating new applications that are Y2K compliant and for updating existing, noncompliant applications to full Y2K compliance.&lt;br /&gt;
&lt;br /&gt;
DataFlex has always had the capability to store dates with 4-digit years, so a properly written DataFlex application in any version of DataFlex will be Year-2000 (Y2K) compliant. However, in DataFlex 3.2 (caution: revisions of DataFlex prior to 3.1c do not have the Y2K-Enhancements), we have implemented additional support for easily making your applications Y2K compliant.&lt;br /&gt;
&lt;br /&gt;
There are numerous additional enhancements and bug fixes to DataFlex 3.2. Please consult the DataFlex 3.2 Readme file for more details on these enhancements and fixes.&lt;br /&gt;
&lt;br /&gt;
Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
There are common methods used in all of these Y2K-Enhanced revisions:&lt;br /&gt;
&lt;br /&gt;
Epoch_Value&lt;br /&gt;
This is a value between 0 and 99 which determines a &amp;quot;cutoff year&amp;quot;, which determines at which year 2-digit entered year becomes a 19XX year or a 20XX year.&lt;br /&gt;
&lt;br /&gt;
For example, if the Epoch_Value is set to 30 (the default):&lt;br /&gt;
&lt;br /&gt;
If a user enters &amp;quot;010198&amp;quot; into a date window, it will be converted to &amp;quot;01/01/1998&amp;quot;.&lt;br /&gt;
If a user enters &amp;quot;010102&amp;quot; into a date window, it will be converted to &amp;quot;01/01/2002&amp;quot;.&lt;br /&gt;
SysDate4_State&lt;br /&gt;
When turned on, the runtime returns a date with a 4-digit year wherever the sysdate command is used.&lt;br /&gt;
&lt;br /&gt;
Date4_State&lt;br /&gt;
When turned on, this state ensures that whenever a date is displayed or stored, it is automatically converted to a date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
In character-mode revisions, in date windows with only 2 digits for the date, the LAST 2 digits are displayed:&lt;br /&gt;
For example: &amp;quot;09/17/2002&amp;quot; is displayed as &amp;quot;09/17/02&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Conv2000 Utility&lt;br /&gt;
This is a DataFlex program that changes all dates in existing data files from 2-digit year dates to 4-digit year dates. This utility does not change the format of any date fields or data files containing date fields, it only changes the content (value) of the date field. The utility can loop through all files on the current filelist or allow you to select a file to convert. Conv2000 is written in DataFlex and all source code for it is provided.&lt;br /&gt;
&lt;br /&gt;
Implementation of Y2K-Enhanced Features&lt;br /&gt;
&lt;br /&gt;
DataFlex 3.2&lt;br /&gt;
In DataFlex 3.2, DAC has provided a file called y2k.pkg, which contains the set_Date_Attribute command and default settings for Date4_State (dfTrue), SysDate4_State (dfTrue) and Epoch_Value (30).&lt;br /&gt;
&lt;br /&gt;
To make an existing DataFlex 2.3b program Y2K enhanced, simply add this line to the beginning of your program and recompile the program under DataFlex 3.2:&lt;br /&gt;
&lt;br /&gt;
Use y2k.pkg&lt;br /&gt;
&lt;br /&gt;
TIP: In DataFlex 2.3b, all images had to be at the very top of the program. In DataFlex 3.2, this is no longer necessary, so you can place code in between images and even before any images at the top of the program. If you have a lot of programs (source files) to which you need to add the &amp;quot;Use y2k.pkg&amp;quot; statement, you could write a small DataFlex program to do this for you. See the DAW Technical Knowledge Base for more information.&lt;br /&gt;
&lt;br /&gt;
A Brief Overview of Y2K.pkg&lt;br /&gt;
&lt;br /&gt;
There are only 3 lines of code in y2k.pkg, which turn on all the automatic Year-2000 enhancements in DataFlex. Here is a brief look at each of the 3 lines of code in y2k.pkg:&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Sysdate4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line of code toggles the runtime to execute sysdate4 instead of sysdate wherever sysdate is used in a program. This returns the computer&#039;s system date with a 4-digit year.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Date4_State to DFTrue&lt;br /&gt;
&lt;br /&gt;
This line toggles the runtime to automatically convert dates to 4-digit years whenever a date is moved to a data variable or a date field.&lt;br /&gt;
&lt;br /&gt;
Set_Date_Attribute Epoch_Value to 30&lt;br /&gt;
&lt;br /&gt;
This line of code tells the runtime the cutoff year that determines whether a date is converted to a 19XX year or a 20XX year during automatic conversion.&lt;br /&gt;
&lt;br /&gt;
If you want to use a different cutoff year (Epoch value) from the default of 30, you can change the value here, then recompile all programs that contain &amp;quot;Use y2k.pkg&amp;quot;. If you want a specific project to have a different cutoff year, you can copy y2k.pkg to the source code area for that project, then edit the Epoch_Value in that copy of y2k.pkg and recompile all programs containing &amp;quot;Use Y2K.pkg&amp;quot; for that project.&lt;br /&gt;
&lt;br /&gt;
== Separating Applications and Runtimes ==&lt;br /&gt;
&lt;br /&gt;
DataFlex 2.3 was designed in simpler days of computing. Hard disks were smaller, less memory was available and applications were generally smaller and did fewer things. Developers usually had relatively few development tools (and revisions thereof) installed on their PCs. Those times have changed. Today, it seems one can never have enough hard disk space or RAM and most applications do a gazillion things, whether they are needed or not.&lt;br /&gt;
&lt;br /&gt;
For programmers things have changed as well. It is common for application designers to develop with many different tools, even for a single application. We often have multiple versions of the same tools installed, if not for development, then to support customers who use these different tools and versions.&lt;br /&gt;
&lt;br /&gt;
In DataFlex 2.3b, many developers kept the runtime files in the same directory as the application files (i.e. data and .flx files). In order to successfully upgrade to DataFlex 3.2, or to run the two (or more) versions of DataFlex simultaneously, these files need to be separated. Runtime files from the two versions will interfere with each other.&lt;br /&gt;
&lt;br /&gt;
The Separation Process (a Step-by-Step Outline)&lt;br /&gt;
&lt;br /&gt;
The following steps will show you how to: Divide the source code and data files from your existing installation into separate areas. This makes maintenance easier and gets you ready to easily upgrade to DataFlex 3.2, as well as Visual DataFlex.&lt;br /&gt;
Keep one copy of the source code in the 2.3b area and another copy in the 3.2 area.&lt;br /&gt;
This allows you to edit either version of the source code without affecting the other.&lt;br /&gt;
Create a shared data directory.&lt;br /&gt;
You can access your data files using programs compiled under DataFlex 2.3b and DataFlex 3.2 at the same time. (This works for other revisions, such as 3.1, as well.)&lt;br /&gt;
How to run DataFlex 3.2 and other (prior) revisions concurrently.&lt;br /&gt;
You can keep existing programs running in an older revision of DataFlex until you have all components working in DataFlex 3.2.&lt;br /&gt;
1. Create separate directories for the runtime files and application files, and separate data and source code in the process.&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 2.3b license resides is c:\df23 – you can substitute your actual installed directory name and drive letter for c:\df23.&lt;br /&gt;
&lt;br /&gt;
c:\df23 - original 2.3b directory&lt;br /&gt;
               - 2.3 runtime files will remain here&lt;br /&gt;
               - a copy of the source code files will remain here to be used with 2.3&lt;br /&gt;
&lt;br /&gt;
c:\app - directory for your application files&lt;br /&gt;
                \data - data files to be shared between revisions 2.3 and 3.2 (subdirectory of \app)&lt;br /&gt;
                \src - source code files to be used with 3.2 (subdirectory of \app)&lt;br /&gt;
&lt;br /&gt;
Separating your existing 2.3b directory this way will give you numerous operating options:&lt;br /&gt;
&lt;br /&gt;
Concurrently run DataFlex 2.3b and 3.2 (or just 3.2)&lt;br /&gt;
Have an existing directory structure to easily upgrade to Visual DataFlex&lt;br /&gt;
A. Files to be moved into c:\app\data directory:&lt;br /&gt;
&lt;br /&gt;
all data files for your application (*.dat, *.k*, *.tag, *.fd, *.def)&lt;br /&gt;
filelist.cfg&lt;br /&gt;
B. Files to be copied into c:\app\src directory:&lt;br /&gt;
&lt;br /&gt;
One copy of the source code can remain in \df23 for use with (and to keep up) currently running 2.3b applications, and one copy will go into this directory for use with the new 3.2 version.&lt;br /&gt;
&lt;br /&gt;
all source code files (*.frm, *.src, *.inc, *.rpt, …)&lt;br /&gt;
C. Files to remain in c:\df23 (runtime) directory:&lt;br /&gt;
&lt;br /&gt;
the most important are the executable files (*.exe) and termlist.cfg&lt;br /&gt;
see Appendix A for a complete list of files that are installed by a DataFlex 2.3b Development License – these are the files that should remain in the c:\df23 directory&lt;br /&gt;
2. Install 3.2 into a separate directory and install your DataFlex 3.2 registration code&lt;br /&gt;
&lt;br /&gt;
For the remainder of this paper we will assume that the directory where your 3.2 license resides is c:\df32 – you can substitute your actual installed directory name and drive letter for c:\df32.&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
DOS/Windows: Remember to execute the c:\df32\usr\setpath.bat batch file before running DFSetup.exe to install your registration code.&lt;br /&gt;
Linux/Unix: Remember to execute the /usr/local/df32/usr/setpath script before running dfsetup to install your registration code.&lt;br /&gt;
3. Concurrently Running DataFlex 2.3b and 3.2&lt;br /&gt;
&lt;br /&gt;
A. Running DataFlex 3.2&lt;br /&gt;
&lt;br /&gt;
1. Edit the c:\df32\usr\dfenv.cfg file:&lt;br /&gt;
&lt;br /&gt;
Change the DFPATH= statement to include the c:\app\data directory&lt;br /&gt;
&lt;br /&gt;
Before:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;c:\df32\bin;&lt;br /&gt;
c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
After:&lt;br /&gt;
&lt;br /&gt;
dfpath=.;c:\app\data;c:\df32\usr;c:\df32\usr\help;c:\df32\lib;&lt;br /&gt;
c:\df32\bin;c:\df32\src\pkg;c:\df32\usr\examples\expense;&lt;br /&gt;
c:\df32\usr\examples\dar;c:\df32\usr\examples\ordentry;&lt;br /&gt;
c:\df32\usr\examples\big;c:\df32\usr\examples\report;&lt;br /&gt;
c:\df32\usr\examples\data;&lt;br /&gt;
&lt;br /&gt;
Note: the DFPath statements above may appear different depending on the software you use to view or print this document, but each DFPath statement is a single continuous statement.&lt;br /&gt;
&lt;br /&gt;
2. Switch to c:\app\src directory&lt;br /&gt;
3. Execute c:\df32\usr\setpath.bat&lt;br /&gt;
4. Run DataFlex (dfrun programname, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
Note: You may want to use different dfenv.cfg files for different applications so that you can place numerous application specific environment variables into each file.&lt;br /&gt;
&lt;br /&gt;
B. Running DataFlex 2.3b&lt;br /&gt;
&lt;br /&gt;
Switch to c:\df23 directory&lt;br /&gt;
Set the DFPATH environment variable:&lt;br /&gt;
set DFPATH=.;c:\app\data&lt;br /&gt;
Make sure c:\df23 is in your PATH environment variable&lt;br /&gt;
Run DataFlex (dfrun ProgramName, dfcomp, dfquery, etc.)&lt;br /&gt;
&lt;br /&gt;
== Moving on to Visual DataFlex ==&lt;br /&gt;
&lt;br /&gt;
Now that Windows is the world&#039;s most prevalent operating system, the next step for many DataFlex programmers is moving on to Windows programming. When DataFlex 2.3 was released in 1987, the auto-design facility was so easy to use to create database applications that it was years ahead of the competition. With Visual DataFlex you can experience that feeling again in Windows. Visual DataFlex is a great environment for designing Windows applications and allows you to utilize your existing DataFlex knowledge.&lt;br /&gt;
&lt;br /&gt;
Data files can be shared among DataFlex 2.3b, 3.2 and Visual DataFlex, so your customers can continue to run their existing character-mode applications while you incrementally upgrade them to Visual DataFlex. User interface components, such as data entry screens (views) must be redesigned in VDF using Windows GUI object classes. The Visual DataFlex tools, such as the Integrated Development Environment (IDE) and Database Builder, make writing Windows applications quite enjoyable.&lt;br /&gt;
&lt;br /&gt;
Some parts of your character-mode DataFlex (2.3b or 3.2) source code can be reused (i.e. non-interfaced batch processes such as reports). You will be able to simply cut and paste many parts of your existing programming logic into your VDF applications.&lt;br /&gt;
&lt;br /&gt;
Visual DataFlex, as well as the DataFlex 3.2 console-mode runtime, has the ability to load Windows drivers, such as the Pervasive.SQL Connectivity Kit (which provides an easy yet powerful client-server solution), ODBC drivers and native drivers for other databases such as DB2 and Oracle. You&#039;ll never again have to turn down a project because a prospective client is using DB2 and you do not have time to learn a new programming environment.&lt;br /&gt;
&lt;br /&gt;
For more information on upgrading to Visual DataFlex, see John Tuohy&#039;s white paper Migrating to Windows with Visual DataFlex.&lt;br /&gt;
&lt;br /&gt;
== Appendix A: Directory Listing of a DataFlex 2.3b Development License ==&lt;br /&gt;
&lt;br /&gt;
These are the files that are installed with a Full DataFlex 2.3b Development License, including all examples. When trying to resolve which files should remain in the 2.3b runtime area (c:\df23), you may use this as a reference for those decisions. These files should not be copied to your source code directory.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that your application may use files with the same name, so having them listed here does not guarantee that they are not part of the application. The sample files, as you see below, contain data files such as customer.dat and vendor.dat. If your application has data files with the same name, those files need to be moved to the data directory (c:\app\data). Your developer is the person who should provide you with that information.&lt;br /&gt;
&lt;br /&gt;
cleanup.flx	cleanup.src	customer.dat	customer.fd&lt;br /&gt;
customer.flx	customer.frm	customer.k1	customer.tag&lt;br /&gt;
custrpt.flx	custrpt.rpt	date.flx	date.frm&lt;br /&gt;
dbread.flx	dbread.src	delqry.flx	delqry.src&lt;br /&gt;
dfask.com	dfauto.exe	dfcomp.exe	dfconver.exe&lt;br /&gt;
dfedit.exe	dffile.exe	dfindex.exe	dfpack.exe&lt;br /&gt;
dfquery.exe	dfrun.exe	dfsetup.exe	filelist.cfg&lt;br /&gt;
flex.exe	flex.cfl	flexerrs.flx	flexerrs.dat&lt;br /&gt;
flexerrs.fd	flexerrs.frm	flexerrs.tag	fmac&lt;br /&gt;
halo3270.dev	haloact2.prn	haloamde.dev	halocljt.prn&lt;br /&gt;
haloclsr.prn	halocm25.dev	halocolm.prn	halocono.dev&lt;br /&gt;
halocrna.prn	halodblo.prn	halodeba.dev	haloepjx.prn&lt;br /&gt;
haloepsn.prn	halogeni.dev	halogncm.prn	haloherc.dev&lt;br /&gt;
haloibm.dev	haloibme.dev	haloibmg.dev	haloicba.dev&lt;br /&gt;
haloimgt.dev	haloimwr.prn	haloinda.dev	halojlsr.prn&lt;br /&gt;
halolasr.prn	haloljtp.prn	halomits.prn	halomult.dev&lt;br /&gt;
halonine.dev	halopal.prn	halopalm.dev	halopcjr.dev&lt;br /&gt;
haloprsm.prn	haloqdcl.dev	haloquad.dev	haloquad.prn&lt;br /&gt;
haloscio.dev	halosigm.dev	halostb.dev	halotecm.dev&lt;br /&gt;
halotex.dev	halotjet.prn	halotosh.prn	halovdaa.dev&lt;br /&gt;
halowyse.dev	invoice.flx	invoice.frm	invt.dat&lt;br /&gt;
invt.fd	invt.flx	invt.frm	invt.k1&lt;br /&gt;
invt.k2	invt.k3	invt.tag	items.dat&lt;br /&gt;
items.fd	items.k1	items.k2	items.tag&lt;br /&gt;
menu.flx	menu.dat	menu.tag	menu.fd&lt;br /&gt;
menu.src	menudef.flx	menudef.src	modmenu.flx&lt;br /&gt;
movement.flx	movement.rpt	pn90230.23b	pn90250.23b&lt;br /&gt;
query.dat	query.tag	query.fd	query.k1&lt;br /&gt;
query.hlp	read.flx	read.src	sysfile.dat&lt;br /&gt;
sysfile.fd	sysfile.tag	termlist.cfg	vendor.dat&lt;br /&gt;
vendor.fd	vendor.flx	vendor.frm	vendor.k1&lt;br /&gt;
vendor.tag	venrpt.flx	venrpt.rpt	version&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
CUA - Common User Access, part of IBM&#039;s  SAA&lt;br /&gt;
&lt;br /&gt;
SAA - Systems Application Architecture - a series of interfaces, conventions and protocols which provide a framework for consistent application development and execution&lt;br /&gt;
(Source: DataFlex 3.1 User&#039;s Guide, page 241.; DataFlex 3.1 UIMS Handbook)&lt;br /&gt;
&lt;br /&gt;
== Additional Reading ==&lt;br /&gt;
&lt;br /&gt;
You may want to check for an updated version of this white paper on our Web site from time to time. Many of our White Papers are updated as information changes. For those papers, the Last Edited date is always at the top of the paper.&lt;br /&gt;
Visit the Data Access Worldwide Support Home page for information about all of our support offerings, including free support offerings, such as the Technical Knowledge Base, White Papers and Peer Support Newsgroups: http://www.dataaccess.com/support.&lt;br /&gt;
Transformation - Converting DataFlex 2.3b Applications to Revision 3.0, Doug Goldner, Data Access Corporation, 1992, 168 pages. Available from Data Access Corporation or your local distributor.&lt;br /&gt;
Migrating to Windows with Visual DataFlex, White Paper, John J. Tuohy, Data Access Corporation, June 6, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and the Year 2000, White Paper, N. Joe Potts, Data Access Corporation, December 2, 1997, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
DataFlex and DLLs, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Data Definition in Visual DataFlex, White Paper, Data Access Nederland, December 17, 1998, Location: http://www.dataaccess.com/WhitePapers.&lt;br /&gt;
Transactions in DataFlex 3.1, White Paper, Application Engineering Group, Data Access Corporation, April 25, 1996, Location:&lt;br /&gt;
DataFlex 3.2 Installation &amp;amp; Environment Guide, DataFlex 3.2 CD, Data Access Corporation.&lt;br /&gt;
Online Documentation for Visual DataFlex (all revisions of VDF).&lt;br /&gt;
Windows User&#039;s Guide to DOS : Using the Command Line in Windows 95/98, Carolyn Z. Gillay &amp;amp; Bette A. Peat, September 1998, Franklin Beedle &amp;amp; Assoc; ISBN: 1887902422.&lt;br /&gt;
DFConver utility, Location: ftp://ftp.dataaccess.com/pub/products/dataflex/tools.&lt;br /&gt;
Note: There is a lot of useful information in all of the DataFlex documentation. Some of the most useful files for the topic of this paper are in the electronic documentation files that can be read with the Adobe Acrobat reader.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Data Access Technical Knowledge Base    http://www.dataaccess.com/kbase.asp&lt;br /&gt;
Many answers to technical problems can be found online in the Data Access Technical Knowledge Base. Here, you can access the same live data that Data Access Worldwide technical support and development staff use to enter and track technical articles.&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Using_your_own_user_table_in_WebApps&amp;diff=3418</id>
		<title>Using your own user table in WebApps</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Using_your_own_user_table_in_WebApps&amp;diff=3418"/>
		<updated>2021-05-02T10:38:13Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: UserLogin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In most cases when creating a WebApp for an existing (Windows) system, that system will already have a mechanism for checking user credentials (i.e. user-name and password) in existance. The Data Access supplied mechanism for WebApps uses its own tables for this and for session management within that. So how do we integrate the two?&lt;br /&gt;
&lt;br /&gt;
Actually it is reasonably simple, but I&#039;m going to go through it line-by-line, so it will seem like a lot, but it really isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
The instructions below assume that your system has a user table; that it has a userID column of some sort; that column is the primary (unique) key; and that column is the sole element of Index.1 on that table. (If that last is &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; the case, you will have to also modify the &amp;quot;Send Find of hoUserDD EQ Index.1&amp;quot; line in the UserLogin procedure in your sub-class to use the correct index.)&lt;br /&gt;
&lt;br /&gt;
Text in {&#039;&#039;italics&#039;&#039;} should be replaced with the appropriate values for your own system.&lt;br /&gt;
&lt;br /&gt;
====Step 1. If you have not already done it, Create a WebApp Project in your workspace.====&lt;br /&gt;
&lt;br /&gt;
====Step 2. From {&#039;&#039;DataFlexInstalledLocation&#039;&#039;}\Pkg:====&lt;br /&gt;
&lt;br /&gt;
# Copy cWebSessionManagerStandard.pkg (note: &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; cWebSessionManager.pkg) to your AppSrc directory, renaming it to cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}.pkg&lt;br /&gt;
# Copy cWebAppUserDataDictionary.pkg and cWebAppSessionDataDictionary.pkg to your DDSrc directory (the former will not actually be used, but will be modified by the next step of the process, so best to copy it too)&lt;br /&gt;
&lt;br /&gt;
====Step 3. Change the relationship of WebAppSession to WebAppUser to point to your user table instead:====&lt;br /&gt;
&lt;br /&gt;
#The relationship needs to be on identically defined columns (same type and size).  I don&#039;t think that we ought to impact the existing system when that can be avoided, so if a change is needed (and it usually will be) the change should be at the WebAppSession table end.  Modify (in the Studio, right-click WebAppSession in the Table Explorer pane/tab, select &amp;quot;Edit Table&amp;quot; and make the required change to the LoginName column) that so that it matches the (unique) primary key (the user ID) of your current user table.  (So if your current user table has a column - say, UserID - which is ASCII 10, modify WebAppSession.LoginName to be ASCII 10 from its original ASCII 20.)&lt;br /&gt;
#In the &amp;quot;Relationships&amp;quot; tab, delete the relationship to WebAppUser (the only one there) and add a replacement pointing to your user table, from LoginName on WebAppSession, to whatever the user ID column is on your user table.&lt;br /&gt;
&lt;br /&gt;
====Step 4. Modify your cWebSessionManager sub-class:====&lt;br /&gt;
&lt;br /&gt;
#Change the use statement: &amp;quot;Use cWebSessionManager.pkg&amp;quot; to &amp;quot;Use cWebSessionManagerStandard.pkg&amp;quot;&lt;br /&gt;
#Replace the use statement: replace &amp;quot;Use cWebAppUserDataDictionary.dd&amp;quot; with &amp;quot;Use c{&#039;&#039;YourUserTable&#039;&#039;}DataDictionary.dd&amp;quot;&lt;br /&gt;
#Change the classname: from &amp;quot;Class cWebSessionManagerStandard is a cWebSessionManager&amp;quot; to &amp;quot;Class cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;} is a cWebSessionManagerStandard&amp;quot; (so sub-classing cWebSessionManagerStandard)&lt;br /&gt;
#Change the user data dictionary instance: in the &#039;&#039;&#039;Construct_Object&#039;&#039;&#039; procedure change &amp;quot;Get Create (RefClass(cWebAppUserDataDictionary)) to hoUserDD&amp;quot; to &amp;quot;Get Create (RefClass(c{&#039;&#039;YourUserTable&#039;&#039;}DataDictionary)) to hoUserDD&amp;quot;&lt;br /&gt;
#Modify the &#039;&#039;&#039;UserLogin&#039;&#039;&#039; function:&lt;br /&gt;
##Replace the line: &amp;quot;Move sLoginName to WebAppUser.LoginName&amp;quot; with &amp;quot;Move sLoginName to {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdCol&#039;&#039;}&lt;br /&gt;
##Replace the line: &amp;quot;If (Found and (Lowercase(sLoginName) = Lowercase(Trim(WebAppUser.LoginName)))) Begin&amp;quot; with &amp;quot;If (Found and (Lowercase(sLoginName) = Lowercase(Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdCol&#039;&#039;})))) Begin&amp;quot;&lt;br /&gt;
##Replace the line: &amp;quot;Get Field_Current_Value of hoUserDD Field WebAppUser.Password to sUserPassword&amp;quot; with &amp;quot;Get Field_Current_Value of hoUserDD Field {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourPasswordCol&#039;&#039;} to sUserPassword&amp;quot;&lt;br /&gt;
##Replace the line: &amp;quot;Set Field_Changed_Value of hoUserDD Field WebAppUser.LastLogin to (CurrentDateTime())&amp;quot; with &amp;quot;Set Field_Changed_Value of hoUserDD Field {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourLastLoginCol&#039;&#039;} to (CurrentDateTime())&amp;quot;  // This one is optional.  You may not have such a column (a date, by default) and if you do not wish to create one just remove the line&lt;br /&gt;
#Modify the &#039;&#039;&#039;UpdateSessionProperties&#039;&#039;&#039; function:&lt;br /&gt;
##Replace the line &amp;quot;Set psUsername to (Trim(WebAppUser.FullName))&amp;quot; with &amp;quot;Set psUsername to (Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourUserFullname&#039;&#039;}))&amp;quot;  // Optional - otherwise just remove the line&lt;br /&gt;
##Replace the line &amp;quot;Set psLoginName to (Trim(WebAppUser.LoginName))&amp;quot; with &amp;quot;Set psLoginName to (Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdColumn&#039;&#039;}))&lt;br /&gt;
##Replace the line: &amp;quot;Set piUserRights to WebAppUser.Rights&amp;quot; with &amp;quot;Set piUserRights to {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourRightsColumn&#039;&#039;}  // Optional - if you don&#039;t have a rights column, remove the line.  Note: if you use an ASCII column, rather than a numeric one for this, you will need to add a different property in the Construct_Object procedure of the class - something like &amp;quot;Property String psUserType&amp;quot; and &amp;quot;Set&amp;quot; that instead&lt;br /&gt;
#Remove all the other methods from your sub-class (they are covered in its super-class cWebSessionManagerStandard):&lt;br /&gt;
##CreateSession&lt;br /&gt;
##ValidateSession&lt;br /&gt;
##IsLoggedIn&lt;br /&gt;
##ComparePasswords&lt;br /&gt;
##OnSessionPropertiesSet&lt;br /&gt;
##OnSessionPropertiesClear&lt;br /&gt;
##EndSession&lt;br /&gt;
&lt;br /&gt;
====Step 5.  Modify SessionManager.wo to use your sub-class:====&lt;br /&gt;
&lt;br /&gt;
#Change: &amp;quot;Use cWebSessionManagerStandard.pkg&amp;quot; to &amp;quot;Use cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}.pkg&amp;quot;&lt;br /&gt;
#Change: &amp;quot;Object oSessionManager is a cWebSessionManagerStandard&amp;quot; to &amp;quot;Object oSessionManager is a cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now you should be good to go and users of your Windows app will/can also be users of your WebApp!&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Using_your_own_user_table_in_WebApps&amp;diff=3417</id>
		<title>Using your own user table in WebApps</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Using_your_own_user_table_in_WebApps&amp;diff=3417"/>
		<updated>2021-04-30T14:02:04Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Minor edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In most cases when creating a WebApp for an existing (Windows) system, that system will already have a mechanism for checking user credentials (i.e. user-name and password) in existance. The Data Access supplied mechanism for WebApps uses its own tables for this and for session management within that. So how do we integrate the two?&lt;br /&gt;
&lt;br /&gt;
Actually it is reasonably simple, but I&#039;m going to go through it line-by-line, so it will seem like a lot, but it really isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
The instructions below assume that your system has a user table; that it has a userID column of some sort; that column is the primary (unique) key; and that column is the sole element of Index.1 on that table. (If that last is &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; the case, you will have to also modify the &amp;quot;Send Find of hoUserDD EQ Index.1&amp;quot; line in the Userlogin procedure in your sub-class to use the correct index.)&lt;br /&gt;
&lt;br /&gt;
Text in {&#039;&#039;italics&#039;&#039;} should be replaced with the appropriate values for your own system.&lt;br /&gt;
&lt;br /&gt;
====Step 1. If you have not already done it, Create a WebApp Project in your workspace.====&lt;br /&gt;
&lt;br /&gt;
====Step 2. From {&#039;&#039;DataFlexInstalledLocation&#039;&#039;}\Pkg:====&lt;br /&gt;
&lt;br /&gt;
# Copy cWebSessionManagerStandard.pkg (note: &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; cWebSessionManager.pkg) to your AppSrc directory, renaming it to cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}.pkg&lt;br /&gt;
# Copy cWebAppUserDataDictionary.pkg and cWebAppSessionDataDictionary.pkg to your DDSrc directory (the former will not actually be used, but will be modified by the next step of the process, so best to copy it too)&lt;br /&gt;
&lt;br /&gt;
====Step 3. Change the relationship of WebAppSession to WebAppUser to point to your user table instead:====&lt;br /&gt;
&lt;br /&gt;
#The relationship needs to be on identically defined columns (same type and size).  I don&#039;t think that we ought to impact the existing system when that can be avoided, so if a change is needed (and it usually will be) the change should be at the WebAppSession table end.  Modify (in the Studio, right-click WebAppSession in the Table Explorer pane/tab, select &amp;quot;Edit Table&amp;quot; and make the required change to the LoginName column) that so that it matches the (unique) primary key (the user ID) of your current user table.  (So if your current user table has a column - say, UserID - which is ASCII 10, modify WebAppSession.LoginName to be ASCII 10 from its original ASCII 20.)&lt;br /&gt;
#In the &amp;quot;Relationships&amp;quot; tab, delete the relationship to WebAppUser (the only one there) and add a replacement pointing to your user table, from LoginName on WebAppSession, to whatever the user ID column is on your user table.&lt;br /&gt;
&lt;br /&gt;
====Step 4. Modify your cWebSessionManager sub-class:====&lt;br /&gt;
&lt;br /&gt;
#Change the use statement: &amp;quot;Use cWebSessionManager.pkg&amp;quot; to &amp;quot;Use cWebSessionManagerStandard.pkg&amp;quot;&lt;br /&gt;
#Replace the use statement: replace &amp;quot;Use cWebAppUserDataDictionary.dd&amp;quot; with &amp;quot;Use c{&#039;&#039;YourUserTable&#039;&#039;}DataDictionary.dd&amp;quot;&lt;br /&gt;
#Change the classname: from &amp;quot;Class cWebSessionManagerStandard is a cWebSessionManager&amp;quot; to &amp;quot;Class cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;} is a cWebSessionManagerStandard&amp;quot; (so sub-classing cWebSessionManagerStandard)&lt;br /&gt;
#Change the user data dictionary instance: in the &#039;&#039;&#039;Construct_Object&#039;&#039;&#039; procedure change &amp;quot;Get Create (RefClass(cWebAppUserDataDictionary)) to hoUserDD&amp;quot; to &amp;quot;Get Create (RefClass(c{&#039;&#039;YourUserTable&#039;&#039;}DataDictionary)) to hoUserDD&amp;quot;&lt;br /&gt;
#Modify the &#039;&#039;&#039;UserLogin&#039;&#039;&#039; function:&lt;br /&gt;
##Replace the line: &amp;quot;Move sLoginName to WebAppUser.LoginName&amp;quot; with &amp;quot;Move sLoginName to {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdCol&#039;&#039;}&lt;br /&gt;
##Replace the line: &amp;quot;If (Found and (Lowercase(sLoginName) = Lowercase(Trim(WebAppUser.LoginName)))) Begin&amp;quot; with &amp;quot;If (Found and (Lowercase(sLoginName) = Lowercase(Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdCol&#039;&#039;})))) Begin&amp;quot;&lt;br /&gt;
##Replace the line: &amp;quot;Get Field_Current_Value of hoUserDD Field WebAppUser.Password to sUserPassword&amp;quot; with &amp;quot;Get Field_Current_Value of hoUserDD Field {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourPasswordCol&#039;&#039;} to sUserPassword&amp;quot;&lt;br /&gt;
##Replace the line: &amp;quot;Set Field_Changed_Value of hoUserDD Field WebAppUser.LastLogin to (CurrentDateTime())&amp;quot; with &amp;quot;Set Field_Changed_Value of hoUserDD Field {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourLastLoginCol&#039;&#039;} to (CurrentDateTime())&amp;quot;  // This one is optional.  You may not have such a column (a date, by default) and if you do not wish to create one just remove the line&lt;br /&gt;
#Modify the &#039;&#039;&#039;UpdateSessionProperties&#039;&#039;&#039; function:&lt;br /&gt;
##Replace the line &amp;quot;Set psUsername to (Trim(WebAppUser.FullName))&amp;quot; with &amp;quot;Set psUsername to (Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourUserFullname&#039;&#039;}))&amp;quot;  // Optional - otherwise just remove the line&lt;br /&gt;
##Replace the line &amp;quot;Set psLoginName to (Trim(WebAppUser.LoginName))&amp;quot; with &amp;quot;Set psLoginName to (Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdColumn&#039;&#039;}))&lt;br /&gt;
##Replace the line: &amp;quot;Set piUserRights to WebAppUser.Rights&amp;quot; with &amp;quot;Set piUserRights to {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourRightsColumn&#039;&#039;}  // Optional - if you don&#039;t have a rights column, remove the line.  Note: if you use an ASCII column, rather than a numeric one for this, you will need to add a different property in the Construct_Object procedure of the class - something like &amp;quot;Property String psUserType&amp;quot; and &amp;quot;Set&amp;quot; that instead&lt;br /&gt;
#Remove all the other methods from your sub-class (they are covered in its super-class cWebSessionManagerStandard):&lt;br /&gt;
##CreateSession&lt;br /&gt;
##ValidateSession&lt;br /&gt;
##IsLoggedIn&lt;br /&gt;
##ComparePasswords&lt;br /&gt;
##OnSessionPropertiesSet&lt;br /&gt;
##OnSessionPropertiesClear&lt;br /&gt;
##EndSession&lt;br /&gt;
&lt;br /&gt;
====Step 5.  Modify SessionManager.wo to use your sub-class:====&lt;br /&gt;
&lt;br /&gt;
#Change: &amp;quot;Use cWebSessionManagerStandard.pkg&amp;quot; to &amp;quot;Use cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}.pkg&amp;quot;&lt;br /&gt;
#Change: &amp;quot;Object oSessionManager is a cWebSessionManagerStandard&amp;quot; to &amp;quot;Object oSessionManager is a cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now you should be good to go and users of your Windows app will/can also be users of your WebApp!&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Using_your_own_user_table_in_WebApps&amp;diff=3416</id>
		<title>Using your own user table in WebApps</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Using_your_own_user_table_in_WebApps&amp;diff=3416"/>
		<updated>2021-04-30T13:48:41Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In most cases when creating a WebApp for an existing (Windows) system, that system will already have a mechanism for checking user credentials (i.e. user-name and password) in existance. The Data Access supplied mechanism for WebApps uses its own tables for this and for session management within that. So how do we integrate the two?&lt;br /&gt;
&lt;br /&gt;
Actually it is reasonably simple, but I&#039;m going to go through it line-by-line, so it will seem like a lot, but it really isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
The instructions below assume that your system has a user table; that it has a userID column of some sort; that column is the primary (unique) key; and that column is the sole element of Index.1 on that table. (If that last is &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; the case, you will have to also modify the &amp;quot;Send Find of hoUserDD EQ Index.1&amp;quot; line in the Userlogin procedure in your sub-class to use the correct index.)&lt;br /&gt;
&lt;br /&gt;
Text in {&#039;&#039;italics&#039;&#039;} should be replaced with the appropriate values for your own system.&lt;br /&gt;
&lt;br /&gt;
====Step 1. If you have not already done it, Create a WebApp Project in your workspace.====&lt;br /&gt;
&lt;br /&gt;
====Step 2. From {&#039;&#039;DataFlexInstalledLocation&#039;&#039;}\Pkg:====&lt;br /&gt;
&lt;br /&gt;
# Copy cWebSessionManagerStandard.pkg (note: &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; cWebSessionManager.pkg) to your AppSrc directory, renaming it to cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}.pkg&lt;br /&gt;
# Copy cWebAppUserDataDictionary.pkg and cWebAppSessionDataDictionary.pkg to your DDSrc directory (the former will not actually be used, but will be modified by the next step of the process, so best to copy it too)&lt;br /&gt;
&lt;br /&gt;
====Step 3. Change the relationship of WebAppSession to WebAppUser to point to your user table instead:====&lt;br /&gt;
&lt;br /&gt;
#The relationship needs to be on identically defined columns (same type and size).  I don&#039;t think that we ought to impact the existing system when that can be avoided, so if a change is needed (and it usually will be) the change should be at the WebAppSession table end.  Modify (in the Studio, right-click WebAppSession in the Table Explorer pane/tab, select &amp;quot;Edit Table&amp;quot; and make the required change to the LoginName column) that so that it matches the (unique) primary key (the user ID) of your current user table.  (So if your current user table has a column - say, UserID - which is ASCII 10, modify WebAppSession.LoginName to be ASCII 10 from its original ASCII 20.)&lt;br /&gt;
#In the &amp;quot;Relationships&amp;quot; tab, delete the relationship to WebAppUser (the only one there) and add a replacement pointing to your user table, from LoginName on WebAppSession, to whatever the user ID column is on your user table.&lt;br /&gt;
&lt;br /&gt;
====Step 4. Modify your cWebSessionManager sub-class:====&lt;br /&gt;
&lt;br /&gt;
#Change the use statement: &amp;quot;Use cWebSessionManager.pkg&amp;quot; to &amp;quot;Use cWebSessionManagerStandard.pkg&amp;quot;&lt;br /&gt;
#Replace the use statement: replace &amp;quot;Use cWebAppUserDataDictionary.dd&amp;quot; with &amp;quot;Use c{&#039;&#039;YourUserTable&#039;&#039;}DataDictionary.dd&amp;quot;&lt;br /&gt;
#Change the classname: from &amp;quot;Class cWebSessionManagerStandard is a cWebSessionManager&amp;quot; to &amp;quot;Class cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;} is a cWebSessionManagerStandard&amp;quot; (so sub-classing cWebSessionManagerStandard)&lt;br /&gt;
#Change the user data dictionary instance: in the &#039;&#039;&#039;Construct_Object&#039;&#039;&#039; procedure change &amp;quot;Get Create (RefClass(cWebAppUserDataDictionary)) to hoUserDD&amp;quot; to &amp;quot;Get Create (RefClass(c{&#039;&#039;YourUserTable&#039;&#039;}DataDictionary)) to hoUserDD&amp;quot;&lt;br /&gt;
#Modify the &#039;&#039;&#039;UserLogin&#039;&#039;&#039; function:&lt;br /&gt;
##Replace the line: &amp;quot;Move sLoginName to WebAppUser.LoginName&amp;quot; with &amp;quot;Move sLoginName to {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdCol&#039;&#039;}&lt;br /&gt;
##Replace the line: &amp;quot;If (Found and (Lowercase(sLoginName) = Lowercase(Trim(WebAppUser.LoginName)))) Begin&amp;quot; with &amp;quot;If (Found and (Lowercase(sLoginName) = Lowercase(Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdCol&#039;&#039;})))) Begin&amp;quot;&lt;br /&gt;
##Replace the line: &amp;quot;Get Field_Current_Value of hoUserDD Field WebAppUser.Password to sUserPassword&amp;quot; with &amp;quot;Get Field_Current_Value of hoUserDD Field {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourPasswordCol&#039;&#039;} to sUserPassword&amp;quot;&lt;br /&gt;
##Replace the line: &amp;quot;Set Field_Changed_Value of hoUserDD Field WebAppUser.LastLogin to (CurrentDateTime())&amp;quot; with &amp;quot;Set Field_Changed_Value of hoUserDD Field {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourLastLoginCol&#039;&#039;} to (CurrentDateTime())&amp;quot;  // This one is optional.  You may not have such a column (a date, by default) and if you do not wish to create one just remove the line&lt;br /&gt;
#Modify the &#039;&#039;&#039;UpdateSessionProperties&#039;&#039;&#039; function:&lt;br /&gt;
##Replace the line &amp;quot;Set psUsername to (Trim(WebAppUser.FullName))&amp;quot; with &amp;quot;Set psUsername to (Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourUserFullname&#039;&#039;}))&amp;quot;  // Optional - otherwise just remove the line&lt;br /&gt;
##Replace the line &amp;quot;Set psLoginName to (Trim(WebAppUser.LoginName))&amp;quot; with &amp;quot;Set psLoginName to (Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdColumn&#039;&#039;}))&lt;br /&gt;
##Replace the line: &amp;quot;Set piUserRights to WebAppUser.Rights&amp;quot; with &amp;quot;Set piUserRights to {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourRightsColumn&#039;&#039;}  // Optional - if you don&#039;t have a rights column, remove the line.  Note: if you use an ASCII column, rather than a numeric one for this, you will need to add a different property in the Construct_Object procedure of the class - something like &amp;quot;Property String psUserType&amp;quot; and &amp;quot;Set&amp;quot; that instead&lt;br /&gt;
#Remove all the other methods from your sub-class (they are covered in cWebSessionManagerStandard) :&lt;br /&gt;
##CreateSession&lt;br /&gt;
##ValidateSession&lt;br /&gt;
##IsLoggedIn&lt;br /&gt;
##ComparePasswords&lt;br /&gt;
##OnSessionPropertiesSet&lt;br /&gt;
##OnSessionPropertiesClear&lt;br /&gt;
##EndSession&lt;br /&gt;
&lt;br /&gt;
====Step 5.  Modify SessionManager.wo to use your sub-class:====&lt;br /&gt;
&lt;br /&gt;
#Change: &amp;quot;Use cWebSessionManagerStandard.pkg&amp;quot; to &amp;quot;Use cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}.pkg&amp;quot;&lt;br /&gt;
#Change: &amp;quot;Object oSessionManager is a cWebSessionManagerStandard&amp;quot; to &amp;quot;Object oSessionManager is a cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now you should be good to go and users of your Windows app will/can also be users of your WebApp!&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Using_your_own_user_table_in_WebApps&amp;diff=3415</id>
		<title>Using your own user table in WebApps</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Using_your_own_user_table_in_WebApps&amp;diff=3415"/>
		<updated>2021-04-30T13:16:46Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Creating&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In most cases when creating a WebApp for an existing (Windows) system, that system will already have a mechanism for checking user credentials (i.e. user-name and password) in existance. The Data Access supplied mechanism for WebApps uses its own tables for this and for session management within that. So how do we integrate the two?&lt;br /&gt;
&lt;br /&gt;
Actually it is reasonably simple, but I&#039;m going to go through it line-by-line, so it will seem like a lot, but it really isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
The instructions below assume that your system has a user table; that it has a userID column of some sort; that column is the primary (unique) key; and that column is the sole element of Index.1 on that table. (If that last is &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; the case, you will have to also modify the &amp;quot;Send Find of hoUserDD EQ Index.1&amp;quot; line in the Userlogin procedure in your sub-class to use the correct index.)&lt;br /&gt;
&lt;br /&gt;
Text in {&#039;&#039;italics&#039;&#039;} should be replaced with the appropriate values for your own system.&lt;br /&gt;
&lt;br /&gt;
====Step 1. If you have not already done it, Create a WebApp Project in your workspace.====&lt;br /&gt;
&lt;br /&gt;
====Step 2. From {&#039;&#039;DataFlexInstalledLocation&#039;&#039;}\Pkg:====&lt;br /&gt;
&lt;br /&gt;
# Copy cWebSessionManagerStandard.pkg (note: &amp;lt;u&amp;gt;not&amp;lt;/u&amp;gt; cWebSessionManager.pkg) to your AppSrc directory, renaming it to cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}.pkg&lt;br /&gt;
# Copy cWebAppUserDataDictionary.pkg and cWebAppSessionDataDictionary.pkg to your DDSrc directory (the former will not actually be used, but will be modified by the next step of the process, so best to copy it too)&lt;br /&gt;
&lt;br /&gt;
====Step 3. Change the relationship of WebAppSession to WebAppUser to point to your user table instead:====&lt;br /&gt;
&lt;br /&gt;
#The relationship needs to be on identically defined columns (same type and size).  I don&#039;t think that we ought to impact the existing system when that can be avoided, so if a change is needed (and it usually will be) the change should be at the WebAppSession table end.  Modify (in the Studio, right-click WebAppSession in the Table Explorer pane/tab, select &amp;quot;Edit Table&amp;quot; and make the required change to the LoginName column) that so that it matches the (unique) primary key (the user ID) of your current user table.  (So if your current user table has a column - say, UserID - which is ASCII 10, modify WebAppSession.LoginName to be ASCII 10 from its original ASCII 20.)&lt;br /&gt;
#In the &amp;quot;Relationships&amp;quot; tab, delete the relationship to WebAppUser (the only one there) and add a replacement pointing to your user table, from LoginName on WebAppSession, to whatever the user ID column is on your user table.&lt;br /&gt;
&lt;br /&gt;
====Step 4. Modify your cWebSessionManager sub-class:====&lt;br /&gt;
&lt;br /&gt;
#Change the use statement: &amp;quot;Use cWebSessionManager.pkg&amp;quot; to &amp;quot;Use cWebSessionManagerStandard.pkg&amp;quot;&lt;br /&gt;
#Replace the use statement: replace &amp;quot;Use cWebAppUserDataDictionary.dd&amp;quot; with &amp;quot;Use c{&#039;&#039;YourUserTable&#039;&#039;}DataDictionary.dd&amp;quot;&lt;br /&gt;
#Change the classname: from &amp;quot;Class cWebSessionManagerStandard is a cWebSessionManager&amp;quot; to &amp;quot;Class cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;} is a cWebSessionManagerStandard&amp;quot; (so sub-classing cWebSessionManagerStandard)&lt;br /&gt;
#Change the user data dictionary instance: in the &#039;&#039;&#039;Construct_Object&#039;&#039;&#039; procedure change &amp;quot;Get Create (RefClass(cWebAppUserDataDictionary)) to hoUserDD&amp;quot; to &amp;quot;Get Create (RefClass(c{&#039;&#039;YourUserTable&#039;&#039;}DataDictionary)) to hoUserDD&amp;quot;&lt;br /&gt;
#Modify the &#039;&#039;&#039;UserLogin&#039;&#039;&#039; function:&lt;br /&gt;
##Replace the line: &amp;quot;Move sLoginName to WebAppUser.LoginName&amp;quot; with &amp;quot;Move sLoginName to {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdCol&#039;&#039;}&lt;br /&gt;
##Replace the line: &amp;quot;If (Found and (Lowercase(sLoginName) = Lowercase(Trim(WebAppUser.LoginName)))) Begin&amp;quot; with &amp;quot;If (Found and (Lowercase(sLoginName) = Lowercase(Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdCol&#039;&#039;})))) Begin&amp;quot;&lt;br /&gt;
##Replace the line: &amp;quot;Get Field_Current_Value of hoUserDD Field WebAppUser.Password to sUserPassword&amp;quot; with &amp;quot;Get Field_Current_Value of hoUserDD Field {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourPasswordCol&#039;&#039;} to sUserPassword&amp;quot;&lt;br /&gt;
##Replace the line: &amp;quot;Set Field_Changed_Value of hoUserDD Field WebAppUser.LastLogin to (CurrentDateTime())&amp;quot; with &amp;quot;Set Field_Changed_Value of hoUserDD Field {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourLastLoginCol&#039;&#039;} to (CurrentDateTime())&amp;quot;  // This one is optional.  You may not have such a column (a date, by default) and if you do not wish to create one just remove the line&lt;br /&gt;
#Modify the &#039;&#039;&#039;UpdateSessionProperties&#039;&#039;&#039; function:&lt;br /&gt;
##Replace the line &amp;quot;Set psUsername to (Trim(WebAppUser.FullName))&amp;quot; with &amp;quot;Set psUsername to (Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourUserFullname&#039;&#039;}))&amp;quot;  // Optional - otherwise just remove the line&lt;br /&gt;
##Replace the line &amp;quot;Set psLoginName to (Trim(WebAppUser.LoginName))&amp;quot; with &amp;quot;Set psLoginName to (Trim({&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourIdColumn&#039;&#039;}))&lt;br /&gt;
##Replace the line: &amp;quot;Set piUserRights to WebAppUser.Rights&amp;quot; with &amp;quot;Set piUserRights to {&#039;&#039;YourUserTable&#039;&#039;}.{&#039;&#039;YourRightColumn&#039;&#039;}  // Optional - if you don&#039;t have a rights column, remove the line.  Note: if you use an ASCII column, rather than a numeric one for this, you will need to add a different property in the Construct_Object procedure of the class - something like &amp;quot;Property String psUserType&amp;quot; and &amp;quot;Set&amp;quot; that instead&lt;br /&gt;
#Remove all the other methods from your sub-class (they are covered in cWebSessionManagerStandard) :&lt;br /&gt;
##CreateSession&lt;br /&gt;
##ValidateSession&lt;br /&gt;
##IsLoggedIn&lt;br /&gt;
##ComparePasswords&lt;br /&gt;
##OnSessionPropertiesSet&lt;br /&gt;
##OnSessionPropertiesClear&lt;br /&gt;
##EndSession&lt;br /&gt;
&lt;br /&gt;
====Step 5.  Modify SessionManager.wo to use your sub-class:====&lt;br /&gt;
&lt;br /&gt;
#Change: &amp;quot;Use cWebSessionManagerStandard.pkg&amp;quot; to &amp;quot;Use cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}.pkg&amp;quot;&lt;br /&gt;
#Change: &amp;quot;Object oSessionManager is a cWebSessionManagerStandard&amp;quot; to &amp;quot;Object oSessionManager is a cWebSessionManager{&#039;&#039;YourSystemName&#039;&#039;}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now you should be good to go and users of your Windows app will/can also be users of your WebApp!&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Read_and_write_files_example&amp;diff=3395</id>
		<title>Read and write files example</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Read_and_write_files_example&amp;diff=3395"/>
		<updated>2021-02-22T14:04:41Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Added link to blog&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Listing for the &amp;quot;Read and write files example&amp;quot; view:==&lt;br /&gt;
&lt;br /&gt;
(From the Unicorn blog post: [https://www.unicorninterglobal.com/company/blog/working-with-binary-files-in-dataflex Working with binary files in DataFlex])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Use Windows.pkg&lt;br /&gt;
Use DFClient.pkg&lt;br /&gt;
Use cCharTranslate.pkg&lt;br /&gt;
Use seq_chnl.pkg&lt;br /&gt;
Use File_dlg.pkg&lt;br /&gt;
Use cTextEdit.pkg&lt;br /&gt;
&lt;br /&gt;
Deferred_View Activate_oReadWriteFiles for ;&lt;br /&gt;
Object oReadWriteFiles is a dbView&lt;br /&gt;
&lt;br /&gt;
    Set Border_Style to Border_Thick&lt;br /&gt;
    Set Size to 155 533&lt;br /&gt;
    Set Location to 1 2&lt;br /&gt;
    Set Label to &amp;quot;Read and write files example&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    Property String  psMyFile&lt;br /&gt;
    Property Integer piOldSize&lt;br /&gt;
    &lt;br /&gt;
    // This is what provides the means to encode/decode base64:&lt;br /&gt;
    Object oTrans is a cCharTranslate&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    // These two functions - ReadMyFile and WriteMyFile - are where the work&lt;br /&gt;
    // gets done.&lt;br /&gt;
    &lt;br /&gt;
    Function ReadMyFile String sFilePathName Returns Boolean&lt;br /&gt;
        Integer iChn&lt;br /&gt;
        UChar[] ucaData&lt;br /&gt;
        String  sFile&lt;br /&gt;
        Boolean bExists&lt;br /&gt;
        &lt;br /&gt;
        // For timing test&lt;br /&gt;
        DateTime dtStart dtEnd&lt;br /&gt;
        Timespan tsDiff&lt;br /&gt;
        &lt;br /&gt;
        // Check file exists&lt;br /&gt;
        File_Exist sFilePathName bExists&lt;br /&gt;
        &lt;br /&gt;
        If not bExists Begin&lt;br /&gt;
            Send UserError (&#039;File &amp;quot;&#039; + sFilePathName + &#039;&amp;quot; was not found&#039;) &amp;quot;File not found&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Get Seq_New_Channel to iChn&lt;br /&gt;
        Direct_Input channel iChn (&amp;quot;Binary:&amp;quot; + sFilePathName)&lt;br /&gt;
        &lt;br /&gt;
        If not (SeqEof) Begin&lt;br /&gt;
            &lt;br /&gt;
            // Timing test&lt;br /&gt;
            Move (CurrentDateTime()) to dtStart&lt;br /&gt;
            &lt;br /&gt;
            Read_Block channel iChn ucaData -1&lt;br /&gt;
            Move (Base64EncodeUCharArray(oTrans(Self), ucaData)) to ucaData&lt;br /&gt;
            Set_Argument_Size (SizeOfArray(ucaData) + 1)&lt;br /&gt;
            Move (UCharArrayToString(ucaData)) to sFile&lt;br /&gt;
&lt;br /&gt;
            // Timeing test&lt;br /&gt;
            Move (CurrentDateTime()) to dtEnd&lt;br /&gt;
            Move (dtEnd - dtStart) to tsDiff&lt;br /&gt;
//            Showln (&amp;quot;Read: &amp;quot; * String(SpanTotalMilliseconds(tsDiff)) + &amp;quot;ms&amp;quot;)&lt;br /&gt;
        End&lt;br /&gt;
        Else Begin&lt;br /&gt;
            Send UserError (&#039;File &amp;quot;&#039; + sFilePathName + &#039;&amp;quot; does not exist or was empty&#039;) &amp;quot;File Error&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Close_Output channel iChn&lt;br /&gt;
        Send Seq_Release_Channel iChn&lt;br /&gt;
        Set psMyFile to sFile&lt;br /&gt;
        &lt;br /&gt;
        Function_Return True&lt;br /&gt;
    End_Function&lt;br /&gt;
&lt;br /&gt;
    Function WriteMyFile String sFilePathName Returns Boolean&lt;br /&gt;
        Integer iChn iPos iResp&lt;br /&gt;
        UChar[] ucaFile&lt;br /&gt;
        String  sPath sDir sFile&lt;br /&gt;
        Boolean bExists&lt;br /&gt;
        &lt;br /&gt;
        // For timing test&lt;br /&gt;
        DateTime dtStart dtEnd&lt;br /&gt;
        Timespan tsDiff&lt;br /&gt;
&lt;br /&gt;
        Move (RightPos(&amp;quot;\&amp;quot;, sFilePathName)) to iPos&lt;br /&gt;
        &lt;br /&gt;
        If not iPos Begin&lt;br /&gt;
            Send UserError &amp;quot;Could not find folder&amp;quot; &amp;quot;Folder Error&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Move (Left(sFilePathName, (iPos - 1))) to sPath&lt;br /&gt;
        &lt;br /&gt;
        File_Exist sPath bExists&lt;br /&gt;
        &lt;br /&gt;
        If not bExists Begin&lt;br /&gt;
            Send UserError (&#039;Folder &amp;quot;&#039; + sPath + &#039;&amp;quot; does not exist&#039;) &amp;quot;Folder Error&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Move (Right(sFilePathName, (Length(sFilePathName) - iPos))) to sFile&lt;br /&gt;
        File_Exist sFilePathName bExists&lt;br /&gt;
        &lt;br /&gt;
        If bExists Begin&lt;br /&gt;
            Move (Right(sFilePathName, (Length(sFilePathName) - iPos))) to sFile&lt;br /&gt;
            Get YesNo_Box ;&lt;br /&gt;
                (&#039;The file &amp;quot;&#039; + sFile + &#039;&amp;quot; already exists in folder&#039; * sPath + &#039;. Do you wish to overwrite it?&#039;) ;&lt;br /&gt;
                &amp;quot;Overwrite file?&amp;quot; to iResp&lt;br /&gt;
                &lt;br /&gt;
            If (iResp = MBR_NO) ;&lt;br /&gt;
                Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
                &lt;br /&gt;
        Move (StringToUCharArray(psMyFile(Self))) to ucaFile&lt;br /&gt;
        Move (Base64DecodeUCharArray(oTrans(Self), ucaFile)) to ucaFile&lt;br /&gt;
        &lt;br /&gt;
        // If some other program has the file open (and in some cases, has even&lt;br /&gt;
        // previously had the file open), writing to it may fail, so we catch&lt;br /&gt;
        // that error in order to deal with it ourselves and return &amp;quot;failure&amp;quot;&lt;br /&gt;
        // rather &amp;quot;success&amp;quot;, resetting it after the write operation, and use the&lt;br /&gt;
        // ERR global indicator to detect the problem.&lt;br /&gt;
        Send Ignore_Error of Error_Object_Id 32&lt;br /&gt;
        Move False to Err&lt;br /&gt;
        &lt;br /&gt;
        // Timing test&lt;br /&gt;
        Move (CurrentDateTime()) to dtStart&lt;br /&gt;
&lt;br /&gt;
        Get Seq_New_Channel to iChn&lt;br /&gt;
        Direct_Output channel iChn (&amp;quot;Binary:&amp;quot; + sFilePathName)&lt;br /&gt;
        Write channel iChn ucaFile&lt;br /&gt;
        Close_Output channel iChn&lt;br /&gt;
        Send Seq_Release_Channel iChn&lt;br /&gt;
        Send Trap_Error of Error_Object_Id 32&lt;br /&gt;
        &lt;br /&gt;
        // Timing test&lt;br /&gt;
        Move (CurrentDateTime()) to dtEnd&lt;br /&gt;
        Move (dtEnd - dtStart) to tsDiff&lt;br /&gt;
//        Showln (&amp;quot;Write:&amp;quot; * String(SpanTotalMilliseconds(tsDiff)) + &amp;quot;ms&amp;quot;)&lt;br /&gt;
        &lt;br /&gt;
        If (Err) Begin&lt;br /&gt;
            Send UserError (&#039;There was an error writing to file &amp;quot;&#039; + sFilePathName + &#039;&amp;quot;&#039;) &amp;quot;Write Error&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Function_Return True&lt;br /&gt;
    End_Function&lt;br /&gt;
    &lt;br /&gt;
    // The user interface...&lt;br /&gt;
    &lt;br /&gt;
    Object oOpenDialog is a OpenDialog&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oSaveAsDialog is a SaveAsDialog&lt;br /&gt;
    End_Object&lt;br /&gt;
    &lt;br /&gt;
    Object oRead is a Form&lt;br /&gt;
        Set Size to 13 390&lt;br /&gt;
        Set Location to 3 86&lt;br /&gt;
        Set Label to &amp;quot;File path-name to read:&amp;quot;&lt;br /&gt;
        Set psToolTip to &amp;quot;File path-name to read&amp;quot;&lt;br /&gt;
        Set Label_Justification_Mode to JMode_Right&lt;br /&gt;
        Set Label_Col_Offset to 2&lt;br /&gt;
        Set Value to ;&lt;br /&gt;
            &amp;quot;C:\Program Files (x86)\DataFlex 19.1\Documentation\Installation_and_Environment_Guide.pdf&amp;quot;&lt;br /&gt;
        Set Prompt_Button_Mode to PB_PromptOn&lt;br /&gt;
        Set peAnchors to anTopLeftRight&lt;br /&gt;
        &lt;br /&gt;
        Procedure Prompt&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            String  sFile&lt;br /&gt;
            &lt;br /&gt;
            Get Show_Dialog of oOpenDialog      to bOK&lt;br /&gt;
            &lt;br /&gt;
            If bOK Begin&lt;br /&gt;
                Get File_Name of oOpenDialog    to sFile&lt;br /&gt;
                Set Value                       to sFile&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
        End_Procedure&lt;br /&gt;
        &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oDoRead is a Button&lt;br /&gt;
        Set Size to 14 47&lt;br /&gt;
        Set Location to 3 480&lt;br /&gt;
        Set Label to &amp;quot;Read file&amp;quot;&lt;br /&gt;
        Set peAnchors to anTopRight&lt;br /&gt;
    &lt;br /&gt;
        Procedure OnClick&lt;br /&gt;
            String  sFile&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            Integer iOldSize iNewSize&lt;br /&gt;
            &lt;br /&gt;
            Get_Argument_Size                   to iOldSize&lt;br /&gt;
            Set piOldSize                       to iOldSize&lt;br /&gt;
            Set Value of oBase64File            to &amp;quot;&amp;quot;&lt;br /&gt;
            &lt;br /&gt;
            Get Value of oRead   to sFile&lt;br /&gt;
            Get ReadMyFile sFile to bOK&lt;br /&gt;
            &lt;br /&gt;
            Set Enabled_State of oWrite         to bOK&lt;br /&gt;
            Set Enabled_State of oDoWrite       to bOK&lt;br /&gt;
            &lt;br /&gt;
            If bOK Begin&lt;br /&gt;
                Get_Argument_Size               to iNewSize&lt;br /&gt;
                Set piMaxChars of oBase64File   to iNewSize&lt;br /&gt;
                Set Value of oBase64File to (If(bOK, psMyFile(Self), &amp;quot;&amp;quot;))&lt;br /&gt;
            End&lt;br /&gt;
            Else Begin&lt;br /&gt;
                Set_Argument_Size (piOldSize(Self))&lt;br /&gt;
                Set piMaxChars of oBase64File   to (piOldSize(Self))&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Send Info_Box (&#039;File &amp;quot;&#039; + sFile + ;&lt;br /&gt;
                If(bOK, &#039;&amp;quot; was read successfully&#039;, &#039;&amp;quot; could not be read&#039;)) ;&lt;br /&gt;
                (If(bOK, &amp;quot;Success&amp;quot;, &amp;quot;Failure&amp;quot;))            &lt;br /&gt;
        End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oWrite is a Form&lt;br /&gt;
        Set Size to 13 390&lt;br /&gt;
        Set Location to 20 86&lt;br /&gt;
        Set Label to &amp;quot;File path-name to write:&amp;quot;&lt;br /&gt;
        Set Label_Justification_Mode to JMode_Right&lt;br /&gt;
        Set Label_Col_Offset to 2&lt;br /&gt;
        Set Enabled_State to False&lt;br /&gt;
        Set Value to &amp;quot;C:\Temp\MyTestFile.pdf&amp;quot;&lt;br /&gt;
        Set Prompt_Button_Mode to PB_PromptOn&lt;br /&gt;
        Set peAnchors to anTopLeftRight&lt;br /&gt;
                &lt;br /&gt;
        Procedure Prompt&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            String  sFile&lt;br /&gt;
            &lt;br /&gt;
            Get Show_Dialog of oSaveAsDialog    to bOK&lt;br /&gt;
            &lt;br /&gt;
            If bOK Begin&lt;br /&gt;
                Get File_Name of oSaveAsDialog  to sFile&lt;br /&gt;
                Set Value                       to sFile&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
        End_Procedure&lt;br /&gt;
        &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oDoWrite is a Button&lt;br /&gt;
        Set Size to 14 47&lt;br /&gt;
        Set Location to 20 480&lt;br /&gt;
        Set Label to &amp;quot;Write file&amp;quot;&lt;br /&gt;
        Set Enabled_State to False&lt;br /&gt;
        Set peAnchors to anTopRight&lt;br /&gt;
    &lt;br /&gt;
        Procedure OnClick&lt;br /&gt;
            String  sFile&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            &lt;br /&gt;
            Get Value of oWrite                 to sFile&lt;br /&gt;
            &lt;br /&gt;
            If (sFile = &amp;quot;&amp;quot;) Begin&lt;br /&gt;
                Send Info_Box &amp;quot;You must enter a file path and name to write to&amp;quot; &amp;quot;Enter Filepath&amp;quot;&lt;br /&gt;
                Procedure_Return&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Get WriteMyFile sFile               to bOK&lt;br /&gt;
            &lt;br /&gt;
            Set Enabled_State of oWrite         to (not(bOK))&lt;br /&gt;
            Set Enabled_State of oDoWrite       to (not(bOK))&lt;br /&gt;
            &lt;br /&gt;
            If bOK Begin&lt;br /&gt;
                Set Value of oBase64File        to &amp;quot;&amp;quot;&lt;br /&gt;
                Set psMyFile                    to &amp;quot;&amp;quot;&lt;br /&gt;
                Set_Argument_Size (piOldSize(Self))&lt;br /&gt;
                Set piMaxChars of oBase64File   to (piOldSize(Self))&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Send Info_Box (&#039;File &amp;quot;&#039; + sFile + ;&lt;br /&gt;
                     If(bOK, &#039;&amp;quot; was written successfully&#039;, &#039;&amp;quot; was not written&#039;)) ;&lt;br /&gt;
                    (If(bOK, &amp;quot;Success&amp;quot;, &amp;quot;Failure&amp;quot;))&lt;br /&gt;
        End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oBase64File is a cTextEdit&lt;br /&gt;
        Set Size to 101 520&lt;br /&gt;
        Set Location to 46 6&lt;br /&gt;
        Set Read_Only_State to True&lt;br /&gt;
        Set Label to &amp;quot;Base64 Encoded File (will be gibberish... unless vous parlez base64!):&amp;quot;&lt;br /&gt;
        Set peAnchors to anAll&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
CD_End_Object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Read_and_write_files_example&amp;diff=3394</id>
		<title>Read and write files example</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Read_and_write_files_example&amp;diff=3394"/>
		<updated>2021-02-18T07:59:06Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Creating&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Listing for the &amp;quot;Read and write files example&amp;quot; view:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vdf&amp;quot;&amp;gt;&lt;br /&gt;
Use Windows.pkg&lt;br /&gt;
Use DFClient.pkg&lt;br /&gt;
Use cCharTranslate.pkg&lt;br /&gt;
Use seq_chnl.pkg&lt;br /&gt;
Use File_dlg.pkg&lt;br /&gt;
Use cTextEdit.pkg&lt;br /&gt;
&lt;br /&gt;
Deferred_View Activate_oReadWriteFiles for ;&lt;br /&gt;
Object oReadWriteFiles is a dbView&lt;br /&gt;
&lt;br /&gt;
    Set Border_Style to Border_Thick&lt;br /&gt;
    Set Size to 155 533&lt;br /&gt;
    Set Location to 1 2&lt;br /&gt;
    Set Label to &amp;quot;Read and write files example&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    Property String  psMyFile&lt;br /&gt;
    Property Integer piOldSize&lt;br /&gt;
    &lt;br /&gt;
    // This is what provides the means to encode/decode base64:&lt;br /&gt;
    Object oTrans is a cCharTranslate&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    // These two functions - ReadMyFile and WriteMyFile - are where the work&lt;br /&gt;
    // gets done.&lt;br /&gt;
    &lt;br /&gt;
    Function ReadMyFile String sFilePathName Returns Boolean&lt;br /&gt;
        Integer iChn&lt;br /&gt;
        UChar[] ucaData&lt;br /&gt;
        String  sFile&lt;br /&gt;
        Boolean bExists&lt;br /&gt;
        &lt;br /&gt;
        // For timing test&lt;br /&gt;
        DateTime dtStart dtEnd&lt;br /&gt;
        Timespan tsDiff&lt;br /&gt;
        &lt;br /&gt;
        // Check file exists&lt;br /&gt;
        File_Exist sFilePathName bExists&lt;br /&gt;
        &lt;br /&gt;
        If not bExists Begin&lt;br /&gt;
            Send UserError (&#039;File &amp;quot;&#039; + sFilePathName + &#039;&amp;quot; was not found&#039;) &amp;quot;File not found&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Get Seq_New_Channel to iChn&lt;br /&gt;
        Direct_Input channel iChn (&amp;quot;Binary:&amp;quot; + sFilePathName)&lt;br /&gt;
        &lt;br /&gt;
        If not (SeqEof) Begin&lt;br /&gt;
            &lt;br /&gt;
            // Timing test&lt;br /&gt;
            Move (CurrentDateTime()) to dtStart&lt;br /&gt;
            &lt;br /&gt;
            Read_Block channel iChn ucaData -1&lt;br /&gt;
            Move (Base64EncodeUCharArray(oTrans(Self), ucaData)) to ucaData&lt;br /&gt;
            Set_Argument_Size (SizeOfArray(ucaData) + 1)&lt;br /&gt;
            Move (UCharArrayToString(ucaData)) to sFile&lt;br /&gt;
&lt;br /&gt;
            // Timeing test&lt;br /&gt;
            Move (CurrentDateTime()) to dtEnd&lt;br /&gt;
            Move (dtEnd - dtStart) to tsDiff&lt;br /&gt;
//            Showln (&amp;quot;Read: &amp;quot; * String(SpanTotalMilliseconds(tsDiff)) + &amp;quot;ms&amp;quot;)&lt;br /&gt;
        End&lt;br /&gt;
        Else Begin&lt;br /&gt;
            Send UserError (&#039;File &amp;quot;&#039; + sFilePathName + &#039;&amp;quot; does not exist or was empty&#039;) &amp;quot;File Error&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Close_Output channel iChn&lt;br /&gt;
        Send Seq_Release_Channel iChn&lt;br /&gt;
        Set psMyFile to sFile&lt;br /&gt;
        &lt;br /&gt;
        Function_Return True&lt;br /&gt;
    End_Function&lt;br /&gt;
&lt;br /&gt;
    Function WriteMyFile String sFilePathName Returns Boolean&lt;br /&gt;
        Integer iChn iPos iResp&lt;br /&gt;
        UChar[] ucaFile&lt;br /&gt;
        String  sPath sDir sFile&lt;br /&gt;
        Boolean bExists&lt;br /&gt;
        &lt;br /&gt;
        // For timing test&lt;br /&gt;
        DateTime dtStart dtEnd&lt;br /&gt;
        Timespan tsDiff&lt;br /&gt;
&lt;br /&gt;
        Move (RightPos(&amp;quot;\&amp;quot;, sFilePathName)) to iPos&lt;br /&gt;
        &lt;br /&gt;
        If not iPos Begin&lt;br /&gt;
            Send UserError &amp;quot;Could not find folder&amp;quot; &amp;quot;Folder Error&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Move (Left(sFilePathName, (iPos - 1))) to sPath&lt;br /&gt;
        &lt;br /&gt;
        File_Exist sPath bExists&lt;br /&gt;
        &lt;br /&gt;
        If not bExists Begin&lt;br /&gt;
            Send UserError (&#039;Folder &amp;quot;&#039; + sPath + &#039;&amp;quot; does not exist&#039;) &amp;quot;Folder Error&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Move (Right(sFilePathName, (Length(sFilePathName) - iPos))) to sFile&lt;br /&gt;
        File_Exist sFilePathName bExists&lt;br /&gt;
        &lt;br /&gt;
        If bExists Begin&lt;br /&gt;
            Move (Right(sFilePathName, (Length(sFilePathName) - iPos))) to sFile&lt;br /&gt;
            Get YesNo_Box ;&lt;br /&gt;
                (&#039;The file &amp;quot;&#039; + sFile + &#039;&amp;quot; already exists in folder&#039; * sPath + &#039;. Do you wish to overwrite it?&#039;) ;&lt;br /&gt;
                &amp;quot;Overwrite file?&amp;quot; to iResp&lt;br /&gt;
                &lt;br /&gt;
            If (iResp = MBR_NO) ;&lt;br /&gt;
                Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
                &lt;br /&gt;
        Move (StringToUCharArray(psMyFile(Self))) to ucaFile&lt;br /&gt;
        Move (Base64DecodeUCharArray(oTrans(Self), ucaFile)) to ucaFile&lt;br /&gt;
        &lt;br /&gt;
        // If some other program has the file open (and in some cases, has even&lt;br /&gt;
        // previously had the file open), writing to it may fail, so we catch&lt;br /&gt;
        // that error in order to deal with it ourselves and return &amp;quot;failure&amp;quot;&lt;br /&gt;
        // rather &amp;quot;success&amp;quot;, resetting it after the write operation, and use the&lt;br /&gt;
        // ERR global indicator to detect the problem.&lt;br /&gt;
        Send Ignore_Error of Error_Object_Id 32&lt;br /&gt;
        Move False to Err&lt;br /&gt;
        &lt;br /&gt;
        // Timing test&lt;br /&gt;
        Move (CurrentDateTime()) to dtStart&lt;br /&gt;
&lt;br /&gt;
        Get Seq_New_Channel to iChn&lt;br /&gt;
        Direct_Output channel iChn (&amp;quot;Binary:&amp;quot; + sFilePathName)&lt;br /&gt;
        Write channel iChn ucaFile&lt;br /&gt;
        Close_Output channel iChn&lt;br /&gt;
        Send Seq_Release_Channel iChn&lt;br /&gt;
        Send Trap_Error of Error_Object_Id 32&lt;br /&gt;
        &lt;br /&gt;
        // Timing test&lt;br /&gt;
        Move (CurrentDateTime()) to dtEnd&lt;br /&gt;
        Move (dtEnd - dtStart) to tsDiff&lt;br /&gt;
//        Showln (&amp;quot;Write:&amp;quot; * String(SpanTotalMilliseconds(tsDiff)) + &amp;quot;ms&amp;quot;)&lt;br /&gt;
        &lt;br /&gt;
        If (Err) Begin&lt;br /&gt;
            Send UserError (&#039;There was an error writing to file &amp;quot;&#039; + sFilePathName + &#039;&amp;quot;&#039;) &amp;quot;Write Error&amp;quot;&lt;br /&gt;
            Function_Return False&lt;br /&gt;
        End&lt;br /&gt;
        &lt;br /&gt;
        Function_Return True&lt;br /&gt;
    End_Function&lt;br /&gt;
    &lt;br /&gt;
    // The user interface...&lt;br /&gt;
    &lt;br /&gt;
    Object oOpenDialog is a OpenDialog&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oSaveAsDialog is a SaveAsDialog&lt;br /&gt;
    End_Object&lt;br /&gt;
    &lt;br /&gt;
    Object oRead is a Form&lt;br /&gt;
        Set Size to 13 390&lt;br /&gt;
        Set Location to 3 86&lt;br /&gt;
        Set Label to &amp;quot;File path-name to read:&amp;quot;&lt;br /&gt;
        Set psToolTip to &amp;quot;File path-name to read&amp;quot;&lt;br /&gt;
        Set Label_Justification_Mode to JMode_Right&lt;br /&gt;
        Set Label_Col_Offset to 2&lt;br /&gt;
        Set Value to ;&lt;br /&gt;
            &amp;quot;C:\Program Files (x86)\DataFlex 19.1\Documentation\Installation_and_Environment_Guide.pdf&amp;quot;&lt;br /&gt;
        Set Prompt_Button_Mode to PB_PromptOn&lt;br /&gt;
        Set peAnchors to anTopLeftRight&lt;br /&gt;
        &lt;br /&gt;
        Procedure Prompt&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            String  sFile&lt;br /&gt;
            &lt;br /&gt;
            Get Show_Dialog of oOpenDialog      to bOK&lt;br /&gt;
            &lt;br /&gt;
            If bOK Begin&lt;br /&gt;
                Get File_Name of oOpenDialog    to sFile&lt;br /&gt;
                Set Value                       to sFile&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
        End_Procedure&lt;br /&gt;
        &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oDoRead is a Button&lt;br /&gt;
        Set Size to 14 47&lt;br /&gt;
        Set Location to 3 480&lt;br /&gt;
        Set Label to &amp;quot;Read file&amp;quot;&lt;br /&gt;
        Set peAnchors to anTopRight&lt;br /&gt;
    &lt;br /&gt;
        Procedure OnClick&lt;br /&gt;
            String  sFile&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            Integer iOldSize iNewSize&lt;br /&gt;
            &lt;br /&gt;
            Get_Argument_Size                   to iOldSize&lt;br /&gt;
            Set piOldSize                       to iOldSize&lt;br /&gt;
            Set Value of oBase64File            to &amp;quot;&amp;quot;&lt;br /&gt;
            &lt;br /&gt;
            Get Value of oRead   to sFile&lt;br /&gt;
            Get ReadMyFile sFile to bOK&lt;br /&gt;
            &lt;br /&gt;
            Set Enabled_State of oWrite         to bOK&lt;br /&gt;
            Set Enabled_State of oDoWrite       to bOK&lt;br /&gt;
            &lt;br /&gt;
            If bOK Begin&lt;br /&gt;
                Get_Argument_Size               to iNewSize&lt;br /&gt;
                Set piMaxChars of oBase64File   to iNewSize&lt;br /&gt;
                Set Value of oBase64File to (If(bOK, psMyFile(Self), &amp;quot;&amp;quot;))&lt;br /&gt;
            End&lt;br /&gt;
            Else Begin&lt;br /&gt;
                Set_Argument_Size (piOldSize(Self))&lt;br /&gt;
                Set piMaxChars of oBase64File   to (piOldSize(Self))&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Send Info_Box (&#039;File &amp;quot;&#039; + sFile + ;&lt;br /&gt;
                If(bOK, &#039;&amp;quot; was read successfully&#039;, &#039;&amp;quot; could not be read&#039;)) ;&lt;br /&gt;
                (If(bOK, &amp;quot;Success&amp;quot;, &amp;quot;Failure&amp;quot;))            &lt;br /&gt;
        End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oWrite is a Form&lt;br /&gt;
        Set Size to 13 390&lt;br /&gt;
        Set Location to 20 86&lt;br /&gt;
        Set Label to &amp;quot;File path-name to write:&amp;quot;&lt;br /&gt;
        Set Label_Justification_Mode to JMode_Right&lt;br /&gt;
        Set Label_Col_Offset to 2&lt;br /&gt;
        Set Enabled_State to False&lt;br /&gt;
        Set Value to &amp;quot;C:\Temp\MyTestFile.pdf&amp;quot;&lt;br /&gt;
        Set Prompt_Button_Mode to PB_PromptOn&lt;br /&gt;
        Set peAnchors to anTopLeftRight&lt;br /&gt;
                &lt;br /&gt;
        Procedure Prompt&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            String  sFile&lt;br /&gt;
            &lt;br /&gt;
            Get Show_Dialog of oSaveAsDialog    to bOK&lt;br /&gt;
            &lt;br /&gt;
            If bOK Begin&lt;br /&gt;
                Get File_Name of oSaveAsDialog  to sFile&lt;br /&gt;
                Set Value                       to sFile&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
        End_Procedure&lt;br /&gt;
        &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oDoWrite is a Button&lt;br /&gt;
        Set Size to 14 47&lt;br /&gt;
        Set Location to 20 480&lt;br /&gt;
        Set Label to &amp;quot;Write file&amp;quot;&lt;br /&gt;
        Set Enabled_State to False&lt;br /&gt;
        Set peAnchors to anTopRight&lt;br /&gt;
    &lt;br /&gt;
        Procedure OnClick&lt;br /&gt;
            String  sFile&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            &lt;br /&gt;
            Get Value of oWrite                 to sFile&lt;br /&gt;
            &lt;br /&gt;
            If (sFile = &amp;quot;&amp;quot;) Begin&lt;br /&gt;
                Send Info_Box &amp;quot;You must enter a file path and name to write to&amp;quot; &amp;quot;Enter Filepath&amp;quot;&lt;br /&gt;
                Procedure_Return&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Get WriteMyFile sFile               to bOK&lt;br /&gt;
            &lt;br /&gt;
            Set Enabled_State of oWrite         to (not(bOK))&lt;br /&gt;
            Set Enabled_State of oDoWrite       to (not(bOK))&lt;br /&gt;
            &lt;br /&gt;
            If bOK Begin&lt;br /&gt;
                Set Value of oBase64File        to &amp;quot;&amp;quot;&lt;br /&gt;
                Set psMyFile                    to &amp;quot;&amp;quot;&lt;br /&gt;
                Set_Argument_Size (piOldSize(Self))&lt;br /&gt;
                Set piMaxChars of oBase64File   to (piOldSize(Self))&lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
            Send Info_Box (&#039;File &amp;quot;&#039; + sFile + ;&lt;br /&gt;
                     If(bOK, &#039;&amp;quot; was written successfully&#039;, &#039;&amp;quot; was not written&#039;)) ;&lt;br /&gt;
                    (If(bOK, &amp;quot;Success&amp;quot;, &amp;quot;Failure&amp;quot;))&lt;br /&gt;
        End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
    Object oBase64File is a cTextEdit&lt;br /&gt;
        Set Size to 101 520&lt;br /&gt;
        Set Location to 46 6&lt;br /&gt;
        Set Read_Only_State to True&lt;br /&gt;
        Set Label to &amp;quot;Base64 Encoded File (will be gibberish... unless vous parlez base64!):&amp;quot;&lt;br /&gt;
        Set peAnchors to anAll&lt;br /&gt;
    End_Object&lt;br /&gt;
&lt;br /&gt;
CD_End_Object&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=UK_DataFlex_Group&amp;diff=3344</id>
		<title>UK DataFlex Group</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=UK_DataFlex_Group&amp;diff=3344"/>
		<updated>2020-07-08T09:14:52Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Added mail link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The UK DataFlex Group started in October 2018, to bring together people who manage and develop DataFlex software in the UK. Of course, DataFlexers from further afield are welcome! &lt;br /&gt;
&lt;br /&gt;
Generally this group aims to have informal, one day events covering just a few main topics, with focus on finding out more about what each other are working on and how the group can work together to help each other.&lt;br /&gt;
&lt;br /&gt;
A summary of each event, with relevant links to presentations etc. will be listed on this page.&lt;br /&gt;
&lt;br /&gt;
==Events==&lt;br /&gt;
&lt;br /&gt;
===9th July 2020===&lt;br /&gt;
Zoom meetup&lt;br /&gt;
&lt;br /&gt;
Time: Jul 9, 2020 07:00 PM London  (This is 2:00PM EST)&lt;br /&gt;
&lt;br /&gt;
This will be our first &#039;virtual&#039; meetup using Zoom. The advantage of this being a Zoom meetup, rather than our usual UK based meetups, is that anyone can join.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How to join the Zoom meetup&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you would like to attend the meetup, but have not received an email invitation, containing the meeting link and sign in details (only sent to the opted in, UK group), please email [mailto:info@unicorninterglobal.com info@unicorninterglobal.com] and we will email you the meeting details.&lt;br /&gt;
&lt;br /&gt;
Please add any suggestions or things you would like to be discussed below this point.&lt;br /&gt;
&lt;br /&gt;
Looking forward to seeing you all there. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===13th May 2020 - Cancelled ===&lt;br /&gt;
[https://www.kingshoteluk.com/  King&#039;s Hotel], Oxford Rd, Stokenchurch, High Wycombe HP14 3TA  &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See the date, location and agenda from the link below.&lt;br /&gt;
&lt;br /&gt;
[https://www.unicorninterglobal.com/news/uk-dataflex-meetup-13th-may-2020 May 2020 UK DataFlex Group meetup]&lt;br /&gt;
&lt;br /&gt;
Sadly this event was cancelled due to COVID-19. As soon as it is safe for everyone, we will arrange the next meetup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===2nd October 2019===&lt;br /&gt;
[https://www.eynshamhall.com/ Eynsham Hall Hotel &amp;amp; Spa], Witney, Oxfordshire, OX29 6PN &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See the date, location and agenda from the link below.&lt;br /&gt;
&lt;br /&gt;
[https://www.unicorninterglobal.com/news/2019/uk-dataflex-meetup-2nd-october-2019 October 2019 UK DataFlex Group meetup]&lt;br /&gt;
&lt;br /&gt;
Summary of the day:&lt;br /&gt;
&lt;br /&gt;
* Harm Wibier from Data Access Europe gave a DataFlex NextGen presentation, covering 64-bit and Unicode. Note, you can find out more or contribute to this subject on the page [[Make your applications work in DataFlex NextGen]].&lt;br /&gt;
&lt;br /&gt;
* Next up, David Knowles from DonorFlex gave an informative presentation on how he has used [https://www.dataaccess.eu/products/dataflex-reports-245 DataFlex Reports] to significantly reduce the number of Crystal Reports that they were previously using. &lt;br /&gt;
&lt;br /&gt;
* Harm then gave an overview of how to cleanup your code for DataFlex 19.1. This is an optional process and is mostly handled through a new compiler warning system. Your existing applications will continue to run the same, but you may need to make a few changes. You can read more about code cleanup in the [https://docs.dataaccess.com/dataflexhelp/#t=mergedProjects/Welcome/Language_and_Code_Cleanup.htm DataFlex Help - Language and Code Cleanup]&lt;br /&gt;
&lt;br /&gt;
* Peter Bragg showed us how DonorFlex developed a new Web application based on their extensive DonorFlex Windows application. It was very interesting to see how the Web app that Peter demoed was using virtually out of the box settings.&lt;br /&gt;
&lt;br /&gt;
* Mike Peat talked about MySQL, DataFlex, MariaDB and Aurora and gave some price and speed comparisons for them, then demonstrated setting up an [https://aws.amazon.com/rds/aurora/ Amazon RDS Aurora] database and converted the DataFlex WebOrder sample to it. This presentation was based on the  Synergy 2019 presentation &#039;MySQL and More for DataFlex&#039;. You can view the slides from the [https://synergy.dataaccess.com/index.php/presentations-2/ Synergy 2019 presentations page].&lt;br /&gt;
&lt;br /&gt;
* Lastly, we rounded up with a general question and answer session - always useful to hear other people&#039;s suggestions and solutions to your own problems!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The date for the next UK DataFlex Group meetup was set for the 13th May 2020.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===1st May 2019===&lt;br /&gt;
[https://www.eynshamhall.com/ Eynsham Hall Hotel &amp;amp; Spa], Witney, Oxfordshire, OX29 6PN &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See the date, location and agenda from the link below.&lt;br /&gt;
&lt;br /&gt;
[https://www.unicorninterglobal.com/news/2019/uk-dataflex-meetup-1st-may-2019 May 2019 UK DataFlex Group meetup]&lt;br /&gt;
&lt;br /&gt;
A quick summary of the day:&lt;br /&gt;
&lt;br /&gt;
* Hilton Gray gave us an overview of Clubwise&#039;s business, their current technology stack and where they were going with it, followed by discussions prompted by that.&lt;br /&gt;
&lt;br /&gt;
* Wil van Antwerpen gave a presentation on [https://projects.vdf-guidance.com/projects/hammer The Hammer].&lt;br /&gt;
&lt;br /&gt;
* We had a bit of discussion about how we would like the group to continue: we all liked the venue (Eynsham Hall Hotel), so decided to meet there again on Wednesday 2nd October.&lt;br /&gt;
&lt;br /&gt;
* Simon Gottschalk gave a presentation on how his Shipping Vessel Registration system used Sencha&#039;s ExtJS as a front-end to his back-end DataFlex system, the current DA web/JS framework not having been available when he started developing it.&lt;br /&gt;
&lt;br /&gt;
* After lunch Wil moved on to presenting [https://projects.vdf-guidance.com/projects/dfrefactor DFRefactor].&lt;br /&gt;
    &lt;br /&gt;
* Hilton gave us an in-depth view of Clubwise&#039;s agile, Scrum-based development processes (prompted by a question about his role at Clubwise).&lt;br /&gt;
&lt;br /&gt;
* Finally Graham MacWhirter outlined Select&#039;s business and development challenges and a look at where they were going with WebApp, which also prompted various discussions until we ran out of time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===30th October 2018===&lt;br /&gt;
Bromsgrove Hotel &amp;amp; Spa, Birmingham&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Peter Bragg from CMAC Computer System Ltd. demonstrated [https://www.donorflex.com/ donorflex] their fundraising and CRM product, which it quickly became apparent from the extensive detail in the system, is sooo much more than &#039;just&#039; a CRM system.&lt;br /&gt;
&lt;br /&gt;
Next up, Mike Peat gave a [https://docs.google.com/presentation/d/1nuG_19IQL1cHROxTJSmFEQJg6xrsVYE9fEbObvW7Nzk/edit#slide=id.g378e3ad6e3_1_44 Creating RESTful JSON Web Services with DataFlex 19.1 presentation]. You can find the earlier version of this presentation for DF 19.0 [https://www.unicorninterglobal.com/Company-Presentations-RESTful-JSON-Web-Services-880 here].&lt;br /&gt;
&lt;br /&gt;
Finally, Nick Nikijuluw from Data Access Europe, shared what&#039;s coming down the track for DataFlex, no promises, but a welcome insight to what could be in the pipeline.&lt;br /&gt;
&lt;br /&gt;
[[Category:JSON]]&lt;br /&gt;
[[Category:DataFlex Community]]&lt;br /&gt;
[[Category:Events]]&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=DfSplat&amp;diff=3343</id>
		<title>DfSplat</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=DfSplat&amp;diff=3343"/>
		<updated>2020-07-08T09:13:04Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;dfSPlat&#039;&#039;&#039; is a free open source third party tool, intended to help with debugging DataFlex applications. It is written in DataFlex and wraps the DataFlex development components in order to run. At this moment it can be used to debug applications from Visual DataFlex 12.0 up to DataFlex 19.1&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*This tool is currently (March 2020) in alpha stage.&lt;br /&gt;
&lt;br /&gt;
==Articles==&lt;br /&gt;
* [[Using dfSplat to identify object leaks]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[https://projects.vdf-guidance.com/projects/dfsplat dfSplat homepage]  &lt;br /&gt;
*[https://projects.vdf-guidance.com/projects/dfsplat/files dfSplat downloads]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Development Tools]]&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=File:ProcPoolDemo.zip&amp;diff=3326</id>
		<title>File:ProcPoolDemo.zip</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=File:ProcPoolDemo.zip&amp;diff=3326"/>
		<updated>2020-06-15T13:20:26Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Mikepeat uploaded a new version of File:ProcPoolDemo.zip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Process_Pool_Demo&amp;diff=3325</id>
		<title>Process Pool Demo</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Process_Pool_Demo&amp;diff=3325"/>
		<updated>2020-06-15T13:19:59Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Remove commented-out code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In an [https://www.unicorninterglobal.com/company/blog/dataflex-webapp-process-pooling-demo article] on the [https://www.unicorninterglobal.com Unicorn InterGlobal web site] I describe my Process Pooling Demo web view.&lt;br /&gt;
&lt;br /&gt;
The code for it is as follows and you can download the zip file from this link: [[File:ProcPoolDemo.zip]].&lt;br /&gt;
&lt;br /&gt;
(Note: now modified to work with DataFlex 20.0 as well as DataFlex 19.1... and possibly prior versions as well - no guarantees though. I have only tested with 19.1 and 20.0.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dataflex&amp;quot;&amp;gt;&lt;br /&gt;
Use cWebView.pkg&lt;br /&gt;
Use cWebModalDialog.pkg&lt;br /&gt;
Use cWebPanel.pkg&lt;br /&gt;
Use cWebGroup.pkg&lt;br /&gt;
Use cWebForm.pkg &lt;br /&gt;
Use cWebButton.pkg&lt;br /&gt;
Use cWebSpacer.pkg&lt;br /&gt;
Use cWebList.pkg&lt;br /&gt;
Use cWebColumn.pkg&lt;br /&gt;
Use cWebLabel.pkg&lt;br /&gt;
Use cRegistry.pkg&lt;br /&gt;
Use Flexml.pkg&lt;br /&gt;
 &lt;br /&gt;
Define PROCESS_VM_READ              for |CI$0010&lt;br /&gt;
Define PROCESS_QUERY_INFORMATION    for |CI$0400&lt;br /&gt;
&lt;br /&gt;
Define KEY_WOW64_64KEY              for |CI$0100&lt;br /&gt;
&lt;br /&gt;
// Wrap all these in #IFNDEF/#ENDIF blocks to avoid any conflicts&lt;br /&gt;
// with the same things already defined in the application&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_GetLastError&lt;br /&gt;
External_Function GetLastError &amp;quot;GetLastError&amp;quot; Kernal32.DLL Returns DWord&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_GetCurrentProcessId&lt;br /&gt;
External_Function GetCurrentProcessId &amp;quot;GetCurrentProcessId&amp;quot; Kernel32.Dll Returns Integer&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_EnumProcesses&lt;br /&gt;
External_Function EnumProcesses &amp;quot;K32EnumProcesses&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    Pointer lpidProcess ;&lt;br /&gt;
    DWord   cb ;&lt;br /&gt;
    Pointer lpcbNeeded ;&lt;br /&gt;
    Returns Integer&lt;br /&gt;
#ENDIF&lt;br /&gt;
   &lt;br /&gt;
#IFNDEF get_OpenProcess&lt;br /&gt;
External_Function OpenProcess &amp;quot;OpenProcess&amp;quot; Kernel32.Dll ;&lt;br /&gt;
    DWord dwDesiredAccess ;&lt;br /&gt;
    Boolean bInheritHandle ;&lt;br /&gt;
    DWord dwProcessId ;&lt;br /&gt;
    Returns Handle&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_ProcessHandle&lt;br /&gt;
External_Function ProcessHandle &amp;quot;OpenProcess&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    DWord   dwDesiredAccess ;&lt;br /&gt;
    Boolean bInheritHandle ;&lt;br /&gt;
    DWord   dwProcessID ;&lt;br /&gt;
    Returns Handle&lt;br /&gt;
#ENDIF&lt;br /&gt;
     &lt;br /&gt;
#IFNDEF get_ProcessImageFileName&lt;br /&gt;
External_Function ProcessImageFileName &amp;quot;K32GetProcessImageFileNameA&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    Handle  hProcess ;&lt;br /&gt;
    Pointer lpImageFileName ;&lt;br /&gt;
    DWord   nSize ;&lt;br /&gt;
    Returns DWord&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF _struct_stAllMyState&lt;br /&gt;
// Struct to hold state&lt;br /&gt;
Struct stAllMyState&lt;br /&gt;
    Time    tmClicked&lt;br /&gt;
    String  sFirstAswer&lt;br /&gt;
    Time    tmAnswered1&lt;br /&gt;
    String  SecondAnswer&lt;br /&gt;
    Time    tmAnswered2&lt;br /&gt;
    Integer iProc1&lt;br /&gt;
    Integer iProc2&lt;br /&gt;
    Integer iProc3&lt;br /&gt;
End_Struct&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF C_CRLF&lt;br /&gt;
// Just for formatting the result of the Yes/No cascade in this case:&lt;br /&gt;
Define C_CRLF for (Character(13) + Character(10))&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
// The following items will (almost always) have different values in&lt;br /&gt;
// different processes in the WebApp process pool, but will remain static&lt;br /&gt;
// in any given process.&lt;br /&gt;
 &lt;br /&gt;
Global_Variable Integer giRandom&lt;br /&gt;
Move (Random(10000)) to giRandom&lt;br /&gt;
 &lt;br /&gt;
// This will be a property of oWabApp:&lt;br /&gt;
Property Integer piRandom (Random(10000) + 10000)&lt;br /&gt;
 &lt;br /&gt;
// Will be opened in the WebApp&lt;br /&gt;
Open Flexerrs&lt;br /&gt;
Clear Flexerrs&lt;br /&gt;
Move (Random(99) + 1) to Flexerrs.Recnum&lt;br /&gt;
Find EQ FlexErrs by Recnum&lt;br /&gt;
 &lt;br /&gt;
//==============================================================================&lt;br /&gt;
// This is a Modal Dialog which will be called from the View,&lt;br /&gt;
// included directly in-line here for simplicity:&lt;br /&gt;
//==============================================================================&lt;br /&gt;
Object oTestDialog is a cWebModalDialog&lt;br /&gt;
    Set psCaption to &amp;quot;Test Dialog&amp;quot;&lt;br /&gt;
    Set piMinWidth to 300&lt;br /&gt;
    Set piMinHeight to 200&lt;br /&gt;
    Set pbServerOnEscape to False   // The only way out&lt;br /&gt;
    Set pbShowClose to False        // is to click &amp;quot;OK&amp;quot;&lt;br /&gt;
    Set pbServerOnSubmit to True    // enable the OnSubmit event&lt;br /&gt;
     &lt;br /&gt;
    Object oMainPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 12&lt;br /&gt;
         &lt;br /&gt;
        Object oProcess is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;This Process ID:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCaller is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Called from Process ID:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oGlobal is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Global variable giRandom was:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
        Object oRegProp is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Regular property piRandom was:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
    End_Object&lt;br /&gt;
     &lt;br /&gt;
    Object oBottomPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 4&lt;br /&gt;
        Set peRegion to prBottom&lt;br /&gt;
 &lt;br /&gt;
        Object oOkButton is a cWebButton&lt;br /&gt;
            Set psCaption to C_$OK&lt;br /&gt;
            Set piColumnSpan to 1&lt;br /&gt;
            Set piColumnIndex to 3&lt;br /&gt;
 &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send Ok&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
    End_Object&lt;br /&gt;
 &lt;br /&gt;
    Procedure OnSubmit&lt;br /&gt;
        Send Ok&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    Procedure PopupTheDialog  Handle hReturnObj Integer iCaller&lt;br /&gt;
        Send Popup hReturnObj&lt;br /&gt;
         &lt;br /&gt;
        WebSet psValue of oProcess to (GetCurrentProcessId())&lt;br /&gt;
        WebSet psValue of oCaller  to iCaller&lt;br /&gt;
        WebSet psValue of oGlobal  to giRandom&lt;br /&gt;
        WebSet psValue of oRegProp to (piRandom(Self))&lt;br /&gt;
    End_Procedure&lt;br /&gt;
 &lt;br /&gt;
    Function DialogResult Returns String&lt;br /&gt;
        String sResult&lt;br /&gt;
         &lt;br /&gt;
        WebGet psValue of oProcess to sResult&lt;br /&gt;
        Function_Return sResult&lt;br /&gt;
    End_Function&lt;br /&gt;
 &lt;br /&gt;
End_Object&lt;br /&gt;
 &lt;br /&gt;
//==============================================================================&lt;br /&gt;
// This is the actual view&lt;br /&gt;
//==============================================================================&lt;br /&gt;
Object oProcPoolDemo is a cWebView    &lt;br /&gt;
    Set piWidth to 700&lt;br /&gt;
    Set psCaption to &amp;quot;Process Pooling Effects Demo&amp;quot;&lt;br /&gt;
    Set pbServerOnShow to True&lt;br /&gt;
     &lt;br /&gt;
    Property Integer[] paiWebAppProcs&lt;br /&gt;
  &lt;br /&gt;
    // Display this view at start up:&lt;br /&gt;
    Delegate Set phoDefaultView to Self&lt;br /&gt;
     &lt;br /&gt;
    // Work out the web application name from the web.config&lt;br /&gt;
    // file in AppHTML, which we read into an XML object&lt;br /&gt;
    Function WebAppName Returns String&lt;br /&gt;
        Handle  hoXml hoElem&lt;br /&gt;
        String  sName&lt;br /&gt;
        Boolean bOK&lt;br /&gt;
         &lt;br /&gt;
        Get Create (RefClass(cXMLDOMDocument)) to hoXml&lt;br /&gt;
        Set psDocumentName of hoXml to ;&lt;br /&gt;
            (psAppHtmlPath(phoWorkspace(ghoApplication)) + &amp;quot;\web.config&amp;quot;)&lt;br /&gt;
        Get LoadXMLDocument of hoXml to bOK&lt;br /&gt;
        Get FindNode of hoXml &amp;quot;configuration/location/system.webServer/dataflexHttpModule&amp;quot; to hoElem&lt;br /&gt;
        Get AttributeValue of hoElem &amp;quot;application&amp;quot; to sName&lt;br /&gt;
        Send Destroy of hoElem&lt;br /&gt;
        Send Destroy of hoXml&lt;br /&gt;
        Function_Return sName&lt;br /&gt;
    End_Function&lt;br /&gt;
     &lt;br /&gt;
    // Will be set to return value of above function at start-up.&lt;br /&gt;
    // This is a regular property because the web app name can&#039;t&lt;br /&gt;
    // change while the program is running.&lt;br /&gt;
    Property String psWebAppName (WebAppName(Self))&lt;br /&gt;
    &lt;br /&gt;
    // This uses three external functions to find all the processes in the&lt;br /&gt;
    // current WebApp&#039;s process pool - it will get updated on every refresh&lt;br /&gt;
    // so if you change the number of processes in the pool while the WebApp is&lt;br /&gt;
    // running you will see it in the view.&lt;br /&gt;
    //&lt;br /&gt;
    // It first uses EnumProcesses to find all the running processes on the&lt;br /&gt;
    // machine.&lt;br /&gt;
    //&lt;br /&gt;
    // It then iterates through that list and tries OpenProcess to get a handle&lt;br /&gt;
    // to it (for some permissions will not allow that, so those are skipped).&lt;br /&gt;
    //&lt;br /&gt;
    // Finally it calls ProcessImageFileName to see if that is one of the&lt;br /&gt;
    // processes running for THIS WebApp. However ProcessImageFileName&lt;br /&gt;
    // returns a file-path starting with the disk identifer in a slightly odd&lt;br /&gt;
    // form, i.e. &amp;quot;\DEVICE\HARDDISKVOLUMEn&amp;quot; (n is &amp;quot;1&amp;quot; for my C: drive) and even &lt;br /&gt;
    // spookier things for mapped drives, so we strip off the &amp;quot;C:\&amp;quot;, or whatever,&lt;br /&gt;
    // from the application file name DataFlex returns and uppercase both, then &lt;br /&gt;
    // compare THAT to the same length of the right-portion of the image name.&lt;br /&gt;
    // This may screw up if you have more than one identically pathed web-apps&lt;br /&gt;
    // on different drives - just so you know. &amp;lt;g&amp;gt;&lt;br /&gt;
    //&lt;br /&gt;
    // Note: that although the docs (and the declarations) use DWords,&lt;br /&gt;
    //       on Vincent&#039;s advice we are using UIntegers in our code (the same&lt;br /&gt;
    //       thing in reality) because you can use SizeOfType(UInteger) in the&lt;br /&gt;
    //       Watches window when debugging, which you can&#039;t for DWord.&lt;br /&gt;
    Procedure FindWebAppProcs&lt;br /&gt;
        Integer[]  aiWebAppProcs &lt;br /&gt;
        UInteger[] auiProcs&lt;br /&gt;
        UInteger   uiCb uiNeeded uiSize uiErr&lt;br /&gt;
        Integer    iOK i iLast iPos iSize iPathLen&lt;br /&gt;
        Handle     hProc&lt;br /&gt;
        UChar[]    ucaFile&lt;br /&gt;
        String     sPath sImage&lt;br /&gt;
         &lt;br /&gt;
        Move (Uppercase(GetApplicationFileName(ghoApplication))) to sPath&lt;br /&gt;
        // Strip off drive designation:&lt;br /&gt;
        Move (Pos(&amp;quot;\&amp;quot;, sPath))                                  to iPos&lt;br /&gt;
        Move (Right(sPath, (Length(sPath) - iPos)))             to sPath&lt;br /&gt;
        Move (Length(sPath))                                    to iPathLen&lt;br /&gt;
        Move 4096                                               to iSize&lt;br /&gt;
 &lt;br /&gt;
        Move (ResizeArray(auiProcs, iSize))                     to auiProcs&lt;br /&gt;
        Move (iSize * SizeOfType(UInteger))                     to uiCb&lt;br /&gt;
        Move 0                                                  to uiNeeded&lt;br /&gt;
 &lt;br /&gt;
        Move (EnumProcesses(AddressOf(auiProcs), ;&lt;br /&gt;
                            uiCb, ;&lt;br /&gt;
                            AddressOf(uiNeeded)))               to iOK&lt;br /&gt;
         &lt;br /&gt;
        // Just for debugging:&lt;br /&gt;
        If not iOK ;&lt;br /&gt;
            Move (GetLastError())                               to uiErr&lt;br /&gt;
         &lt;br /&gt;
        Move (uiNeeded / SizeOfType(UInteger))                  to iSize&lt;br /&gt;
        Move (ResizeArray(auiProcs, iSize))                     to auiProcs&lt;br /&gt;
        Decrement iSize&lt;br /&gt;
         &lt;br /&gt;
        For i from 0 to iSize&lt;br /&gt;
            Move (OpenProcess(PROCESS_VM_READ + PROCESS_QUERY_INFORMATION, ;&lt;br /&gt;
                                                    True, auiProcs[i])) to hProc&lt;br /&gt;
             &lt;br /&gt;
            If (hProc &amp;lt;&amp;gt; 0) Begin  // We DID get a handle to the process&lt;br /&gt;
                Move (ResizeArray(ucaFile, 0))                  to ucaFile&lt;br /&gt;
                Move (ResizeArray(ucaFile, 2048))               to ucaFile&lt;br /&gt;
                Move (ProcessImageFileName(hProc, ;&lt;br /&gt;
                      AddressOf(ucaFile), 2048))                to uiSize&lt;br /&gt;
                Move (ResizeArray(ucaFile, uiSize))             to ucaFile&lt;br /&gt;
                Move (Uppercase(UCharArrayToString(ucaFile)))   to sImage&lt;br /&gt;
                Move (Right(sImage, iPathLen))                  to sImage&lt;br /&gt;
                 &lt;br /&gt;
                If (sImage = sPath) ;&lt;br /&gt;
                    Move auiProcs[i] to aiWebAppProcs[SizeOfArray(aiWebAppProcs)]    &lt;br /&gt;
            End&lt;br /&gt;
             &lt;br /&gt;
        Loop&lt;br /&gt;
         &lt;br /&gt;
        Set paiWebAppProcs to aiWebAppProcs&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    Procedure OnShow&lt;br /&gt;
        Send UpdateProcInfo&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    // Registry object for getting the WebApp info from the registry:&lt;br /&gt;
    Object oReg is a cRegistry&lt;br /&gt;
        Set phRootKey to HKEY_LOCAL_MACHINE&lt;br /&gt;
        Set pfAccessRights to (KEY_WOW64_64KEY ior KEY_READ)&lt;br /&gt;
        &lt;br /&gt;
        Function BaseKey Returns String&lt;br /&gt;
            String[] asParts&lt;br /&gt;
            &lt;br /&gt;
            Move &amp;quot;SOFTWARE&amp;quot;                 to asParts[0]&lt;br /&gt;
            Move &amp;quot;Data Access Worldwide&amp;quot;    to asParts[1]&lt;br /&gt;
            Move &amp;quot;DataFlex&amp;quot;                 to asParts[2]&lt;br /&gt;
            Move C_DFVersion                to asParts[3]&lt;br /&gt;
            Move &amp;quot;WebApp Server&amp;quot;            to asParts[4]&lt;br /&gt;
            Move &amp;quot;Web Applications&amp;quot;         to asParts[5]&lt;br /&gt;
             &lt;br /&gt;
            // If it is a 64-bit machine and running on a DF version PRIOR to 20&lt;br /&gt;
            // Insert &amp;quot;Wow6432Node just after &amp;quot;SOFTWARE&amp;quot;:&lt;br /&gt;
            If (KeyExists(Self, &amp;quot;SOFTWARE\Wow6432Node&amp;quot;) and ;&lt;br /&gt;
                (Number(C_DFVersion) &amp;lt; 20)) ;&lt;br /&gt;
                Move (InsertInArray(asParts, 1, &amp;quot;Wow6432Node&amp;quot;)) to asParts&lt;br /&gt;
             &lt;br /&gt;
            Function_Return (StrJoinFromArray(asParts, &amp;quot;\&amp;quot;))&lt;br /&gt;
        End_Function&lt;br /&gt;
         &lt;br /&gt;
        Function DWKeyValue String sApp String sVal Returns Integer&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            Integer iVal&lt;br /&gt;
            String  sKey&lt;br /&gt;
&lt;br /&gt;
            Move (BaseKey(Self) + &amp;quot;\&amp;quot; + sApp)   to sKey&lt;br /&gt;
            &lt;br /&gt;
            Get KeyExists sKey                  to bOK&lt;br /&gt;
            If not bOK ;&lt;br /&gt;
                Function_Return 0&lt;br /&gt;
             &lt;br /&gt;
            Get OpenKey sKey to bOK&lt;br /&gt;
            If not bOK ;&lt;br /&gt;
                Function_Return 0&lt;br /&gt;
            &lt;br /&gt;
            Move (ReadDWord(Self, sVal)) to iVal&lt;br /&gt;
            Send CloseKey&lt;br /&gt;
             &lt;br /&gt;
            Function_Return iVal&lt;br /&gt;
        End_Function&lt;br /&gt;
         &lt;br /&gt;
    End_Object&lt;br /&gt;
     &lt;br /&gt;
    // Refresh all the displayed information&lt;br /&gt;
    Procedure UpdateProcInfo&lt;br /&gt;
        String  sApp&lt;br /&gt;
        Integer iMin iMax&lt;br /&gt;
         &lt;br /&gt;
        Get psWebAppName                to sApp&lt;br /&gt;
        WebSet psValue of oMinProc      to (DWKeyValue(oReg(Self), sApp, &amp;quot;MinPool&amp;quot;))&lt;br /&gt;
        WebSet psValue of oMaxProc      to (DWKeyValue(oReg(Self), sApp, &amp;quot;MaxPool&amp;quot;))&lt;br /&gt;
        WebSet psValue of oCurrProcs    to &amp;quot;Unknown&amp;quot;&lt;br /&gt;
         &lt;br /&gt;
        WebSet psValue of oCurrProcess  to (GetCurrentProcessId())&lt;br /&gt;
        WebSet psValue of oGlobalVal    to giRandom&lt;br /&gt;
        WebSet psValue of oRegProp      to (piRandom(Self))&lt;br /&gt;
        WebSet psValue of oDBRec        to FlexErrs.Recnum&lt;br /&gt;
         &lt;br /&gt;
        Send FindWebAppProcs&lt;br /&gt;
        Send GridRefresh of oProcList&lt;br /&gt;
        Send Focus of oCallServer&lt;br /&gt;
    End_Procedure&lt;br /&gt;
         &lt;br /&gt;
    Object oWebMainPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 8&lt;br /&gt;
         &lt;br /&gt;
        Object oExplanation is a cWebLabel&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set psCaption to ;&lt;br /&gt;
                (&#039;This view demonstrates the fact that in a Process&#039; + ;&lt;br /&gt;
                 &#039; Pooled WebApp (which all modern WebApps generally&#039; + ;&lt;br /&gt;
                 &#039; are) you CANNOT rely on the values in global variables,&#039; + ;&lt;br /&gt;
                 &#039; regular properties and database buffers. They change&#039; + ;&lt;br /&gt;
                 &#039; from one server round-trip to the next. ONLY web&#039; + ;&lt;br /&gt;
                 &#039; properties and Data Dictionary values can be relied on.&#039; + ;&lt;br /&gt;
                 &#039; If you run this under the debugger you will see that&#039; + ;&lt;br /&gt;
                 &#039; only a single process is &amp;quot;in the pool&amp;quot; and the values&#039; + ;&lt;br /&gt;
                 &#039; of the things below do not change, which is why you&#039; + ;&lt;br /&gt;
                 &#039; MUST test Web Apps OUTSIDE the debugger.&#039;)&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
        Object oProcPoolGrp is a cWebGroup&lt;br /&gt;
            Set piColumnCount to 8&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set psCaption to &amp;quot;Process Pool Information:&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Object oPoolInfo is a cWebGroup&lt;br /&gt;
                Set pbShowBorder to False&lt;br /&gt;
                Set pbShowCaption to False&lt;br /&gt;
                Set piColumnCount to 12&lt;br /&gt;
                Set piColumnSpan to 6&lt;br /&gt;
                 &lt;br /&gt;
                Object oAppName is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 0&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Web Application:&amp;quot;&lt;br /&gt;
                    Set psValue to (psWebAppName(Self))&lt;br /&gt;
                End_Object&lt;br /&gt;
             &lt;br /&gt;
                Object oMinProc is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Minimum Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Object oMaxProc is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Maximum Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Object oCurrProcs is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Current Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                &lt;br /&gt;
            End_Object&lt;br /&gt;
             &lt;br /&gt;
            Object oProcList is a cWebList&lt;br /&gt;
                Set piColumnIndex to 6&lt;br /&gt;
                Set piColumnSpan to 2&lt;br /&gt;
                Set pbDataAware to False&lt;br /&gt;
                Set pbOfflineEditing to True  // DON&#039;T call the server on RowChange&lt;br /&gt;
                // Adjust this to see more/less process numbers without scrolling:&lt;br /&gt;
                Set piHeight to 200&lt;br /&gt;
 &lt;br /&gt;
                Object oProcsCol is a cWebColumn&lt;br /&gt;
                    Set psCaption to &amp;quot;Pool Process IDs&amp;quot;&lt;br /&gt;
                    Set piWidth to 100&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Procedure OnManualLoadData tWebRow[] ByRef aTheRows String ByRef sCurrentRowID&lt;br /&gt;
                    Integer[] aiWebProcs&lt;br /&gt;
                    Integer i iLast iThis&lt;br /&gt;
                     &lt;br /&gt;
                    Get paiWebAppProcs of oProcPoolDemo to aiWebProcs&lt;br /&gt;
                    Move (GetCurrentProcessId())        to iThis&lt;br /&gt;
                     &lt;br /&gt;
                    Move (SizeOfArray(aiWebProcs))      to iLast&lt;br /&gt;
                    WebSet psValue of oCurrProcs        to iLast&lt;br /&gt;
                    Decrement iLast&lt;br /&gt;
                     &lt;br /&gt;
                    For i from 0 to iLast&lt;br /&gt;
                        Move aiWebProcs[i] to aTheRows[i].sRowID&lt;br /&gt;
                        Move aiWebProcs[i] to aTheRows[i].aCells[0].sValue&lt;br /&gt;
                         &lt;br /&gt;
                        If (aiWebProcs[i] = iThis) Begin&lt;br /&gt;
                            Move aiWebProcs[i] to sCurrentRowID&lt;br /&gt;
                        End&lt;br /&gt;
                         &lt;br /&gt;
                    Loop&lt;br /&gt;
                     &lt;br /&gt;
                    Forward Send OnManualLoadData (&amp;amp;aTheRows) (&amp;amp;sCurrentRowID)&lt;br /&gt;
                End_Procedure&lt;br /&gt;
                 &lt;br /&gt;
            End_Object&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCurrProcess is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Last invoked server process was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oGlobalVal is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Global variable giRandom in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oRegProp is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Regular property piRandom in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oDBRec is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Flexerrs recnum in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oWebValue is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set psLabel to &amp;quot;Your entered value:&amp;quot;&lt;br /&gt;
            Set psValue to &amp;quot;Hello!&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oNote is a cWebLabel&lt;br /&gt;
            Set psCaption to &amp;quot;(This is a web property - psValue of oWebValue - so will not change unless YOU change it)&amp;quot;&lt;br /&gt;
            Set piColumnIndex to 4&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oButtonSpacer is a cWebSpacer&lt;br /&gt;
            Set piHeight to 20&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCallServer is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Call Server&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
                     &lt;br /&gt;
        Object oInfo is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 2&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Info Box&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Integer iProc&lt;br /&gt;
                 &lt;br /&gt;
                Move (GetCurrentProcessId()) to iProc&lt;br /&gt;
                Send ShowInfoBox (&amp;quot;InfoBox in process&amp;quot; * String(iProc))&lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oYesNo is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 4&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Yes/No&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            // Web Property to hold state between browser/server round-trips&lt;br /&gt;
            { WebProperty=Client }&lt;br /&gt;
            Property stAllMyState ptState&lt;br /&gt;
             &lt;br /&gt;
            // Is called in response to user&#039;s second answer:&lt;br /&gt;
            Procedure ProcessSecondAnswer Integer eAnswer&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                String[]     asInfo&lt;br /&gt;
 &lt;br /&gt;
                WebGet ptState                              to tState&lt;br /&gt;
                Move (GetCurrentProcessId())                to tState.iProc3&lt;br /&gt;
                Move (CurrentDateTime())                    to tState.tmAnswered2&lt;br /&gt;
                Move (If((eAnswer = cmYes), &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;))   to tState.SecondAnswer&lt;br /&gt;
                 &lt;br /&gt;
                // Assemble results:&lt;br /&gt;
                Move (&amp;quot;You clicked the &#039;Yes/No&#039; button at&amp;quot; * String(tState.tmClicked) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc1)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                Move (&amp;quot;Your first answer was: &#039;&amp;quot; + ;&lt;br /&gt;
                    tState.sFirstAswer + &amp;quot;&#039; at&amp;quot; * String(tState.tmAnswered1) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc2)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                Move (&amp;quot;Your second answer was: &#039;&amp;quot; + ;&lt;br /&gt;
                    tState.SecondAnswer + &amp;quot;&#039; at&amp;quot; * String(tState.tmAnswered2) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc3)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowInfoBox (StrJoinFromArray(asInfo, C_CRLF)) &amp;quot;Results&amp;quot;&lt;br /&gt;
                 &lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            WebPublishProcedure ProcessSecondAnswer  // Publish the proc to receive control after second answer&lt;br /&gt;
             &lt;br /&gt;
            // Is called in response to user&#039;s first answer:&lt;br /&gt;
            Procedure ProcessFirstAnswer  Integer eAnswer&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                 &lt;br /&gt;
                WebGet ptState to tState&lt;br /&gt;
                 &lt;br /&gt;
                Move (GetCurrentProcessId())                to tState.iProc2&lt;br /&gt;
                Move (CurrentDateTime())                    to tState.tmAnswered1&lt;br /&gt;
                Move (If((eAnswer = cmYes), &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;))   to tState.sFirstAswer&lt;br /&gt;
                WebSet ptState                              to tState&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowYesNo Self (RefProc(ProcessSecondAnswer)) ;&lt;br /&gt;
                    (&amp;quot;Do you REALLY want to do this? (Proc:&amp;quot; * String(tState.iProc2) + &amp;quot;)&amp;quot;) ;&lt;br /&gt;
                    &amp;quot;Second question&amp;quot;&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            WebPublishProcedure ProcessFirstAnswer  // Publish the proc to receive control after first answer&lt;br /&gt;
             &lt;br /&gt;
            // Triggers the question cascade:&lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                 &lt;br /&gt;
                Move (CurrentDateTime())        to tState.tmClicked&lt;br /&gt;
                Move (GetCurrentProcessId())    to tState.iProc1&lt;br /&gt;
                WebSet ptState                  to tState&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowYesNo Self (RefProc(ProcessFirstAnswer)) ;&lt;br /&gt;
                    (&amp;quot;Do you want to do this? (Proc:&amp;quot; * String(tState.iProc1) + &amp;quot;)&amp;quot;) ;&lt;br /&gt;
                    &amp;quot;First question&amp;quot;&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oDialog is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 6&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Popup Dialog&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnCloseModalDialog Handle hoModalDialog&lt;br /&gt;
                Integer iProc1 iProc2&lt;br /&gt;
                 &lt;br /&gt;
                If (hoModalDialog = oTestDialog) Begin&lt;br /&gt;
                    Get DialogResult of oTestDialog to iProc1&lt;br /&gt;
                    Move (GetCurrentProcessId())    to iProc2&lt;br /&gt;
                    Send ShowInfoBox ;&lt;br /&gt;
                        (&amp;quot;Dialog in process&amp;quot; * String(iProc1) + C_CRLF + ;&lt;br /&gt;
                         &amp;quot;Returned to process&amp;quot; * String(iProc2)) &amp;quot;Result&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
                    Send UpdateProcInfo&lt;br /&gt;
                End&lt;br /&gt;
                 &lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send PopupTheDialog of oTestDialog Self (GetCurrentProcessId())&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
    End_Object&lt;br /&gt;
 &lt;br /&gt;
End_Object&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Web Applications]]&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=File:ProcPoolDemo.zip&amp;diff=3324</id>
		<title>File:ProcPoolDemo.zip</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=File:ProcPoolDemo.zip&amp;diff=3324"/>
		<updated>2020-06-15T13:02:49Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Mikepeat uploaded a new version of File:ProcPoolDemo.zip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Process_Pool_Demo&amp;diff=3323</id>
		<title>Process Pool Demo</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Process_Pool_Demo&amp;diff=3323"/>
		<updated>2020-06-15T13:01:34Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Updated for DF v20.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In an [https://www.unicorninterglobal.com/company/blog/dataflex-webapp-process-pooling-demo article] on the [https://www.unicorninterglobal.com Unicorn InterGlobal web site] I describe my Process Pooling Demo web view.&lt;br /&gt;
&lt;br /&gt;
The code for it is as follows and you can download the zip file from this link: [[File:ProcPoolDemo.zip]].&lt;br /&gt;
&lt;br /&gt;
(Note: now modified to work with DataFlex 20.0 as well as DataFlex 19.1... and possibly prior versions as well - no guarantees though. I have only tested with 19.1 and 20.0.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dataflex&amp;quot;&amp;gt;&lt;br /&gt;
Use cWebView.pkg&lt;br /&gt;
Use cWebModalDialog.pkg&lt;br /&gt;
Use cWebPanel.pkg&lt;br /&gt;
Use cWebGroup.pkg&lt;br /&gt;
Use cWebForm.pkg &lt;br /&gt;
Use cWebButton.pkg&lt;br /&gt;
Use cWebSpacer.pkg&lt;br /&gt;
Use cWebList.pkg&lt;br /&gt;
Use cWebColumn.pkg&lt;br /&gt;
Use cWebLabel.pkg&lt;br /&gt;
Use cRegistry.pkg&lt;br /&gt;
Use Flexml.pkg&lt;br /&gt;
 &lt;br /&gt;
Define PROCESS_VM_READ              for |CI$0010&lt;br /&gt;
Define PROCESS_QUERY_INFORMATION    for |CI$0400&lt;br /&gt;
&lt;br /&gt;
Define KEY_WOW64_64KEY              for |CI$0100&lt;br /&gt;
&lt;br /&gt;
// Wrap all these in #IFNDEF/#ENDIF blocks to avoid any conflicts&lt;br /&gt;
// with the same things already defined in the application&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_GetLastError&lt;br /&gt;
External_Function GetLastError &amp;quot;GetLastError&amp;quot; Kernal32.DLL Returns DWord&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_GetCurrentProcessId&lt;br /&gt;
External_Function GetCurrentProcessId &amp;quot;GetCurrentProcessId&amp;quot; Kernel32.Dll Returns Integer&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_EnumProcesses&lt;br /&gt;
External_Function EnumProcesses &amp;quot;K32EnumProcesses&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    Pointer lpidProcess ;&lt;br /&gt;
    DWord   cb ;&lt;br /&gt;
    Pointer lpcbNeeded ;&lt;br /&gt;
    Returns Integer&lt;br /&gt;
#ENDIF&lt;br /&gt;
   &lt;br /&gt;
#IFNDEF get_OpenProcess&lt;br /&gt;
External_Function OpenProcess &amp;quot;OpenProcess&amp;quot; Kernel32.Dll ;&lt;br /&gt;
    DWord dwDesiredAccess ;&lt;br /&gt;
    Boolean bInheritHandle ;&lt;br /&gt;
    DWord dwProcessId ;&lt;br /&gt;
    Returns Handle&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_ProcessHandle&lt;br /&gt;
External_Function ProcessHandle &amp;quot;OpenProcess&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    DWord   dwDesiredAccess ;&lt;br /&gt;
    Boolean bInheritHandle ;&lt;br /&gt;
    DWord   dwProcessID ;&lt;br /&gt;
    Returns Handle&lt;br /&gt;
#ENDIF&lt;br /&gt;
     &lt;br /&gt;
#IFNDEF get_ProcessImageFileName&lt;br /&gt;
External_Function ProcessImageFileName &amp;quot;K32GetProcessImageFileNameA&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    Handle  hProcess ;&lt;br /&gt;
    Pointer lpImageFileName ;&lt;br /&gt;
    DWord   nSize ;&lt;br /&gt;
    Returns DWord&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF _struct_stAllMyState&lt;br /&gt;
// Struct to hold state&lt;br /&gt;
Struct stAllMyState&lt;br /&gt;
    Time    tmClicked&lt;br /&gt;
    String  sFirstAswer&lt;br /&gt;
    Time    tmAnswered1&lt;br /&gt;
    String  SecondAnswer&lt;br /&gt;
    Time    tmAnswered2&lt;br /&gt;
    Integer iProc1&lt;br /&gt;
    Integer iProc2&lt;br /&gt;
    Integer iProc3&lt;br /&gt;
End_Struct&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF C_CRLF&lt;br /&gt;
// Just for formatting the result of the Yes/No cascade in this case:&lt;br /&gt;
Define C_CRLF for (Character(13) + Character(10))&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
// The following items will (almost always) have different values in&lt;br /&gt;
// different processes in the WebApp process pool, but will remain static&lt;br /&gt;
// in any given process.&lt;br /&gt;
 &lt;br /&gt;
Global_Variable Integer giRandom&lt;br /&gt;
Move (Random(10000)) to giRandom&lt;br /&gt;
 &lt;br /&gt;
// This will be a property of oWabApp:&lt;br /&gt;
Property Integer piRandom (Random(10000) + 10000)&lt;br /&gt;
 &lt;br /&gt;
// Will be opened in the WebApp&lt;br /&gt;
Open Flexerrs&lt;br /&gt;
Clear Flexerrs&lt;br /&gt;
Move (Random(99) + 1) to Flexerrs.Recnum&lt;br /&gt;
Find EQ FlexErrs by Recnum&lt;br /&gt;
 &lt;br /&gt;
//==============================================================================&lt;br /&gt;
// This is a Modal Dialog which will be called from the View,&lt;br /&gt;
// included directly in-line here for simplicity:&lt;br /&gt;
//==============================================================================&lt;br /&gt;
Object oTestDialog is a cWebModalDialog&lt;br /&gt;
    Set psCaption to &amp;quot;Test Dialog&amp;quot;&lt;br /&gt;
    Set piMinWidth to 300&lt;br /&gt;
    Set piMinHeight to 200&lt;br /&gt;
    Set pbServerOnEscape to False   // The only way out&lt;br /&gt;
    Set pbShowClose to False        // is to click &amp;quot;OK&amp;quot;&lt;br /&gt;
    Set pbServerOnSubmit to True    // enable the OnSubmit event&lt;br /&gt;
     &lt;br /&gt;
    Object oMainPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 12&lt;br /&gt;
         &lt;br /&gt;
        Object oProcess is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;This Process ID:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCaller is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Called from Process ID:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oGlobal is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Global variable giRandom was:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
        Object oRegProp is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Regular property piRandom was:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
    End_Object&lt;br /&gt;
     &lt;br /&gt;
    Object oBottomPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 4&lt;br /&gt;
        Set peRegion to prBottom&lt;br /&gt;
 &lt;br /&gt;
        Object oOkButton is a cWebButton&lt;br /&gt;
            Set psCaption to C_$OK&lt;br /&gt;
            Set piColumnSpan to 1&lt;br /&gt;
            Set piColumnIndex to 3&lt;br /&gt;
 &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send Ok&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
    End_Object&lt;br /&gt;
 &lt;br /&gt;
    Procedure OnSubmit&lt;br /&gt;
        Send Ok&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    Procedure PopupTheDialog  Handle hReturnObj Integer iCaller&lt;br /&gt;
        Send Popup hReturnObj&lt;br /&gt;
         &lt;br /&gt;
        WebSet psValue of oProcess to (GetCurrentProcessId())&lt;br /&gt;
        WebSet psValue of oCaller  to iCaller&lt;br /&gt;
        WebSet psValue of oGlobal  to giRandom&lt;br /&gt;
        WebSet psValue of oRegProp to (piRandom(Self))&lt;br /&gt;
    End_Procedure&lt;br /&gt;
 &lt;br /&gt;
    Function DialogResult Returns String&lt;br /&gt;
        String sResult&lt;br /&gt;
         &lt;br /&gt;
        WebGet psValue of oProcess to sResult&lt;br /&gt;
        Function_Return sResult&lt;br /&gt;
    End_Function&lt;br /&gt;
 &lt;br /&gt;
End_Object&lt;br /&gt;
 &lt;br /&gt;
//==============================================================================&lt;br /&gt;
// This is the actual view&lt;br /&gt;
//==============================================================================&lt;br /&gt;
Object oProcPoolDemo is a cWebView    &lt;br /&gt;
    Set piWidth to 700&lt;br /&gt;
    Set psCaption to &amp;quot;Process Pooling Effects Demo&amp;quot;&lt;br /&gt;
    Set pbServerOnShow to True&lt;br /&gt;
     &lt;br /&gt;
    Property Integer[] paiWebAppProcs&lt;br /&gt;
  &lt;br /&gt;
    // Display this view at start up:&lt;br /&gt;
    Delegate Set phoDefaultView to Self&lt;br /&gt;
     &lt;br /&gt;
//    // Work out the web application name from the WebServiceDispatcher.wo&lt;br /&gt;
//    // file in AppHTML, which we treat like a .ini file&lt;br /&gt;
//    Function WebAppName Returns String&lt;br /&gt;
//        Handle hoIni&lt;br /&gt;
//        String sName&lt;br /&gt;
//         &lt;br /&gt;
//        Get Create (RefClass(cIniFile)) to hoIni&lt;br /&gt;
//        Set psFileName of hoIni to ;&lt;br /&gt;
//            (psAppHtmlPath(phoWorkspace(ghoApplication)) + ;&lt;br /&gt;
//            &amp;quot;\WebServiceDispatcher.wso&amp;quot;)&lt;br /&gt;
//        Get ReadString of hoIni &amp;quot;WebService&amp;quot; &amp;quot;Application&amp;quot; &amp;quot;&amp;quot; to sName&lt;br /&gt;
//        Send Destroy of hoIni&lt;br /&gt;
//        Function_Return sName&lt;br /&gt;
//    End_Function&lt;br /&gt;
     &lt;br /&gt;
    // Work out the web application name from the web.config&lt;br /&gt;
    // file in AppHTML, which we read into an XML object&lt;br /&gt;
    Function WebAppName Returns String&lt;br /&gt;
        Handle  hoXml hoElem&lt;br /&gt;
        String  sName&lt;br /&gt;
        Boolean bOK&lt;br /&gt;
         &lt;br /&gt;
        Get Create (RefClass(cXMLDOMDocument)) to hoXml&lt;br /&gt;
        Set psDocumentName of hoXml to ;&lt;br /&gt;
            (psAppHtmlPath(phoWorkspace(ghoApplication)) + &amp;quot;\web.config&amp;quot;)&lt;br /&gt;
        Get LoadXMLDocument of hoXml to bOK&lt;br /&gt;
        Get FindNode of hoXml &amp;quot;configuration/location/system.webServer/dataflexHttpModule&amp;quot; to hoElem&lt;br /&gt;
        Get AttributeValue of hoElem &amp;quot;application&amp;quot; to sName&lt;br /&gt;
        Send Destroy of hoElem&lt;br /&gt;
        Send Destroy of hoXml&lt;br /&gt;
        Function_Return sName&lt;br /&gt;
    End_Function&lt;br /&gt;
     &lt;br /&gt;
    // Will be set to return value of above function at start-up.&lt;br /&gt;
    // This is a regular property because the web app name can&#039;t&lt;br /&gt;
    // change while the program is running.&lt;br /&gt;
    Property String psWebAppName (WebAppName(Self))&lt;br /&gt;
    &lt;br /&gt;
    // This uses three external functions to find all the processes in the&lt;br /&gt;
    // current WebApp&#039;s process pool - it will get updated on every refresh&lt;br /&gt;
    // so if you change the number of processes in the pool while the WebApp is&lt;br /&gt;
    // running you will see it in the view.&lt;br /&gt;
    //&lt;br /&gt;
    // It first uses EnumProcesses to find all the running processes on the&lt;br /&gt;
    // machine.&lt;br /&gt;
    //&lt;br /&gt;
    // It then iterates through that list and tries OpenProcess to get a handle&lt;br /&gt;
    // to it (for some permissions will not allow that, so those are skipped).&lt;br /&gt;
    //&lt;br /&gt;
    // Finally it calls ProcessImageFileName to see if that is one of the&lt;br /&gt;
    // processes running for THIS WebApp. However ProcessImageFileName&lt;br /&gt;
    // returns a file-path starting with the disk identifer in a slightly odd&lt;br /&gt;
    // form, i.e. &amp;quot;\DEVICE\HARDDISKVOLUMEn&amp;quot; (n is &amp;quot;1&amp;quot; for my C: drive) and even &lt;br /&gt;
    // spookier things for mapped drives, so we strip off the &amp;quot;C:\&amp;quot;, or whatever,&lt;br /&gt;
    // from the application file name DataFlex returns and uppercase both, then &lt;br /&gt;
    // compare THAT to the same length of the right-portion of the image name.&lt;br /&gt;
    // This may screw up if you have more than one identically pathed web-apps&lt;br /&gt;
    // on different drives - just so you know. &amp;lt;g&amp;gt;&lt;br /&gt;
    //&lt;br /&gt;
    // Note: that although the docs (and the declarations) use DWords,&lt;br /&gt;
    //       on Vincent&#039;s advice we are using UIntegers in our code (the same&lt;br /&gt;
    //       thing in reality) because you can use SizeOfType(UInteger) in the&lt;br /&gt;
    //       Watches window when debugging, which you can&#039;t for DWord.&lt;br /&gt;
    Procedure FindWebAppProcs&lt;br /&gt;
        Integer[]  aiWebAppProcs &lt;br /&gt;
        UInteger[] auiProcs&lt;br /&gt;
        UInteger   uiCb uiNeeded uiSize uiErr&lt;br /&gt;
        Integer    iOK i iLast iPos iSize iPathLen&lt;br /&gt;
        Handle     hProc&lt;br /&gt;
        UChar[]    ucaFile&lt;br /&gt;
        String     sPath sImage&lt;br /&gt;
         &lt;br /&gt;
        Move (Uppercase(GetApplicationFileName(ghoApplication))) to sPath&lt;br /&gt;
        // Strip off drive designation:&lt;br /&gt;
        Move (Pos(&amp;quot;\&amp;quot;, sPath))                                  to iPos&lt;br /&gt;
        Move (Right(sPath, (Length(sPath) - iPos)))             to sPath&lt;br /&gt;
        Move (Length(sPath))                                    to iPathLen&lt;br /&gt;
        Move 4096                                               to iSize&lt;br /&gt;
 &lt;br /&gt;
        Move (ResizeArray(auiProcs, iSize))                     to auiProcs&lt;br /&gt;
        Move (iSize * SizeOfType(UInteger))                     to uiCb&lt;br /&gt;
        Move 0                                                  to uiNeeded&lt;br /&gt;
 &lt;br /&gt;
        Move (EnumProcesses(AddressOf(auiProcs), ;&lt;br /&gt;
                            uiCb, ;&lt;br /&gt;
                            AddressOf(uiNeeded)))               to iOK&lt;br /&gt;
         &lt;br /&gt;
        // Just for debugging:&lt;br /&gt;
        If not iOK ;&lt;br /&gt;
            Move (GetLastError())                               to uiErr&lt;br /&gt;
         &lt;br /&gt;
        Move (uiNeeded / SizeOfType(UInteger))                  to iSize&lt;br /&gt;
        Move (ResizeArray(auiProcs, iSize))                     to auiProcs&lt;br /&gt;
        Decrement iSize&lt;br /&gt;
         &lt;br /&gt;
        For i from 0 to iSize&lt;br /&gt;
            Move (OpenProcess(PROCESS_VM_READ + PROCESS_QUERY_INFORMATION, ;&lt;br /&gt;
                                                    True, auiProcs[i])) to hProc&lt;br /&gt;
             &lt;br /&gt;
            If (hProc &amp;lt;&amp;gt; 0) Begin  // We DID get a handle to the process&lt;br /&gt;
                Move (ResizeArray(ucaFile, 0))                  to ucaFile&lt;br /&gt;
                Move (ResizeArray(ucaFile, 2048))               to ucaFile&lt;br /&gt;
                Move (ProcessImageFileName(hProc, ;&lt;br /&gt;
                      AddressOf(ucaFile), 2048))                to uiSize&lt;br /&gt;
                Move (ResizeArray(ucaFile, uiSize))             to ucaFile&lt;br /&gt;
                Move (Uppercase(UCharArrayToString(ucaFile)))   to sImage&lt;br /&gt;
                Move (Right(sImage, iPathLen))                  to sImage&lt;br /&gt;
                 &lt;br /&gt;
                If (sImage = sPath) ;&lt;br /&gt;
                    Move auiProcs[i] to aiWebAppProcs[SizeOfArray(aiWebAppProcs)]    &lt;br /&gt;
            End&lt;br /&gt;
             &lt;br /&gt;
        Loop&lt;br /&gt;
         &lt;br /&gt;
        Set paiWebAppProcs to aiWebAppProcs&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    Procedure OnShow&lt;br /&gt;
        Send UpdateProcInfo&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    // Registry object for getting the WebApp info from the registry:&lt;br /&gt;
    Object oReg is a cRegistry&lt;br /&gt;
        Set phRootKey to HKEY_LOCAL_MACHINE&lt;br /&gt;
        Set pfAccessRights to (KEY_WOW64_64KEY ior KEY_READ)&lt;br /&gt;
        &lt;br /&gt;
        Function BaseKey Returns String&lt;br /&gt;
            String[] asParts&lt;br /&gt;
            &lt;br /&gt;
            Move &amp;quot;SOFTWARE&amp;quot;                 to asParts[0]&lt;br /&gt;
            Move &amp;quot;Data Access Worldwide&amp;quot;    to asParts[1]&lt;br /&gt;
            Move &amp;quot;DataFlex&amp;quot;                 to asParts[2]&lt;br /&gt;
            Move C_DFVersion                to asParts[3]&lt;br /&gt;
            Move &amp;quot;WebApp Server&amp;quot;            to asParts[4]&lt;br /&gt;
            Move &amp;quot;Web Applications&amp;quot;         to asParts[5]&lt;br /&gt;
             &lt;br /&gt;
            // If it is a 64-bit machine and running on a DF version PRIOR to 20&lt;br /&gt;
            // Insert &amp;quot;Wow6432Node just after &amp;quot;SOFTWARE&amp;quot;:&lt;br /&gt;
            If (KeyExists(Self, &amp;quot;SOFTWARE\Wow6432Node&amp;quot;) and ;&lt;br /&gt;
                (Number(C_DFVersion) &amp;lt; 20)) ;&lt;br /&gt;
                Move (InsertInArray(asParts, 1, &amp;quot;Wow6432Node&amp;quot;)) to asParts&lt;br /&gt;
             &lt;br /&gt;
            Function_Return (StrJoinFromArray(asParts, &amp;quot;\&amp;quot;))&lt;br /&gt;
        End_Function&lt;br /&gt;
         &lt;br /&gt;
        Function DWKeyValue String sApp String sVal Returns Integer&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            Integer iVal&lt;br /&gt;
            String  sKey&lt;br /&gt;
&lt;br /&gt;
            Move (BaseKey(Self) + &amp;quot;\&amp;quot; + sApp)   to sKey&lt;br /&gt;
            &lt;br /&gt;
            Get KeyExists sKey                  to bOK&lt;br /&gt;
            If not bOK ;&lt;br /&gt;
                Function_Return 0&lt;br /&gt;
             &lt;br /&gt;
            Get OpenKey sKey to bOK&lt;br /&gt;
            If not bOK ;&lt;br /&gt;
                Function_Return 0&lt;br /&gt;
            &lt;br /&gt;
            Move (ReadDWord(Self, sVal)) to iVal&lt;br /&gt;
            Send CloseKey&lt;br /&gt;
             &lt;br /&gt;
            Function_Return iVal&lt;br /&gt;
        End_Function&lt;br /&gt;
         &lt;br /&gt;
    End_Object&lt;br /&gt;
     &lt;br /&gt;
    // Refresh all the displayed information&lt;br /&gt;
    Procedure UpdateProcInfo&lt;br /&gt;
        String  sApp&lt;br /&gt;
        Integer iMin iMax&lt;br /&gt;
         &lt;br /&gt;
        Get psWebAppName                to sApp&lt;br /&gt;
        WebSet psValue of oMinProc      to (DWKeyValue(oReg(Self), sApp, &amp;quot;MinPool&amp;quot;))&lt;br /&gt;
        WebSet psValue of oMaxProc      to (DWKeyValue(oReg(Self), sApp, &amp;quot;MaxPool&amp;quot;))&lt;br /&gt;
        WebSet psValue of oCurrProcs    to &amp;quot;Unknown&amp;quot;&lt;br /&gt;
         &lt;br /&gt;
        WebSet psValue of oCurrProcess  to (GetCurrentProcessId())&lt;br /&gt;
        WebSet psValue of oGlobalVal    to giRandom&lt;br /&gt;
        WebSet psValue of oRegProp      to (piRandom(Self))&lt;br /&gt;
        WebSet psValue of oDBRec        to FlexErrs.Recnum&lt;br /&gt;
         &lt;br /&gt;
        Send FindWebAppProcs&lt;br /&gt;
        Send GridRefresh of oProcList&lt;br /&gt;
        Send Focus of oCallServer&lt;br /&gt;
    End_Procedure&lt;br /&gt;
         &lt;br /&gt;
    Object oWebMainPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 8&lt;br /&gt;
         &lt;br /&gt;
        Object oExplanation is a cWebLabel&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set psCaption to ;&lt;br /&gt;
                (&#039;This view demonstrates the fact that in a Process&#039; + ;&lt;br /&gt;
                 &#039; Pooled WebApp (which all modern WebApps generally&#039; + ;&lt;br /&gt;
                 &#039; are) you CANNOT rely on the values in global variables,&#039; + ;&lt;br /&gt;
                 &#039; regular properties and database buffers. They change&#039; + ;&lt;br /&gt;
                 &#039; from one server round-trip to the next. ONLY web&#039; + ;&lt;br /&gt;
                 &#039; properties and Data Dictionary values can be relied on.&#039; + ;&lt;br /&gt;
                 &#039; If you run this under the debugger you will see that&#039; + ;&lt;br /&gt;
                 &#039; only a single process is &amp;quot;in the pool&amp;quot; and the values&#039; + ;&lt;br /&gt;
                 &#039; of the things below do not change, which is why you&#039; + ;&lt;br /&gt;
                 &#039; MUST test Web Apps OUTSIDE the debugger.&#039;)&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
        Object oProcPoolGrp is a cWebGroup&lt;br /&gt;
            Set piColumnCount to 8&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set psCaption to &amp;quot;Process Pool Information:&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Object oPoolInfo is a cWebGroup&lt;br /&gt;
                Set pbShowBorder to False&lt;br /&gt;
                Set pbShowCaption to False&lt;br /&gt;
                Set piColumnCount to 12&lt;br /&gt;
                Set piColumnSpan to 6&lt;br /&gt;
                 &lt;br /&gt;
                Object oAppName is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 0&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Web Application:&amp;quot;&lt;br /&gt;
                    Set psValue to (psWebAppName(Self))&lt;br /&gt;
                End_Object&lt;br /&gt;
             &lt;br /&gt;
                Object oMinProc is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Minimum Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Object oMaxProc is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Maximum Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Object oCurrProcs is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Current Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                &lt;br /&gt;
            End_Object&lt;br /&gt;
             &lt;br /&gt;
            Object oProcList is a cWebList&lt;br /&gt;
                Set piColumnIndex to 6&lt;br /&gt;
                Set piColumnSpan to 2&lt;br /&gt;
                Set pbDataAware to False&lt;br /&gt;
                Set pbOfflineEditing to True  // DON&#039;T call the server on RowChange&lt;br /&gt;
                // Adjust this to see more/less process numbers without scrolling:&lt;br /&gt;
                Set piHeight to 200&lt;br /&gt;
 &lt;br /&gt;
                Object oProcsCol is a cWebColumn&lt;br /&gt;
                    Set psCaption to &amp;quot;Pool Process IDs&amp;quot;&lt;br /&gt;
                    Set piWidth to 100&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Procedure OnManualLoadData tWebRow[] ByRef aTheRows String ByRef sCurrentRowID&lt;br /&gt;
                    Integer[] aiWebProcs&lt;br /&gt;
                    Integer i iLast iThis&lt;br /&gt;
                     &lt;br /&gt;
                    Get paiWebAppProcs of oProcPoolDemo to aiWebProcs&lt;br /&gt;
                    Move (GetCurrentProcessId())        to iThis&lt;br /&gt;
                     &lt;br /&gt;
                    Move (SizeOfArray(aiWebProcs))      to iLast&lt;br /&gt;
                    WebSet psValue of oCurrProcs        to iLast&lt;br /&gt;
                    Decrement iLast&lt;br /&gt;
                     &lt;br /&gt;
                    For i from 0 to iLast&lt;br /&gt;
                        Move aiWebProcs[i] to aTheRows[i].sRowID&lt;br /&gt;
                        Move aiWebProcs[i] to aTheRows[i].aCells[0].sValue&lt;br /&gt;
                         &lt;br /&gt;
                        If (aiWebProcs[i] = iThis) Begin&lt;br /&gt;
                            Move aiWebProcs[i] to sCurrentRowID&lt;br /&gt;
                        End&lt;br /&gt;
                         &lt;br /&gt;
                    Loop&lt;br /&gt;
                     &lt;br /&gt;
                    Forward Send OnManualLoadData (&amp;amp;aTheRows) (&amp;amp;sCurrentRowID)&lt;br /&gt;
                End_Procedure&lt;br /&gt;
                 &lt;br /&gt;
            End_Object&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCurrProcess is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Last invoked server process was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oGlobalVal is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Global variable giRandom in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oRegProp is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Regular property piRandom in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oDBRec is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Flexerrs recnum in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oWebValue is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set psLabel to &amp;quot;Your entered value:&amp;quot;&lt;br /&gt;
            Set psValue to &amp;quot;Hello!&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oNote is a cWebLabel&lt;br /&gt;
            Set psCaption to &amp;quot;(This is a web property - psValue of oWebValue - so will not change unless YOU change it)&amp;quot;&lt;br /&gt;
            Set piColumnIndex to 4&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oButtonSpacer is a cWebSpacer&lt;br /&gt;
            Set piHeight to 20&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCallServer is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Call Server&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
                     &lt;br /&gt;
        Object oInfo is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 2&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Info Box&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Integer iProc&lt;br /&gt;
                 &lt;br /&gt;
                Move (GetCurrentProcessId()) to iProc&lt;br /&gt;
                Send ShowInfoBox (&amp;quot;InfoBox in process&amp;quot; * String(iProc))&lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oYesNo is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 4&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Yes/No&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            // Web Property to hold state between browser/server round-trips&lt;br /&gt;
            { WebProperty=Client }&lt;br /&gt;
            Property stAllMyState ptState&lt;br /&gt;
             &lt;br /&gt;
            // Is called in response to user&#039;s second answer:&lt;br /&gt;
            Procedure ProcessSecondAnswer Integer eAnswer&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                String[]     asInfo&lt;br /&gt;
 &lt;br /&gt;
                WebGet ptState                              to tState&lt;br /&gt;
                Move (GetCurrentProcessId())                to tState.iProc3&lt;br /&gt;
                Move (CurrentDateTime())                    to tState.tmAnswered2&lt;br /&gt;
                Move (If((eAnswer = cmYes), &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;))   to tState.SecondAnswer&lt;br /&gt;
                 &lt;br /&gt;
                // Assemble results:&lt;br /&gt;
                Move (&amp;quot;You clicked the &#039;Yes/No&#039; button at&amp;quot; * String(tState.tmClicked) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc1)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                Move (&amp;quot;Your first answer was: &#039;&amp;quot; + ;&lt;br /&gt;
                    tState.sFirstAswer + &amp;quot;&#039; at&amp;quot; * String(tState.tmAnswered1) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc2)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                Move (&amp;quot;Your second answer was: &#039;&amp;quot; + ;&lt;br /&gt;
                    tState.SecondAnswer + &amp;quot;&#039; at&amp;quot; * String(tState.tmAnswered2) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc3)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowInfoBox (StrJoinFromArray(asInfo, C_CRLF)) &amp;quot;Results&amp;quot;&lt;br /&gt;
                 &lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            WebPublishProcedure ProcessSecondAnswer  // Publish the proc to receive control after second answer&lt;br /&gt;
             &lt;br /&gt;
            // Is called in response to user&#039;s first answer:&lt;br /&gt;
            Procedure ProcessFirstAnswer  Integer eAnswer&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                 &lt;br /&gt;
                WebGet ptState to tState&lt;br /&gt;
                 &lt;br /&gt;
                Move (GetCurrentProcessId())                to tState.iProc2&lt;br /&gt;
                Move (CurrentDateTime())                    to tState.tmAnswered1&lt;br /&gt;
                Move (If((eAnswer = cmYes), &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;))   to tState.sFirstAswer&lt;br /&gt;
                WebSet ptState                              to tState&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowYesNo Self (RefProc(ProcessSecondAnswer)) ;&lt;br /&gt;
                    (&amp;quot;Do you REALLY want to do this? (Proc:&amp;quot; * String(tState.iProc2) + &amp;quot;)&amp;quot;) ;&lt;br /&gt;
                    &amp;quot;Second question&amp;quot;&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            WebPublishProcedure ProcessFirstAnswer  // Publish the proc to receive control after first answer&lt;br /&gt;
             &lt;br /&gt;
            // Triggers the question cascade:&lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                 &lt;br /&gt;
                Move (CurrentDateTime())        to tState.tmClicked&lt;br /&gt;
                Move (GetCurrentProcessId())    to tState.iProc1&lt;br /&gt;
                WebSet ptState                  to tState&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowYesNo Self (RefProc(ProcessFirstAnswer)) ;&lt;br /&gt;
                    (&amp;quot;Do you want to do this? (Proc:&amp;quot; * String(tState.iProc1) + &amp;quot;)&amp;quot;) ;&lt;br /&gt;
                    &amp;quot;First question&amp;quot;&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oDialog is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 6&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Popup Dialog&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnCloseModalDialog Handle hoModalDialog&lt;br /&gt;
                Integer iProc1 iProc2&lt;br /&gt;
                 &lt;br /&gt;
                If (hoModalDialog = oTestDialog) Begin&lt;br /&gt;
                    Get DialogResult of oTestDialog to iProc1&lt;br /&gt;
                    Move (GetCurrentProcessId())    to iProc2&lt;br /&gt;
                    Send ShowInfoBox ;&lt;br /&gt;
                        (&amp;quot;Dialog in process&amp;quot; * String(iProc1) + C_CRLF + ;&lt;br /&gt;
                         &amp;quot;Returned to process&amp;quot; * String(iProc2)) &amp;quot;Result&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
                    Send UpdateProcInfo&lt;br /&gt;
                End&lt;br /&gt;
                 &lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send PopupTheDialog of oTestDialog Self (GetCurrentProcessId())&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
    End_Object&lt;br /&gt;
 &lt;br /&gt;
End_Object&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Web Applications]]&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Process_Pool_Demo&amp;diff=3319</id>
		<title>Process Pool Demo</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Process_Pool_Demo&amp;diff=3319"/>
		<updated>2020-06-12T07:25:18Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Changed web property to regular property&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In an [https://www.unicorninterglobal.com/company/blog/dataflex-webapp-process-pooling-demo article] on the [https://www.unicorninterglobal.com Unicorn InterGlobal web site] I describe my Process Pooling Demo web view.&lt;br /&gt;
&lt;br /&gt;
The code for it is as follows and you can download the zip file from this link: [[File:ProcPoolDemo.zip]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dataflex&amp;quot;&amp;gt;&lt;br /&gt;
Use cWebView.pkg&lt;br /&gt;
Use cWebModalDialog.pkg&lt;br /&gt;
Use cWebPanel.pkg&lt;br /&gt;
Use cWebGroup.pkg&lt;br /&gt;
Use cWebForm.pkg &lt;br /&gt;
Use cWebButton.pkg&lt;br /&gt;
Use cWebSpacer.pkg&lt;br /&gt;
Use cWebList.pkg&lt;br /&gt;
Use cWebLabel.pkg&lt;br /&gt;
Use cRegistry.pkg&lt;br /&gt;
Use cIniFile.pkg&lt;br /&gt;
 &lt;br /&gt;
Define PROCESS_VM_READ           for |CI$0010&lt;br /&gt;
Define PROCESS_QUERY_INFORMATION for |CI$0400&lt;br /&gt;
 &lt;br /&gt;
// Wrap all these in #IFNDEF/#ENDIF blocks to avoid any conflicts&lt;br /&gt;
// with the same things already defined in the application&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_GetLastError&lt;br /&gt;
External_Function GetLastError &amp;quot;GetLastError&amp;quot; Kernal32.DLL Returns DWord&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_GetCurrentProcessId&lt;br /&gt;
External_Function GetCurrentProcessId &amp;quot;GetCurrentProcessId&amp;quot; Kernel32.Dll Returns Integer&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_EnumProcesses&lt;br /&gt;
External_Function EnumProcesses &amp;quot;K32EnumProcesses&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    Pointer lpidProcess ;&lt;br /&gt;
    DWord   cb ;&lt;br /&gt;
    Pointer lpcbNeeded ;&lt;br /&gt;
    Returns Integer&lt;br /&gt;
#ENDIF&lt;br /&gt;
   &lt;br /&gt;
#IFNDEF get_OpenProcess&lt;br /&gt;
External_Function OpenProcess &amp;quot;OpenProcess&amp;quot; Kernel32.Dll ;&lt;br /&gt;
    DWord dwDesiredAccess ;&lt;br /&gt;
    Boolean bInheritHandle ;&lt;br /&gt;
    DWord dwProcessId ;&lt;br /&gt;
    Returns Handle&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF get_ProcessHandle&lt;br /&gt;
External_Function ProcessHandle &amp;quot;OpenProcess&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    DWord   dwDesiredAccess ;&lt;br /&gt;
    Boolean bInheritHandle ;&lt;br /&gt;
    DWord   dwProcessID ;&lt;br /&gt;
    Returns Handle&lt;br /&gt;
#ENDIF&lt;br /&gt;
     &lt;br /&gt;
#IFNDEF get_ProcessImageFileName&lt;br /&gt;
External_Function ProcessImageFileName &amp;quot;K32GetProcessImageFileNameA&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    Handle  hProcess ;&lt;br /&gt;
    Pointer lpImageFileName ;&lt;br /&gt;
    DWord   nSize ;&lt;br /&gt;
    Returns DWord&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF _struct_stAllMyState&lt;br /&gt;
// Struct to hold state&lt;br /&gt;
Struct stAllMyState&lt;br /&gt;
    Time    tmClicked&lt;br /&gt;
    String  sFirstAswer&lt;br /&gt;
    Time    tmAnswered1&lt;br /&gt;
    String  SecondAnswer&lt;br /&gt;
    Time    tmAnswered2&lt;br /&gt;
    Integer iProc1&lt;br /&gt;
    Integer iProc2&lt;br /&gt;
    Integer iProc3&lt;br /&gt;
End_Struct&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
#IFNDEF C_CRLF&lt;br /&gt;
// Just for formatting the result of the Yes/No cascade in this case:&lt;br /&gt;
Define C_CRLF for (Character(13) + Character(10))&lt;br /&gt;
#ENDIF&lt;br /&gt;
 &lt;br /&gt;
// The following items will (almost always) have different values in&lt;br /&gt;
// different processes in the WebApp process pool, but will remain static&lt;br /&gt;
// in any given process.&lt;br /&gt;
 &lt;br /&gt;
Global_Variable Integer giRandom&lt;br /&gt;
Move (Random(10000)) to giRandom&lt;br /&gt;
 &lt;br /&gt;
// This will be a property of oWabApp:&lt;br /&gt;
Property Integer piRandom (Random(10000) + 10000)&lt;br /&gt;
 &lt;br /&gt;
// Will be opened in the WebApp&lt;br /&gt;
Open Flexerrs&lt;br /&gt;
Clear Flexerrs&lt;br /&gt;
Move (Random(99) + 1) to Flexerrs.Recnum&lt;br /&gt;
Find EQ FlexErrs by Recnum&lt;br /&gt;
 &lt;br /&gt;
//==============================================================================&lt;br /&gt;
// This is a Modal Dialog which will be called from the View,&lt;br /&gt;
// included directly in-line here for simplicity:&lt;br /&gt;
//==============================================================================&lt;br /&gt;
Object oTestDialog is a cWebModalDialog&lt;br /&gt;
    Set psCaption to &amp;quot;Test Dialog&amp;quot;&lt;br /&gt;
    Set piMinWidth to 300&lt;br /&gt;
    Set piMinHeight to 200&lt;br /&gt;
    Set pbServerOnEscape to False   // The only way out&lt;br /&gt;
    Set pbShowClose to False        // is to click &amp;quot;OK&amp;quot;&lt;br /&gt;
    Set pbServerOnSubmit to True    // enable the OnSubmit event&lt;br /&gt;
     &lt;br /&gt;
    Object oMainPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 12&lt;br /&gt;
         &lt;br /&gt;
        Object oProcess is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;This Process ID:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCaller is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Called from Process ID:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oGlobal is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Global variable giRandom was:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
        Object oRegProp is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Regular property piRandom was:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
    End_Object&lt;br /&gt;
     &lt;br /&gt;
    Object oBottomPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 4&lt;br /&gt;
        Set peRegion to prBottom&lt;br /&gt;
 &lt;br /&gt;
        Object oOkButton is a cWebButton&lt;br /&gt;
            Set psCaption to C_$OK&lt;br /&gt;
            Set piColumnSpan to 1&lt;br /&gt;
            Set piColumnIndex to 3&lt;br /&gt;
 &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send Ok&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
    End_Object&lt;br /&gt;
 &lt;br /&gt;
    Procedure OnSubmit&lt;br /&gt;
        Send Ok&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    Procedure PopupTheDialog  Handle hReturnObj Integer iCaller&lt;br /&gt;
        Send Popup hReturnObj&lt;br /&gt;
         &lt;br /&gt;
        WebSet psValue of oProcess to (GetCurrentProcessId())&lt;br /&gt;
        WebSet psValue of oCaller  to iCaller&lt;br /&gt;
        WebSet psValue of oGlobal  to giRandom&lt;br /&gt;
        WebSet psValue of oRegProp to (piRandom(Self))&lt;br /&gt;
    End_Procedure&lt;br /&gt;
 &lt;br /&gt;
    Function DialogResult Returns String&lt;br /&gt;
        String sResult&lt;br /&gt;
         &lt;br /&gt;
        WebGet psValue of oProcess to sResult&lt;br /&gt;
        Function_Return sResult&lt;br /&gt;
    End_Function&lt;br /&gt;
 &lt;br /&gt;
End_Object&lt;br /&gt;
 &lt;br /&gt;
//==============================================================================&lt;br /&gt;
// This is the actual view&lt;br /&gt;
//==============================================================================&lt;br /&gt;
Object oProcPoolDemo is a cWebView    &lt;br /&gt;
    Set piWidth to 700&lt;br /&gt;
    Set psCaption to &amp;quot;Process Pooling Effects Demo&amp;quot;&lt;br /&gt;
    Set pbServerOnShow to True&lt;br /&gt;
     &lt;br /&gt;
    Property Integer[] paiWebAppProcs&lt;br /&gt;
  &lt;br /&gt;
    // Display this view at start up:&lt;br /&gt;
    Delegate Set phoDefaultView to Self&lt;br /&gt;
     &lt;br /&gt;
    // Work out the web application name from the WebServiceDispatcher.wo&lt;br /&gt;
    // file in AppHTML, which we treat like a .ini file&lt;br /&gt;
    Function WebAppName Returns String&lt;br /&gt;
        Handle hoIni&lt;br /&gt;
        String sName&lt;br /&gt;
         &lt;br /&gt;
        Get Create (RefClass(cIniFile)) to hoIni&lt;br /&gt;
        Set psFileName of hoIni to ;&lt;br /&gt;
            (psAppHtmlPath(phoWorkspace(ghoApplication)) + ;&lt;br /&gt;
            &amp;quot;\WebServiceDispatcher.wso&amp;quot;)&lt;br /&gt;
        Get ReadString of hoIni &amp;quot;WebService&amp;quot; &amp;quot;Application&amp;quot; &amp;quot;&amp;quot; to sName&lt;br /&gt;
        Send Destroy of hoIni&lt;br /&gt;
        Function_Return sName&lt;br /&gt;
    End_Function&lt;br /&gt;
     &lt;br /&gt;
    // Will be set to return value of above function at start-up.&lt;br /&gt;
    // This is a regular property because the web app name can&#039;t&lt;br /&gt;
    // change while the program is running.&lt;br /&gt;
    Property String psWebAppName (WebAppName(Self))&lt;br /&gt;
    &lt;br /&gt;
    // This uses three external functions to find all the processes in the&lt;br /&gt;
    // current WebApp&#039;s process pool - it will get updated on every refresh&lt;br /&gt;
    // so if you change the number of processes in the pool while the WebApp is&lt;br /&gt;
    // running you will see it in the view.&lt;br /&gt;
    //&lt;br /&gt;
    // It first uses EnumProcesses to find all the running processes on the&lt;br /&gt;
    // machine.&lt;br /&gt;
    //&lt;br /&gt;
    // It then iterates through that list and tries OpenProcess to get a handle&lt;br /&gt;
    // to it (for some permissions will not allow that, so those are skipped).&lt;br /&gt;
    //&lt;br /&gt;
    // Finally it calls ProcessImageFileName to see if that is one of the&lt;br /&gt;
    // processes running for THIS WebApp. However ProcessImageFileName&lt;br /&gt;
    // returns a file-path starting with the disk identifer in a slightly odd&lt;br /&gt;
    // form, i.e. &amp;quot;\DEVICE\HARDDISKVOLUMEn&amp;quot; (n is &amp;quot;1&amp;quot; for my C: drive) and even &lt;br /&gt;
    // spookier things for mapped drives, so we strip off the &amp;quot;C:\&amp;quot;, or whatever,&lt;br /&gt;
    // from the application file name DataFlex returns and uppercase both, then &lt;br /&gt;
    // compare THAT to the same length of the right-portion of the image name.&lt;br /&gt;
    // This may screw up if you have more than one identically pathed web-apps&lt;br /&gt;
    // on different drives - just so you know. &amp;lt;g&amp;gt;&lt;br /&gt;
    //&lt;br /&gt;
    // Note: that although the docs (and the declarations) use DWords,&lt;br /&gt;
    //       on Vincent&#039;s advice we are using UIntegers in our code (the same&lt;br /&gt;
    //       thing in reality) because you can use SizeOfType(UInteger) in the&lt;br /&gt;
    //       Watches window when debugging, which you can&#039;t for DWord.&lt;br /&gt;
    Procedure FindWebAppProcs&lt;br /&gt;
        Integer[]  aiWebAppProcs &lt;br /&gt;
        UInteger[] auiProcs&lt;br /&gt;
        UInteger   uiCb uiNeeded uiSize uiErr&lt;br /&gt;
        Integer    iOK i iLast iPos iSize iPathLen&lt;br /&gt;
        Handle     hProc&lt;br /&gt;
        UChar[]    ucaFile&lt;br /&gt;
        String     sPath sImage&lt;br /&gt;
         &lt;br /&gt;
        Move (Uppercase(GetApplicationFileName(ghoApplication))) to sPath&lt;br /&gt;
        // Strip off drive designation:&lt;br /&gt;
        Move (Pos(&amp;quot;\&amp;quot;, sPath))                                  to iPos&lt;br /&gt;
        Move (Right(sPath, (Length(sPath) - iPos)))             to sPath&lt;br /&gt;
        Move (Length(sPath))                                    to iPathLen&lt;br /&gt;
        Move 4096                                               to iSize&lt;br /&gt;
 &lt;br /&gt;
        Move (ResizeArray(auiProcs, iSize))                     to auiProcs&lt;br /&gt;
        Move (iSize * SizeOfType(UInteger))                     to uiCb&lt;br /&gt;
        Move 0                                                  to uiNeeded&lt;br /&gt;
 &lt;br /&gt;
        Move (EnumProcesses(AddressOf(auiProcs), ;&lt;br /&gt;
                            uiCb, ;&lt;br /&gt;
                            AddressOf(uiNeeded)))               to iOK&lt;br /&gt;
         &lt;br /&gt;
        // Just for debugging:&lt;br /&gt;
        If not iOK ;&lt;br /&gt;
            Move (GetLastError())                               to uiErr&lt;br /&gt;
         &lt;br /&gt;
        Move (uiNeeded / SizeOfType(UInteger))                  to iSize&lt;br /&gt;
        Move (ResizeArray(auiProcs, iSize))                     to auiProcs&lt;br /&gt;
        Decrement iSize&lt;br /&gt;
         &lt;br /&gt;
        For i from 0 to iSize&lt;br /&gt;
            Move (OpenProcess(PROCESS_VM_READ + PROCESS_QUERY_INFORMATION, ;&lt;br /&gt;
                                                    True, auiProcs[i])) to hProc&lt;br /&gt;
             &lt;br /&gt;
            If (hProc &amp;lt;&amp;gt; 0) Begin  // We DID get a handle to the process&lt;br /&gt;
                Move (ResizeArray(ucaFile, 0))                  to ucaFile&lt;br /&gt;
                Move (ResizeArray(ucaFile, 2048))               to ucaFile&lt;br /&gt;
                Move (ProcessImageFileName(hProc, ;&lt;br /&gt;
                      AddressOf(ucaFile), 2048))                to uiSize&lt;br /&gt;
                Move (ResizeArray(ucaFile, uiSize))             to ucaFile&lt;br /&gt;
                Move (Uppercase(UCharArrayToString(ucaFile)))   to sImage&lt;br /&gt;
                Move (Right(sImage, iPathLen))                  to sImage&lt;br /&gt;
                 &lt;br /&gt;
                If (sImage = sPath) ;&lt;br /&gt;
                    Move auiProcs[i] to aiWebAppProcs[SizeOfArray(aiWebAppProcs)]    &lt;br /&gt;
            End&lt;br /&gt;
             &lt;br /&gt;
        Loop&lt;br /&gt;
         &lt;br /&gt;
        Set paiWebAppProcs to aiWebAppProcs&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    Procedure OnShow&lt;br /&gt;
        Send UpdateProcInfo&lt;br /&gt;
    End_Procedure&lt;br /&gt;
     &lt;br /&gt;
    // Registry object for getting the WebApp info from the registry:&lt;br /&gt;
    Object oReg is a cRegistry&lt;br /&gt;
        Set phRootKey to HKEY_LOCAL_MACHINE&lt;br /&gt;
        Set pfAccessRights to Key_Read&lt;br /&gt;
         &lt;br /&gt;
        Function BaseKey Returns String&lt;br /&gt;
            String[] asParts&lt;br /&gt;
             &lt;br /&gt;
            Move &amp;quot;SOFTWARE&amp;quot;                 to asParts[0]&lt;br /&gt;
            Move &amp;quot;Data Access Worldwide&amp;quot;    to asParts[1]&lt;br /&gt;
            Move &amp;quot;DataFlex&amp;quot;                 to asParts[2]&lt;br /&gt;
            Move C_DFVersion                to asParts[3]&lt;br /&gt;
            Move &amp;quot;WebApp Server&amp;quot;            to asParts[4]&lt;br /&gt;
            Move &amp;quot;Web Applications&amp;quot;         to asParts[5]&lt;br /&gt;
             &lt;br /&gt;
            // If it is a 64-bit machine:&lt;br /&gt;
            If (KeyExists(Self, &amp;quot;SOFTWARE\Wow6432Node&amp;quot;)) ;&lt;br /&gt;
                Move (InsertInArray(asParts, 1, &amp;quot;Wow6432Node&amp;quot;)) to asParts&lt;br /&gt;
             &lt;br /&gt;
            Function_Return (StrJoinFromArray(asParts, &amp;quot;\&amp;quot;))&lt;br /&gt;
        End_Function&lt;br /&gt;
         &lt;br /&gt;
        Function DWKeyValue String sApp String sVal Returns Integer&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            Integer iVal&lt;br /&gt;
            String  sKey&lt;br /&gt;
             &lt;br /&gt;
            Move (BaseKey(Self) + &amp;quot;\&amp;quot; + sApp)   to sKey&lt;br /&gt;
            Get KeyExists sKey                  to bOK&lt;br /&gt;
     &lt;br /&gt;
            If not bOK ;&lt;br /&gt;
                Function_Return 0&lt;br /&gt;
             &lt;br /&gt;
            Get OpenKey sKey to bOK&lt;br /&gt;
             &lt;br /&gt;
            If not bOK ;&lt;br /&gt;
                Function_Return 0&lt;br /&gt;
                 &lt;br /&gt;
            Move (ReadDWord(Self, sVal)) to iVal&lt;br /&gt;
            Send CloseKey&lt;br /&gt;
             &lt;br /&gt;
            Function_Return iVal&lt;br /&gt;
        End_Function&lt;br /&gt;
         &lt;br /&gt;
    End_Object&lt;br /&gt;
     &lt;br /&gt;
    // Refresh all the displayed information&lt;br /&gt;
    Procedure UpdateProcInfo&lt;br /&gt;
        String  sApp&lt;br /&gt;
        Integer iMin iMax&lt;br /&gt;
         &lt;br /&gt;
        Get psWebAppName                to sApp&lt;br /&gt;
        WebSet psValue of oMinProc      to (DWKeyValue(oReg(Self), sApp, &amp;quot;MinPool&amp;quot;))&lt;br /&gt;
        WebSet psValue of oMaxProc      to (DWKeyValue(oReg(Self), sApp, &amp;quot;MaxPool&amp;quot;))&lt;br /&gt;
        WebSet psValue of oCurrProcs    to &amp;quot;Unknown&amp;quot;&lt;br /&gt;
         &lt;br /&gt;
        WebSet psValue of oCurrProcess  to (GetCurrentProcessId())&lt;br /&gt;
        WebSet psValue of oGlobalVal    to giRandom&lt;br /&gt;
        WebSet psValue of oRegProp      to (piRandom(Self))&lt;br /&gt;
        WebSet psValue of oDBRec        to FlexErrs.Recnum&lt;br /&gt;
         &lt;br /&gt;
        Send FindWebAppProcs&lt;br /&gt;
        Send GridRefresh of oProcList&lt;br /&gt;
        Send Focus of oCallServer&lt;br /&gt;
    End_Procedure&lt;br /&gt;
         &lt;br /&gt;
    Object oWebMainPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 8&lt;br /&gt;
         &lt;br /&gt;
        Object oExplanation is a cWebLabel&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set psCaption to ;&lt;br /&gt;
                (&#039;This view demonstrates the fact that in a Process&#039; + ;&lt;br /&gt;
                 &#039; Pooled WebApp (which all modern WebApps generally&#039; + ;&lt;br /&gt;
                 &#039; are) you CANNOT rely on the values in global variables,&#039; + ;&lt;br /&gt;
                 &#039; regular properties and database buffers. They change&#039; + ;&lt;br /&gt;
                 &#039; from one server round-trip to the next. ONLY web&#039; + ;&lt;br /&gt;
                 &#039; properties and Data Dictionary values can be relied on.&#039; + ;&lt;br /&gt;
                 &#039; If you run this under the debugger you will see that&#039; + ;&lt;br /&gt;
                 &#039; only a single process is &amp;quot;in the pool&amp;quot; and the values&#039; + ;&lt;br /&gt;
                 &#039; of the things below do not change, which is why you&#039; + ;&lt;br /&gt;
                 &#039; MUST test Web Apps OUTSIDE the debugger.&#039;)&lt;br /&gt;
        End_Object&lt;br /&gt;
                 &lt;br /&gt;
        Object oProcPoolGrp is a cWebGroup&lt;br /&gt;
            Set piColumnCount to 8&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set psCaption to &amp;quot;Process Pool Information:&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Object oPoolInfo is a cWebGroup&lt;br /&gt;
                Set pbShowBorder to False&lt;br /&gt;
                Set pbShowCaption to False&lt;br /&gt;
                Set piColumnCount to 12&lt;br /&gt;
                Set piColumnSpan to 6&lt;br /&gt;
                 &lt;br /&gt;
                Object oAppName is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 0&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Web Application:&amp;quot;&lt;br /&gt;
                    Set psValue to (psWebAppName(Self))&lt;br /&gt;
                End_Object&lt;br /&gt;
             &lt;br /&gt;
                Object oMinProc is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Minimum Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Object oMaxProc is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Maximum Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Object oCurrProcs is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Current Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
            End_Object&lt;br /&gt;
             &lt;br /&gt;
            Object oProcList is a cWebList&lt;br /&gt;
                Set piColumnIndex to 6&lt;br /&gt;
                Set piColumnSpan to 2&lt;br /&gt;
                Set pbDataAware to False&lt;br /&gt;
                Set pbOfflineEditing to True  // DON&#039;T call the server on RowChange&lt;br /&gt;
                // Adjust this to see more/less process numbers without scrolling:&lt;br /&gt;
                Set piHeight to 200&lt;br /&gt;
 &lt;br /&gt;
                Object oProcsCol is a cWebColumn&lt;br /&gt;
                    Set psCaption to &amp;quot;Pool Process IDs&amp;quot;&lt;br /&gt;
                    Set piWidth to 100&lt;br /&gt;
                End_Object&lt;br /&gt;
                 &lt;br /&gt;
                Procedure OnManualLoadData tWebRow[] ByRef aTheRows String ByRef sCurrentRowID&lt;br /&gt;
                    Integer[] aiWebProcs&lt;br /&gt;
                    Integer i iLast iThis&lt;br /&gt;
                     &lt;br /&gt;
                    Get paiWebAppProcs of oProcPoolDemo to aiWebProcs&lt;br /&gt;
                    Move (GetCurrentProcessId())        to iThis&lt;br /&gt;
                     &lt;br /&gt;
                    Move (SizeOfArray(aiWebProcs))      to iLast&lt;br /&gt;
                    WebSet psValue of oCurrProcs        to iLast&lt;br /&gt;
                    Decrement iLast&lt;br /&gt;
                     &lt;br /&gt;
                    For i from 0 to iLast&lt;br /&gt;
                        Move aiWebProcs[i] to aTheRows[i].sRowID&lt;br /&gt;
                        Move aiWebProcs[i] to aTheRows[i].aCells[0].sValue&lt;br /&gt;
                         &lt;br /&gt;
                        If (aiWebProcs[i] = iThis) Begin&lt;br /&gt;
                            Move aiWebProcs[i] to sCurrentRowID&lt;br /&gt;
                        End&lt;br /&gt;
                         &lt;br /&gt;
                    Loop&lt;br /&gt;
                     &lt;br /&gt;
                    Forward Send OnManualLoadData (&amp;amp;aTheRows) (&amp;amp;sCurrentRowID)&lt;br /&gt;
                End_Procedure&lt;br /&gt;
                 &lt;br /&gt;
            End_Object&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCurrProcess is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Last invoked server process was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oGlobalVal is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Global variable giRandom in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oRegProp is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Regular property piRandom in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oDBRec is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Flexerrs recnum in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
 &lt;br /&gt;
        Object oWebValue is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set psLabel to &amp;quot;Your entered value:&amp;quot;&lt;br /&gt;
            Set psValue to &amp;quot;Hello!&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oNote is a cWebLabel&lt;br /&gt;
            Set psCaption to &amp;quot;(This is a web property - psValue of oWebValue - so will not change unless YOU change it)&amp;quot;&lt;br /&gt;
            Set piColumnIndex to 4&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oButtonSpacer is a cWebSpacer&lt;br /&gt;
            Set piHeight to 20&lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oCallServer is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Call Server&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
                     &lt;br /&gt;
        Object oInfo is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 2&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Info Box&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Integer iProc&lt;br /&gt;
                 &lt;br /&gt;
                Move (GetCurrentProcessId()) to iProc&lt;br /&gt;
                Send ShowInfoBox (&amp;quot;InfoBox in process&amp;quot; * String(iProc))&lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oYesNo is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 4&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Yes/No&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            // Web Property to hold state between browser/server round-trips&lt;br /&gt;
            { WebProperty=Client }&lt;br /&gt;
            Property stAllMyState ptState&lt;br /&gt;
             &lt;br /&gt;
            // Is called in response to user&#039;s second answer:&lt;br /&gt;
            Procedure ProcessSecondAnswer Integer eAnswer&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                String[]     asInfo&lt;br /&gt;
 &lt;br /&gt;
                WebGet ptState                              to tState&lt;br /&gt;
                Move (GetCurrentProcessId())                to tState.iProc3&lt;br /&gt;
                Move (CurrentDateTime())                    to tState.tmAnswered2&lt;br /&gt;
                Move (If((eAnswer = cmYes), &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;))   to tState.SecondAnswer&lt;br /&gt;
                 &lt;br /&gt;
                // Assemble results:&lt;br /&gt;
                Move (&amp;quot;You clicked the &#039;Yes/No&#039; button at&amp;quot; * String(tState.tmClicked) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc1)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                Move (&amp;quot;Your first answer was: &#039;&amp;quot; + ;&lt;br /&gt;
                    tState.sFirstAswer + &amp;quot;&#039; at&amp;quot; * String(tState.tmAnswered1) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc2)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                Move (&amp;quot;Your second answer was: &#039;&amp;quot; + ;&lt;br /&gt;
                    tState.SecondAnswer + &amp;quot;&#039; at&amp;quot; * String(tState.tmAnswered2) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc3)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowInfoBox (StrJoinFromArray(asInfo, C_CRLF)) &amp;quot;Results&amp;quot;&lt;br /&gt;
                 &lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            WebPublishProcedure ProcessSecondAnswer  // Publish the proc to receive control after second answer&lt;br /&gt;
             &lt;br /&gt;
            // Is called in response to user&#039;s first answer:&lt;br /&gt;
            Procedure ProcessFirstAnswer  Integer eAnswer&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                 &lt;br /&gt;
                WebGet ptState to tState&lt;br /&gt;
                 &lt;br /&gt;
                Move (GetCurrentProcessId())                to tState.iProc2&lt;br /&gt;
                Move (CurrentDateTime())                    to tState.tmAnswered1&lt;br /&gt;
                Move (If((eAnswer = cmYes), &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;))   to tState.sFirstAswer&lt;br /&gt;
                WebSet ptState                              to tState&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowYesNo Self (RefProc(ProcessSecondAnswer)) ;&lt;br /&gt;
                    (&amp;quot;Do you REALLY want to do this? (Proc:&amp;quot; * String(tState.iProc2) + &amp;quot;)&amp;quot;) ;&lt;br /&gt;
                    &amp;quot;Second question&amp;quot;&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            WebPublishProcedure ProcessFirstAnswer  // Publish the proc to receive control after first answer&lt;br /&gt;
             &lt;br /&gt;
            // Triggers the question cascade:&lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                 &lt;br /&gt;
                Move (CurrentDateTime())        to tState.tmClicked&lt;br /&gt;
                Move (GetCurrentProcessId())    to tState.iProc1&lt;br /&gt;
                WebSet ptState                  to tState&lt;br /&gt;
                 &lt;br /&gt;
                Send ShowYesNo Self (RefProc(ProcessFirstAnswer)) ;&lt;br /&gt;
                    (&amp;quot;Do you want to do this? (Proc:&amp;quot; * String(tState.iProc1) + &amp;quot;)&amp;quot;) ;&lt;br /&gt;
                    &amp;quot;First question&amp;quot;&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
        Object oDialog is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 6&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Popup Dialog&amp;quot;&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnCloseModalDialog Handle hoModalDialog&lt;br /&gt;
                Integer iProc1 iProc2&lt;br /&gt;
                 &lt;br /&gt;
                If (hoModalDialog = oTestDialog) Begin&lt;br /&gt;
                    Get DialogResult of oTestDialog to iProc1&lt;br /&gt;
                    Move (GetCurrentProcessId())    to iProc2&lt;br /&gt;
                    Send ShowInfoBox ;&lt;br /&gt;
                        (&amp;quot;Dialog in process&amp;quot; * String(iProc1) + C_CRLF + ;&lt;br /&gt;
                         &amp;quot;Returned to process&amp;quot; * String(iProc2)) &amp;quot;Result&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
                    Send UpdateProcInfo&lt;br /&gt;
                End&lt;br /&gt;
                 &lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send PopupTheDialog of oTestDialog Self (GetCurrentProcessId())&lt;br /&gt;
            End_Procedure&lt;br /&gt;
             &lt;br /&gt;
        End_Object&lt;br /&gt;
         &lt;br /&gt;
    End_Object&lt;br /&gt;
 &lt;br /&gt;
End_Object&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Web Applications]]&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=File:ProcPoolDemo.zip&amp;diff=3318</id>
		<title>File:ProcPoolDemo.zip</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=File:ProcPoolDemo.zip&amp;diff=3318"/>
		<updated>2020-06-12T07:23:00Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Mikepeat uploaded a new version of File:ProcPoolDemo.zip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Process_Pool_Demo&amp;diff=3317</id>
		<title>Process Pool Demo</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Process_Pool_Demo&amp;diff=3317"/>
		<updated>2020-06-12T07:18:38Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Reverted Web property to normal property&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In an [https://www.unicorninterglobal.com/company/blog/dataflex-webapp-process-pooling-demo article] on the [https://www.unicorninterglobal.com Unicorn InterGlobal web site] I describe my Process Pooling Demo web view.&lt;br /&gt;
&lt;br /&gt;
The code for it is as follows and you can download the zip file from this link: [[File:ProcPoolDemo.zip]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dataflex&amp;quot;&amp;gt;&lt;br /&gt;
Use cWebView.pkg&lt;br /&gt;
Use cWebModalDialog.pkg&lt;br /&gt;
Use cWebPanel.pkg&lt;br /&gt;
Use cWebGroup.pkg&lt;br /&gt;
Use cWebForm.pkg &lt;br /&gt;
Use cWebButton.pkg&lt;br /&gt;
Use cWebSpacer.pkg&lt;br /&gt;
Use cWebList.pkg&lt;br /&gt;
Use cWebLabel.pkg&lt;br /&gt;
Use cRegistry.pkg&lt;br /&gt;
Use cIniFile.pkg&lt;br /&gt;
&lt;br /&gt;
Define PROCESS_VM_READ           for |CI$0010&lt;br /&gt;
Define PROCESS_QUERY_INFORMATION for |CI$0400&lt;br /&gt;
&lt;br /&gt;
// Wrap all these in #IFNDEF/#ENDIF blocks to avoid any conflicts&lt;br /&gt;
// with the same things already defined in the application&lt;br /&gt;
&lt;br /&gt;
#IFNDEF get_GetLastError&lt;br /&gt;
External_Function GetLastError &amp;quot;GetLastError&amp;quot; Kernal32.DLL Returns DWord&lt;br /&gt;
#ENDIF&lt;br /&gt;
&lt;br /&gt;
#IFNDEF get_GetCurrentProcessId&lt;br /&gt;
External_Function GetCurrentProcessId &amp;quot;GetCurrentProcessId&amp;quot; Kernel32.Dll Returns Integer&lt;br /&gt;
#ENDIF&lt;br /&gt;
&lt;br /&gt;
#IFNDEF get_EnumProcesses&lt;br /&gt;
External_Function EnumProcesses &amp;quot;K32EnumProcesses&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    Pointer lpidProcess ;&lt;br /&gt;
    DWord   cb ;&lt;br /&gt;
    Pointer lpcbNeeded ;&lt;br /&gt;
    Returns Integer&lt;br /&gt;
#ENDIF&lt;br /&gt;
  &lt;br /&gt;
#IFNDEF get_OpenProcess&lt;br /&gt;
External_Function OpenProcess &amp;quot;OpenProcess&amp;quot; Kernel32.Dll ;&lt;br /&gt;
    DWord dwDesiredAccess ;&lt;br /&gt;
    Boolean bInheritHandle ;&lt;br /&gt;
    DWord dwProcessId ;&lt;br /&gt;
    Returns Handle&lt;br /&gt;
#ENDIF&lt;br /&gt;
&lt;br /&gt;
#IFNDEF get_ProcessHandle&lt;br /&gt;
External_Function ProcessHandle &amp;quot;OpenProcess&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    DWord   dwDesiredAccess ;&lt;br /&gt;
    Boolean bInheritHandle ;&lt;br /&gt;
    DWord   dwProcessID ;&lt;br /&gt;
    Returns Handle&lt;br /&gt;
#ENDIF&lt;br /&gt;
    &lt;br /&gt;
#IFNDEF get_ProcessImageFileName&lt;br /&gt;
External_Function ProcessImageFileName &amp;quot;K32GetProcessImageFileNameA&amp;quot; Kernel32.DLL ;&lt;br /&gt;
    Handle  hProcess ;&lt;br /&gt;
    Pointer lpImageFileName ;&lt;br /&gt;
    DWord   nSize ;&lt;br /&gt;
    Returns DWord&lt;br /&gt;
#ENDIF&lt;br /&gt;
&lt;br /&gt;
#IFNDEF _struct_stAllMyState&lt;br /&gt;
// Struct to hold state&lt;br /&gt;
Struct stAllMyState&lt;br /&gt;
    Time    tmClicked&lt;br /&gt;
    String  sFirstAswer&lt;br /&gt;
    Time    tmAnswered1&lt;br /&gt;
    String  SecondAnswer&lt;br /&gt;
    Time    tmAnswered2&lt;br /&gt;
    Integer iProc1&lt;br /&gt;
    Integer iProc2&lt;br /&gt;
    Integer iProc3&lt;br /&gt;
End_Struct&lt;br /&gt;
#ENDIF&lt;br /&gt;
&lt;br /&gt;
#IFNDEF C_CRLF&lt;br /&gt;
// Just for formatting the result of the Yes/No cascade in this case:&lt;br /&gt;
Define C_CRLF for (Character(13) + Character(10))&lt;br /&gt;
#ENDIF&lt;br /&gt;
&lt;br /&gt;
// The following items will (almost always) have different values in&lt;br /&gt;
// different processes in the WebApp process pool, but will remain static&lt;br /&gt;
// in any given process.&lt;br /&gt;
&lt;br /&gt;
Global_Variable Integer giRandom&lt;br /&gt;
Move (Random(10000)) to giRandom&lt;br /&gt;
&lt;br /&gt;
// This will be a property of oWabApp:&lt;br /&gt;
Property Integer piRandom (Random(10000) + 10000)&lt;br /&gt;
&lt;br /&gt;
// Will be opened in the WebApp&lt;br /&gt;
Open Flexerrs&lt;br /&gt;
Clear Flexerrs&lt;br /&gt;
Move (Random(99) + 1) to Flexerrs.Recnum&lt;br /&gt;
Find EQ FlexErrs by Recnum&lt;br /&gt;
&lt;br /&gt;
//==============================================================================&lt;br /&gt;
// This is a Modal Dialog which will be called from the View,&lt;br /&gt;
// included directly in-line here for simplicity:&lt;br /&gt;
//==============================================================================&lt;br /&gt;
Object oTestDialog is a cWebModalDialog&lt;br /&gt;
    Set psCaption to &amp;quot;Test Dialog&amp;quot;&lt;br /&gt;
    Set piMinWidth to 300&lt;br /&gt;
    Set piMinHeight to 200&lt;br /&gt;
    Set pbServerOnEscape to False   // The only way out&lt;br /&gt;
    Set pbShowClose to False        // is to click &amp;quot;OK&amp;quot;&lt;br /&gt;
    Set pbServerOnSubmit to True    // enable the OnSubmit event&lt;br /&gt;
    &lt;br /&gt;
    Object oMainPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 12&lt;br /&gt;
        &lt;br /&gt;
        Object oProcess is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;This Process ID:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oCaller is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Called from Process ID:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oGlobal is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Global variable giRandom was:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
                &lt;br /&gt;
        Object oRegProp is a cWebForm&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Regular property piRandom was:&amp;quot;&lt;br /&gt;
            Set piLabelOffset to 210&lt;br /&gt;
        End_Object&lt;br /&gt;
                &lt;br /&gt;
    End_Object &lt;br /&gt;
    &lt;br /&gt;
    Object oBottomPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 4&lt;br /&gt;
        Set peRegion to prBottom&lt;br /&gt;
&lt;br /&gt;
        Object oOkButton is a cWebButton&lt;br /&gt;
            Set psCaption to C_$OK&lt;br /&gt;
            Set piColumnSpan to 1&lt;br /&gt;
            Set piColumnIndex to 3&lt;br /&gt;
&lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send Ok&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            &lt;br /&gt;
        End_Object &lt;br /&gt;
&lt;br /&gt;
    End_Object &lt;br /&gt;
&lt;br /&gt;
    Procedure OnSubmit&lt;br /&gt;
        Send Ok&lt;br /&gt;
    End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    Procedure PopupTheDialog  Handle hReturnObj Integer iCaller&lt;br /&gt;
        Send Popup hReturnObj&lt;br /&gt;
        &lt;br /&gt;
        WebSet psValue of oProcess to (GetCurrentProcessId())&lt;br /&gt;
        WebSet psValue of oCaller  to iCaller&lt;br /&gt;
        WebSet psValue of oGlobal  to giRandom&lt;br /&gt;
        WebSet psValue of oRegProp to (piRandom(Self))&lt;br /&gt;
    End_Procedure&lt;br /&gt;
&lt;br /&gt;
    Function DialogResult Returns String&lt;br /&gt;
        String sResult&lt;br /&gt;
        &lt;br /&gt;
        WebGet psValue of oProcess to sResult&lt;br /&gt;
        Function_Return sResult&lt;br /&gt;
    End_Function&lt;br /&gt;
&lt;br /&gt;
End_Object&lt;br /&gt;
&lt;br /&gt;
//==============================================================================&lt;br /&gt;
// This is the actual view&lt;br /&gt;
//==============================================================================&lt;br /&gt;
Object oProcPoolDemo is a cWebView    &lt;br /&gt;
    Set piWidth to 700&lt;br /&gt;
    Set psCaption to &amp;quot;Process Pooling Effects Demo&amp;quot;&lt;br /&gt;
    Set pbServerOnShow to True&lt;br /&gt;
    &lt;br /&gt;
    { WebProperty=Client }&lt;br /&gt;
    Property Integer[] paiWebAppProcs&lt;br /&gt;
 &lt;br /&gt;
    // Display this view at start up:&lt;br /&gt;
    Delegate Set phoDefaultView to Self&lt;br /&gt;
    &lt;br /&gt;
    // Work out the web application name from the WebServiceDispatcher.wo&lt;br /&gt;
    // file in AppHTML, which we treat like a .ini file&lt;br /&gt;
    Function WebAppName Returns String&lt;br /&gt;
        Handle hoIni&lt;br /&gt;
        String sName&lt;br /&gt;
        &lt;br /&gt;
        Get Create (RefClass(cIniFile)) to hoIni&lt;br /&gt;
        Set psFileName of hoIni to ;&lt;br /&gt;
            (psAppHtmlPath(phoWorkspace(ghoApplication)) + ;&lt;br /&gt;
            &amp;quot;\WebServiceDispatcher.wso&amp;quot;)&lt;br /&gt;
        Get ReadString of hoIni &amp;quot;WebService&amp;quot; &amp;quot;Application&amp;quot; &amp;quot;&amp;quot; to sName&lt;br /&gt;
        Send Destroy of hoIni&lt;br /&gt;
        Function_Return sName&lt;br /&gt;
    End_Function&lt;br /&gt;
    &lt;br /&gt;
    // Will be set to return value of above function at start-up.&lt;br /&gt;
    // This is a regular property because the web app name can&#039;t&lt;br /&gt;
    // change while the program is running.&lt;br /&gt;
    Property String psWebAppName (WebAppName(Self))&lt;br /&gt;
    &lt;br /&gt;
    // This uses three external functions to find all the processes in the&lt;br /&gt;
    // current WebApp&#039;s process pool - it will get updated on every refresh&lt;br /&gt;
    // so if you change the number of processes in the pool while the WebApp is&lt;br /&gt;
    // running you will see it in the view.&lt;br /&gt;
    //&lt;br /&gt;
    // It first uses EnumProcesses to find all the running processes on the&lt;br /&gt;
    // machine.&lt;br /&gt;
    //&lt;br /&gt;
    // It then iterates through that list and tries OpenProcess to get a handle&lt;br /&gt;
    // to it (for some permissions will not allow that, so those are skipped).&lt;br /&gt;
    //&lt;br /&gt;
    // Finally it calls ProcessImageFileName to see if that is one of the&lt;br /&gt;
    // processes running for THIS WebApp. However ProcessImageFileName&lt;br /&gt;
    // returns a file-path starting with the disk identifer in a slightly odd&lt;br /&gt;
    // form, i.e. &amp;quot;\DEVICE\HARDDISKVOLUMEn&amp;quot; (n is &amp;quot;1&amp;quot; for my C: drive) and even &lt;br /&gt;
    // spookier things for mapped drives, so we strip off the &amp;quot;C:\&amp;quot;, or whatever,&lt;br /&gt;
    // from the application file name DataFlex returns and uppercase both, then &lt;br /&gt;
    // compare THAT to the same length of the right-portion of the image name.&lt;br /&gt;
    // This may screw up if you have more than one identically pathed web-apps&lt;br /&gt;
    // on different drives - just so you know. &amp;lt;g&amp;gt;&lt;br /&gt;
    //&lt;br /&gt;
    // Note: that although the docs (and the declarations) use DWords,&lt;br /&gt;
    //       on Vincent&#039;s advice we are using UIntegers in our code (the same&lt;br /&gt;
    //       thing in reality) because you can use SizeOfType(UInteger) in the&lt;br /&gt;
    //       Watches window when debugging, which you can&#039;t for DWord.&lt;br /&gt;
    Procedure FindWebAppProcs&lt;br /&gt;
        Integer[]  aiWebAppProcs &lt;br /&gt;
        UInteger[] auiProcs&lt;br /&gt;
        UInteger   uiCb uiNeeded uiSize uiErr&lt;br /&gt;
        Integer    iOK i iLast iPos iSize iPathLen&lt;br /&gt;
        Handle     hProc&lt;br /&gt;
        UChar[]    ucaFile&lt;br /&gt;
        String     sPath sImage&lt;br /&gt;
        &lt;br /&gt;
        Move (Uppercase(GetApplicationFileName(ghoApplication)))    to sPath&lt;br /&gt;
        // Strip off drive designation:&lt;br /&gt;
        Move (Pos(&amp;quot;\&amp;quot;, sPath))                                      to iPos&lt;br /&gt;
        Move (Right(sPath, (Length(sPath) - iPos)))                 to sPath&lt;br /&gt;
        Move (Length(sPath))                                        to iPathLen&lt;br /&gt;
        Move 4096                                                   to iSize&lt;br /&gt;
&lt;br /&gt;
        Move (ResizeArray(auiProcs, iSize))                         to auiProcs&lt;br /&gt;
        Move (iSize * SizeOfType(UInteger))                         to uiCb&lt;br /&gt;
        Move 0                                                      to uiNeeded&lt;br /&gt;
&lt;br /&gt;
        Move (EnumProcesses(AddressOf(auiProcs), ;&lt;br /&gt;
                            uiCb, ;&lt;br /&gt;
                            AddressOf(uiNeeded)))                   to iOK&lt;br /&gt;
        &lt;br /&gt;
        // Just for debugging:&lt;br /&gt;
        If not iOK ;&lt;br /&gt;
            Move (GetLastError())                                   to uiErr&lt;br /&gt;
        &lt;br /&gt;
        Move (uiNeeded / SizeOfType(UInteger))                      to iSize&lt;br /&gt;
        Move (ResizeArray(auiProcs, iSize))                         to auiProcs&lt;br /&gt;
        Decrement iSize&lt;br /&gt;
        &lt;br /&gt;
        For i from 0 to iSize&lt;br /&gt;
            Move (OpenProcess(PROCESS_VM_READ + PROCESS_QUERY_INFORMATION, ;&lt;br /&gt;
                                                    True, auiProcs[i])) to hProc&lt;br /&gt;
            &lt;br /&gt;
            If (hProc &amp;lt;&amp;gt; 0) Begin  // We DID get a handle to the process&lt;br /&gt;
                Move (ResizeArray(ucaFile, 0))                          to ucaFile&lt;br /&gt;
                Move (ResizeArray(ucaFile, 2048))                       to ucaFile&lt;br /&gt;
                Move (ProcessImageFileName(hProc, ;&lt;br /&gt;
                      AddressOf(ucaFile), 2048))                        to uiSize&lt;br /&gt;
                Move (ResizeArray(ucaFile, uiSize))                     to ucaFile&lt;br /&gt;
                Move (Uppercase(UCharArrayToString(ucaFile)))           to sImage&lt;br /&gt;
                Move (Right(sImage, iPathLen))                          to sImage&lt;br /&gt;
                &lt;br /&gt;
                If (sImage = sPath) ;&lt;br /&gt;
                    Move auiProcs[i] to aiWebAppProcs[SizeOfArray(aiWebAppProcs)]    &lt;br /&gt;
            End&lt;br /&gt;
            &lt;br /&gt;
        Loop&lt;br /&gt;
        &lt;br /&gt;
        WebSet paiWebAppProcs to aiWebAppProcs&lt;br /&gt;
    End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    Procedure OnShow&lt;br /&gt;
        Send UpdateProcInfo&lt;br /&gt;
    End_Procedure&lt;br /&gt;
    &lt;br /&gt;
    // Registry object for getting the WebApp info from the registry:&lt;br /&gt;
    Object oReg is a cRegistry&lt;br /&gt;
        Set phRootKey to HKEY_LOCAL_MACHINE&lt;br /&gt;
        Set pfAccessRights to Key_Read&lt;br /&gt;
        &lt;br /&gt;
        Function BaseKey Returns String&lt;br /&gt;
            String[] asParts&lt;br /&gt;
            &lt;br /&gt;
            Move &amp;quot;SOFTWARE&amp;quot;                 to asParts[0]&lt;br /&gt;
            Move &amp;quot;Data Access Worldwide&amp;quot;    to asParts[1]&lt;br /&gt;
            Move &amp;quot;DataFlex&amp;quot;                 to asParts[2]&lt;br /&gt;
            Move C_DFVersion                to asParts[3]&lt;br /&gt;
            Move &amp;quot;WebApp Server&amp;quot;            to asParts[4]&lt;br /&gt;
            Move &amp;quot;Web Applications&amp;quot;         to asParts[5]&lt;br /&gt;
            &lt;br /&gt;
            // If it is a 64-bit machine:&lt;br /&gt;
            If (KeyExists(Self, &amp;quot;SOFTWARE\Wow6432Node&amp;quot;)) ;&lt;br /&gt;
                Move (InsertInArray(asParts, 1, &amp;quot;Wow6432Node&amp;quot;)) to asParts&lt;br /&gt;
            &lt;br /&gt;
            Function_Return (StrJoinFromArray(asParts, &amp;quot;\&amp;quot;))&lt;br /&gt;
        End_Function&lt;br /&gt;
        &lt;br /&gt;
        Function DWKeyValue String sApp String sVal Returns Integer&lt;br /&gt;
            Boolean bOK&lt;br /&gt;
            Integer iVal&lt;br /&gt;
            String  sKey&lt;br /&gt;
            &lt;br /&gt;
            Move (BaseKey(Self) + &amp;quot;\&amp;quot; + sApp)   to sKey&lt;br /&gt;
            Get KeyExists sKey                  to bOK&lt;br /&gt;
    &lt;br /&gt;
            If not bOK ;&lt;br /&gt;
                Function_Return 0&lt;br /&gt;
            &lt;br /&gt;
            Get OpenKey sKey to bOK&lt;br /&gt;
            &lt;br /&gt;
            If not bOK ;&lt;br /&gt;
                Function_Return 0&lt;br /&gt;
                &lt;br /&gt;
            Move (ReadDWord(Self, sVal)) to iVal&lt;br /&gt;
            Send CloseKey&lt;br /&gt;
            &lt;br /&gt;
            Function_Return iVal&lt;br /&gt;
        End_Function&lt;br /&gt;
        &lt;br /&gt;
    End_Object&lt;br /&gt;
    &lt;br /&gt;
    // Refresh all the displayed information&lt;br /&gt;
    Procedure UpdateProcInfo&lt;br /&gt;
        String  sApp&lt;br /&gt;
        Integer iMin iMax&lt;br /&gt;
        &lt;br /&gt;
        Get psWebAppName                to sApp&lt;br /&gt;
        WebSet psValue of oMinProc      to (DWKeyValue(oReg(Self), sApp, &amp;quot;MinPool&amp;quot;))&lt;br /&gt;
        WebSet psValue of oMaxProc      to (DWKeyValue(oReg(Self), sApp, &amp;quot;MaxPool&amp;quot;))&lt;br /&gt;
        WebSet psValue of oCurrProcs    to &amp;quot;Unknown&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        WebSet psValue of oCurrProcess  to (GetCurrentProcessId())&lt;br /&gt;
        WebSet psValue of oGlobalVal    to giRandom&lt;br /&gt;
        WebSet psValue of oRegProp      to (piRandom(Self))&lt;br /&gt;
        WebSet psValue of oDBRec        to FlexErrs.Recnum&lt;br /&gt;
        &lt;br /&gt;
        Send FindWebAppProcs&lt;br /&gt;
        Send GridRefresh of oProcList&lt;br /&gt;
        Send Focus of oCallServer&lt;br /&gt;
    End_Procedure&lt;br /&gt;
        &lt;br /&gt;
    Object oWebMainPanel is a cWebPanel&lt;br /&gt;
        Set piColumnCount to 8&lt;br /&gt;
        &lt;br /&gt;
        Object oExplanation is a cWebLabel&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set psCaption to ;&lt;br /&gt;
                (&#039;This view demonstrates the fact that in a Process&#039; + ;&lt;br /&gt;
                 &#039; Pooled WebApp (which all modern WebApps generally&#039; + ;&lt;br /&gt;
                 &#039; are) you CANNOT rely on the values in global variables,&#039; + ;&lt;br /&gt;
                 &#039; regular properties and database buffers. They change&#039; + ;&lt;br /&gt;
                 &#039; from one server round-trip to the next. ONLY web&#039; + ;&lt;br /&gt;
                 &#039; properties and Data Dictionary values can be relied on.&#039; + ;&lt;br /&gt;
                 &#039; If you run this under the debugger you will see that&#039; + ;&lt;br /&gt;
                 &#039; only a single process is &amp;quot;in the pool&amp;quot; and the values&#039; + ;&lt;br /&gt;
                 &#039; of the things below do not change, which is why you&#039; + ;&lt;br /&gt;
                 &#039; MUST test Web Apps OUTSIDE the debugger.&#039;)&lt;br /&gt;
        End_Object&lt;br /&gt;
                &lt;br /&gt;
        Object oProcPoolGrp is a cWebGroup&lt;br /&gt;
            Set piColumnCount to 8&lt;br /&gt;
            Set piColumnSpan to 0&lt;br /&gt;
            Set psCaption to &amp;quot;Process Pool Information:&amp;quot;&lt;br /&gt;
            &lt;br /&gt;
            Object oPoolInfo is a cWebGroup&lt;br /&gt;
                Set pbShowBorder to False&lt;br /&gt;
                Set pbShowCaption to False&lt;br /&gt;
                Set piColumnCount to 12&lt;br /&gt;
                Set piColumnSpan to 6&lt;br /&gt;
                &lt;br /&gt;
                Object oAppName is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 0&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Web Application:&amp;quot;&lt;br /&gt;
                    Set psValue to (psWebAppName(Self))&lt;br /&gt;
                End_Object&lt;br /&gt;
            &lt;br /&gt;
                Object oMinProc is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Minimum Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                &lt;br /&gt;
                Object oMaxProc is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Maximum Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                &lt;br /&gt;
                Object oCurrProcs is a cWebForm&lt;br /&gt;
                    Set piColumnSpan to 5&lt;br /&gt;
                    Set pbReadOnly to True&lt;br /&gt;
                    Set peLabelAlign to alignRight&lt;br /&gt;
                    Set psLabel to &amp;quot;Current Pool:&amp;quot;&lt;br /&gt;
                End_Object&lt;br /&gt;
                &lt;br /&gt;
            End_Object&lt;br /&gt;
            &lt;br /&gt;
            Object oProcList is a cWebList&lt;br /&gt;
                Set piColumnIndex to 6&lt;br /&gt;
                Set piColumnSpan to 2&lt;br /&gt;
                Set pbDataAware to False&lt;br /&gt;
                Set pbOfflineEditing to True  // DON&#039;T call the server on RowChange&lt;br /&gt;
                // Adjust this to see more/less process numbers without scrolling:&lt;br /&gt;
                Set piHeight to 200&lt;br /&gt;
&lt;br /&gt;
                Object oProcsCol is a cWebColumn&lt;br /&gt;
                    Set psCaption to &amp;quot;Pool Process IDs&amp;quot;&lt;br /&gt;
                    Set piWidth to 100&lt;br /&gt;
                End_Object&lt;br /&gt;
                &lt;br /&gt;
                Procedure OnManualLoadData tWebRow[] ByRef aTheRows String ByRef sCurrentRowID&lt;br /&gt;
                    Integer[] aiWebProcs&lt;br /&gt;
                    Integer i iLast iThis&lt;br /&gt;
                    &lt;br /&gt;
                    WebGet paiWebAppProcs of oProcPoolDemo  to aiWebProcs&lt;br /&gt;
                    Move (GetCurrentProcessId())            to iThis&lt;br /&gt;
                    &lt;br /&gt;
                    Move (SizeOfArray(aiWebProcs))          to iLast&lt;br /&gt;
                    WebSet psValue of oCurrProcs            to iLast&lt;br /&gt;
                    Decrement iLast&lt;br /&gt;
                    &lt;br /&gt;
                    For i from 0 to iLast&lt;br /&gt;
                        Move aiWebProcs[i] to aTheRows[i].sRowID&lt;br /&gt;
                        Move aiWebProcs[i] to aTheRows[i].aCells[0].sValue&lt;br /&gt;
                        &lt;br /&gt;
                        If (aiWebProcs[i] = iThis) Begin&lt;br /&gt;
                            Move aiWebProcs[i] to sCurrentRowID&lt;br /&gt;
                        End&lt;br /&gt;
                        &lt;br /&gt;
                    Loop&lt;br /&gt;
                    &lt;br /&gt;
                    Forward Send OnManualLoadData (&amp;amp;aTheRows) (&amp;amp;sCurrentRowID)&lt;br /&gt;
                End_Procedure&lt;br /&gt;
                &lt;br /&gt;
            End_Object&lt;br /&gt;
            &lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oCurrProcess is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Last invoked server process was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oGlobalVal is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Global variable giRandom in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
&lt;br /&gt;
        Object oRegProp is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Regular property piRandom in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
&lt;br /&gt;
        Object oDBRec is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set pbReadOnly to True&lt;br /&gt;
            Set psLabel to &amp;quot;Flexerrs recnum in that was:&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
&lt;br /&gt;
        Object oWebValue is a cWebForm&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
            Set psLabel to &amp;quot;Your entered value:&amp;quot;&lt;br /&gt;
            Set psValue to &amp;quot;Hello!&amp;quot;&lt;br /&gt;
            Set peLabelAlign to alignRight&lt;br /&gt;
            Set piLabelOffset to 250&lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oNote is a cWebLabel&lt;br /&gt;
            Set psCaption to &amp;quot;(This is a web property - psValue of oWebValue - so will not change unless YOU change it)&amp;quot;&lt;br /&gt;
            Set piColumnIndex to 4&lt;br /&gt;
            Set piColumnSpan to 4&lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oButtonSpacer is a cWebSpacer&lt;br /&gt;
            Set piHeight to 20&lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oCallServer is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 0&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Call Server&amp;quot;&lt;br /&gt;
            &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            &lt;br /&gt;
        End_Object&lt;br /&gt;
                    &lt;br /&gt;
        Object oInfo is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 2&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Info Box&amp;quot;&lt;br /&gt;
            &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Integer iProc&lt;br /&gt;
                &lt;br /&gt;
                Move (GetCurrentProcessId()) to iProc&lt;br /&gt;
                Send ShowInfoBox (&amp;quot;InfoBox in process&amp;quot; * String(iProc))&lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            &lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oYesNo is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 4&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Yes/No&amp;quot;&lt;br /&gt;
            &lt;br /&gt;
            // Web Property to hold state between browser/server round-trips&lt;br /&gt;
            { WebProperty=Client }&lt;br /&gt;
            Property stAllMyState ptState&lt;br /&gt;
            &lt;br /&gt;
            // Is called in response to user&#039;s second answer:&lt;br /&gt;
            Procedure ProcessSecondAnswer Integer eAnswer&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                String[]     asInfo&lt;br /&gt;
&lt;br /&gt;
                WebGet ptState                              to tState&lt;br /&gt;
                Move (GetCurrentProcessId())                to tState.iProc3&lt;br /&gt;
                Move (CurrentDateTime())                    to tState.tmAnswered2&lt;br /&gt;
                Move (If((eAnswer = cmYes), &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;))   to tState.SecondAnswer&lt;br /&gt;
                &lt;br /&gt;
                // Assemble results:&lt;br /&gt;
                Move (&amp;quot;You clicked the &#039;Yes/No&#039; button at&amp;quot; * String(tState.tmClicked) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc1)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                Move (&amp;quot;Your first answer was: &#039;&amp;quot; + ;&lt;br /&gt;
                    tState.sFirstAswer + &amp;quot;&#039; at&amp;quot; * String(tState.tmAnswered1) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc2)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                Move (&amp;quot;Your second answer was: &#039;&amp;quot; + ;&lt;br /&gt;
                    tState.SecondAnswer + &amp;quot;&#039; at&amp;quot; * String(tState.tmAnswered2) * ;&lt;br /&gt;
                    &amp;quot;in process&amp;quot; * String(tState.iProc3)) ;&lt;br /&gt;
                                                    to asInfo[SizeOfArray(asInfo)]&lt;br /&gt;
                &lt;br /&gt;
                Send ShowInfoBox (StrJoinFromArray(asInfo, C_CRLF)) &amp;quot;Results&amp;quot;&lt;br /&gt;
                &lt;br /&gt;
                Send UpdateProcInfo&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            WebPublishProcedure ProcessSecondAnswer  // Publish the proc to receive control after second answer&lt;br /&gt;
            &lt;br /&gt;
            // Is called in response to user&#039;s first answer:&lt;br /&gt;
            Procedure ProcessFirstAnswer  Integer eAnswer&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                &lt;br /&gt;
                WebGet ptState to tState&lt;br /&gt;
                &lt;br /&gt;
                Move (GetCurrentProcessId())                to tState.iProc2&lt;br /&gt;
                Move (CurrentDateTime())                    to tState.tmAnswered1&lt;br /&gt;
                Move (If((eAnswer = cmYes), &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;))   to tState.sFirstAswer&lt;br /&gt;
                WebSet ptState                              to tState&lt;br /&gt;
                &lt;br /&gt;
                Send ShowYesNo Self (RefProc(ProcessSecondAnswer)) ;&lt;br /&gt;
                    (&amp;quot;Do you REALLY want to do this? (Proc:&amp;quot; * String(tState.iProc2) + &amp;quot;)&amp;quot;) ;&lt;br /&gt;
                    &amp;quot;Second question&amp;quot;&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            WebPublishProcedure ProcessFirstAnswer  // Publish the proc to receive control after first answer&lt;br /&gt;
            &lt;br /&gt;
            // Triggers the question cascade:&lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                stAllMyState tState&lt;br /&gt;
                &lt;br /&gt;
                Move (CurrentDateTime())        to tState.tmClicked&lt;br /&gt;
                Move (GetCurrentProcessId())    to tState.iProc1&lt;br /&gt;
                WebSet ptState                  to tState&lt;br /&gt;
                &lt;br /&gt;
                Send ShowYesNo Self (RefProc(ProcessFirstAnswer)) ;&lt;br /&gt;
                    (&amp;quot;Do you want to do this? (Proc:&amp;quot; * String(tState.iProc1) + &amp;quot;)&amp;quot;) ;&lt;br /&gt;
                    &amp;quot;First question&amp;quot;&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            &lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
        Object oDialog is a cWebButton&lt;br /&gt;
            Set piColumnIndex to 6&lt;br /&gt;
            Set piColumnSpan to 2&lt;br /&gt;
            Set psCaption to &amp;quot;Popup Dialog&amp;quot;&lt;br /&gt;
            &lt;br /&gt;
            Procedure OnCloseModalDialog Handle hoModalDialog&lt;br /&gt;
                Integer iProc1 iProc2&lt;br /&gt;
                &lt;br /&gt;
                If (hoModalDialog = oTestDialog) Begin&lt;br /&gt;
                    Get DialogResult of oTestDialog to iProc1&lt;br /&gt;
                    Move (GetCurrentProcessId())    to iProc2&lt;br /&gt;
                    Send ShowInfoBox ;&lt;br /&gt;
                        (&amp;quot;Dialog in process&amp;quot; * String(iProc1) + C_CRLF + ;&lt;br /&gt;
                         &amp;quot;Returned to process&amp;quot; * String(iProc2)) &amp;quot;Result&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                    Send UpdateProcInfo&lt;br /&gt;
                End&lt;br /&gt;
                &lt;br /&gt;
            End_Procedure&lt;br /&gt;
            &lt;br /&gt;
            Procedure OnClick&lt;br /&gt;
                Send PopupTheDialog of oTestDialog Self (GetCurrentProcessId())&lt;br /&gt;
            End_Procedure&lt;br /&gt;
            &lt;br /&gt;
        End_Object&lt;br /&gt;
        &lt;br /&gt;
    End_Object &lt;br /&gt;
&lt;br /&gt;
End_Object&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Web Applications]]&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
	<entry>
		<id>https://dataflex.wiki/index.php?title=File:ProcPoolDemo.zip&amp;diff=3315</id>
		<title>File:ProcPoolDemo.zip</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=File:ProcPoolDemo.zip&amp;diff=3315"/>
		<updated>2020-06-11T09:38:01Z</updated>

		<summary type="html">&lt;p&gt;Mikepeat: Mikepeat uploaded a new version of File:ProcPoolDemo.zip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mikepeat</name></author>
	</entry>
</feed>