Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 29 APR 1998 12:32:43PM Jason Schaefer wrote:

The conversion manual for AREV to OI, states that there is a program in the SYSOBJ table, in AREV, that converts dots to underscores. The program is Update Application. How can I find this program/application so that I can migrate my AREV tables to OI ?


At 29 APR 1998 01:05PM Jeff Blinn wrote:

The conversion manual for AREV to OI, states that there is a program in the SYSOBJ table, in AREV, that converts dots to underscores. The program is Update Application. How can I find this program/application so that I can migrate my AREV tables to OI ?

You need to log into ARev as the 'INSTALL' user, and choose upgrade application, user tables, etc. - you'll see instruction screens at that point. If I remember correctly, you may need to attach the volumes/tables that you want to update. The utility will change the file and field names - converting '.' to '_'


At 29 APR 1998 03:03PM Kurt Baker wrote:

Jason,

Here is a program that converts dots to underscores as well as doing some other clean up - this program is written for AR3.x - if you are in 2.x or below I have a slightly different program - email me at [email protected] - if you have any ???s -

Note: I pasted the program in the html document - hopefully it will wrap accordingly. If this ends up all mangled - If you leave me your email address I will email it to you.

Kurt

Declare Subroutine Msg, FSMSG, Unassigned

* This routine will assist in migrating Advanced Revelation files and

* dictionaries so they can be used with OpenInsight. Specifically, this

* program will:

*

* a) Rename the file by converting any periods (".") with an underscore

* b) Rename all dictionary fields by converting periods to underscores

* c) Take off all indexes on the file and creates a record (indexes)

* that lists the indexes that were on the file; so they can be reapplied

* within OpenInsight

* d) Adds data typing to each dictionary field

* e) Cleans out any dictionary field that may have information from older

* versions of Advanced Revelation and/or RevG.

*

* Just as significant is what this program does not do. This program does

* not adjust the formulas of symbolic fields. It does not attempt to

* adjust the formulas, because a period character may have multiple meanings

* For example, if the formula is @ANS={QTY} * {UNIT.PRICE} - it is

* obvious that {UNIT.PRICE} should be converted to {UNIT_PRICE}. However,

* if the formula was @ANS={UNIT_PRICE} * .08 - it is obvious that the

* period is a decimal and should remain.

*

* When dealing with the formulas of calculated fields, we recommend that

* you examine each formula to determine the appropriate action. There

* are tools you can use to identify these calculated fields. If you issue

* the command:

*

* SELECT DICT.YOUR_FILE WITH FORMULA CONTAINING '.' then

* DICT YOUR_FILE

*

* The system will provide you a browse list of all symbolic fields that

* have periods in them, you can then modify the formula in the DICT window.

* This technique will save you time in examining your fomulas.

*

* Please run this program only on a backup version of your file until

* you become familiar with the effects this program will have upon your

* files. The most important effect can be on your *existing* Arev

* application. Remember, this routine will change the file and field names,

* therefore, these changes will effect your existing Arev system. (e.g. if

* you have a file that is called MY.FILE and now it is called MY_FILE, your

* Arev application will still look for MY.FILE, and you will get a file not

* found error). You should only run this routine on files that will

* be used only by OpenInsight, or if you plan on making the appropriate

* changes to your Arev application.

*

* Please be aware that this program assumes you are running in Advanced

* Revelation 2.12 or below. If you are running a previous version of

* Advanced Revelation, please run the program 'CONVERT_FROM_3PLUS'

*

* Revelation has provided the source code to this routine to allow you

* to customize the behavior of this program. The most common behavior

* you may want to change is the character that the program will use to

* replace the period ("."). This program converts periods to underscores

* ("_"). To change the character modify the following line:

TransChar=_'

*

$Insert include,logical

$Insert include,dict.equates

Equ No$ To 0

Equ Yes$ To 1

Equ Null$ To Equ Token_All$ To 'ALL' Equ Token_Xref$ To '.XREF' Indexes=' Msg("Please enter the file name to convert",'RIC',FILE,)

* Make sure the file is available

Open FILE to FileVar Else

 FSMSG()
 Stop

End

Convertedfile=FILE

* Only perform a rename of the file, if necessary.

if index(FILE,'.',1) then

 convert '.' to transChar in convertedfile
 sentence=renamefile ':FILE:' ':convertedfile
 perform sentence

end

* Take off all indexing; store index definitions in the variable indexes

open '!':convertedfile to indexvar then

  read indexes from indexvar,'*indexes' else null

end

WORK:

* Let's start working on the dictionary

DictFileName=DICT.':ConvertedFile

Open DictFileName To DictHandle Else

 FSMSG()
 Stop

End

* The dictionary is open, lets analyze each field

Done=No$

List=Null$

Select DictHandle

Loop

Readnext Key Else
  Done=Yes$
End
Until Done
NewKey=Key
If Key 1, 1  # '%' And Key 1, 1  # '@' Then
   Read Record From DictHandle, Key Then
      Remove=No$
  • First check to see if the field has any indexes
      Begin Case
        Case Record
          List=Key
          Remove=Yes$
        Case Record
          Remove=Yes$
        Case Record
          Remove=Yes$
      End Case
  • If an index was on null out the index information, SI.MFS will
  • take care of the !FILE.
      If Remove Then
         Msg( 'B119', Null$, Image, Key )
         Record=Null$
         Record=Null$
         Record=Null$
         Record=Null$
         Record=Null$
      End
  • This section adds data types.
      Validation=Record
      Begin Case
        Case index(Record,'$',1)
          Datatype=DOLLARS"
        Case Validation=(D)'
          Datatype=DATE"
        Case Validation=(MT)'
          Datatype=TIME"
        Case Validation=(B)'
          Datatype=BOOLEAN"
        Case Validation1,3=(MD'
          Datatype=INTEGER"
        Case Validation=(DT)'
          Datatype=TIMEDATE"
        Case 1
          Length=Record
          If Length then
             Datatype=VARCHAR(":Length:")"
          End Else
             Datatype=VARCHAR(10)"
          End
      End Case
      Record=Datatype
      Record=Datatype
  • This section checks multivalue definitions, if it used the old
  • format (e.g. M1.1) it will convert it to the proper 'M'
      Record=record1,1
  • This section clears out older dictionary information
      For I=31 to 54
        Record[i]='
      Next I
      Convert '.' to Transchar in NewKey
      Write Record To DictHandle, NewKey Then
        If Key NE Newkey Then
          Delete DictHandle, Key Else Null
        End
        Msg( Null$, 'DB', Image, Null$ )
      End
   End
End

Repeat

ClearSelect

*

* Delete ".Xref" fields.

*

Pos=1

Loop

Key=List

While Len( Key )

Key := Token_Xref$
  Delete DictHandle, Key Else
    Null
  End
  Pos += 1

Repeat

* Control Records - DICT.MFS will rebuild %fields and %protect.spec% * The indexes is a record created by this routine that documents the * indexes that were on this file. If Indexes then Write indexes to DictHandle,'indexes%%' else null

End

Delete DictHandle,'%FIELDS%' Else Null

Delete DictHandle,'%PROTECT.SPEC%' Else Null

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/87cfbd60aafb695f852565f5005ae2ce.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1