What is CONVERT.APP

We just finished converting some serious applications by stripping all the code snippets into .PRG files. To help us with the job, we developed a conversion system that did a lot of the work for us.  If we had had 20/20 foresight, we would never had put code in the snippets in the first place,but we did.  We suspect there are a lot of others that are in the same boat.

The task was still time consuming, but thanks to CONVERT.APP we did NOT THROW BUGS into our applications.

This procedure explains what we did to do the conversion.  Since you are reading this, I assume you have a similiar need.  We are sharing our system for $80.00 a copy.  This includes the source code for the conversion modules and an unrestricted copy of our GLSEARCH.APP.  (GLSEARCH.APP is available separately for $25.  Search the library with the key word SEARCH for a demo copy)

HISTORY
      We currently support eight different  POS (Point of Sale)systems.  
Each system  has system specific as well as common screens (.SCX files). 
This resulted in close to 200 screens containing a multitude of code snippets.  The DOS
screen builder entertained us with a thermometer each time the
code was changed.

     Along comes Foxpro for windows and the mac.  Now we were
getting entertained by the screen builder and the transporter.
Not only were we being entertained, we had the duplicity of
changing a snippet in DOS and then changing it in windows.  Time
consuming and a documentation nightmare.

DECISION
     We finally decided to bite the bullet and strip all the code
snippets into a .PRG file and convert all our screens variables to 
expressions.

RESULT
     Our productivity has greatly improved.  We can actually say
we enjoy maintaining our DOS and WINDOWS cross platform
applications. 

PROCEDURE
     This is how we did it.

First we reviewed each screen variable names.  If a variable had
a when or a valid clause, we were going to convert it to an
expression using a W_ or a V_ prefix.

For example
     The WHEN code snippet for the variable CUST_NO was going to
be put in the PRG file as
  PROCEDURE w_cust_no

   << when code snippet >>

     and the VALID code snippet was going to be put in the PRG
file as
  PROCEDURE v_cust_no

   << valid code snippet >>

     The CUST_NO procedures were to be stripped and the SCX file
would now contain only the expressions w_cust_no() and
v_cust_no().

The only problem with this is that if a variable name had over 8
characters, there was a possibility that there would be a crash
between 2 or more variables.

IE.. What do you do with
     CUSTOMER.ADDRESS_1
        Converts to w_address_1 and v_address_1
     CUSTOMER.ADDRESS_2
        Converts to w_address_2 and v_address_2

If you look at only the first 10 characters (like FOX does) you
see only w_address_ and v_address_


The read level snippets (When,Activate,Deactivate,Show, etc.) use  a similar naming convention using the screen name.
     RW_<<screen name>>  for the Read When clause
     R A_<<screen name>>  for the Read Activate clause
     etc.
 
OK!!  TEST THE LENGTH OF EACH VARIABLE IN 200 SCREENS

Next, if we elect to leave the long variable name alone will
there be a duplicate like the w_address_1 and 2 example above?

OK!! CHECK FOR DUPLICATES


Next, we want a map of the conversions that need to be made. What
platforms? What variable names? What snippets need to be
converted?

OK!! BUILD A MAP 

Finally, we wanted to do the actual conversion.

OK!! CONVERT A SCREEN

We created a <<Screen name>>.CPR file with the documentation that
was found in the setup snippet 

This was followed by a call to the screen.

DO <<Screen name>>.SPR

Then the clean up / proc snippets

Then the snippets from the screen variables.

A lot of our screens had already been transported.  Some had been transported and the snippets 
had been changed in one or more platforms.

Two steps remained.

First we had a few generator directives in our set up snippets.  These had to be
manually reviewed and allowed for.

Second the calls to the .SPR file had to be changed to call the new .PRG file.  
This was typically found in the menus, but there were a surprising number of 
calls in other screens and snippets.


If you have question please contact
     Merrill Dubach
     GM Computer Service
     417 742 - 3533
     
     C/S 70322,2654
     
     P.O. Box 418
     Willard, MO  65781  (Near Springfield and Branson, Missouri)
     
We accept VISA.