home *** CD-ROM | disk | FTP | other *** search
/ ftp.robelle3000.ai 2014 / 2014.06.ftp.robelle3000.ai.tar / ftp.robelle3000.ai / faq / s1.txt < prev    next >
Text File  |  1995-10-10  |  1KB  |  34 lines

  1. Converting Data Types.
  2.  
  3. In Suprtool 3.7, the If command allowed comparisons between fields of
  4. different data types. We've taken this feature one step further in our current
  5. pre-release by allowing the Extract command to convert numeric data between
  6. different data types. This has been a long-standing request from users who
  7. need to move data to different environments.
  8.  
  9. The general syntax is:
  10.  
  11.      >extract field-name = expression
  12.  
  13. The "field-name" can be any field from a dataset, a self-describing file, or a
  14. Define command. An "expression" is any numeric value, or field name, or an
  15. arithmetic combination of the two. For example,
  16.  
  17.      >define double-field,1,4,double
  18.      >extract double-field = packed-field + 10
  19.  
  20. If you want to update a field with the value of another field in the same
  21. dataset, use the Update command before the Extract command.
  22.  
  23.      >update
  24.      >extract total-cost = unit-cost * sales-qty
  25.  
  26. This will also be very handy for Suprlink users when two files store the key
  27. field in different formats. For example, a Z6 display field to store
  28. Customer-Number in one file, and a J2 integer field to store Cust-No in
  29. another file.
  30.  
  31. This feature will be part of Suprtool 3.8 which is expected around April of
  32. next year. If you would like to try a pre-release version, feel free to give
  33. us a call.
  34.