http://www.udev.info
Mail/Login: Password : forgot my password!
[UPDATE MODE]
Back

Converting keywords in Uniface proc instructions to new syntax

Direct link http://www.udev.info/uniface/converting-keywords-in-uniface-proc-instructions-to-new-syntax
Written by echwic // Tags: uniface python conversion

Background

Since the Uniface version 9 proc instructions using old syntax are supported but no longer promoted. The Proc compiler issues an information message including the word deprecated when it encounters Proc of this type. This behaviour can not be supressed by a compiler option.

If a Uniface project has no possibility to suspend development activities for a longer period of time, then the migration strategy to give the task of converting source code to Compuware is prevented: it is too much time consuming. This was the reason for developing an appropriate python script.

Reliability of the script

For some large projects I performed the converting of all source code. For one XML export of nearly 1 GigaByte of source code I obtained about 40000 replacements.
In the comment part of the script head You can see the history of versions and special concidered cases.

Using the script


Python download
At first You must download Python 3.2 from http://www.python.org/download/ accordingly to Your platform. For Windows I used myself the file python-3.1.2.msi.

Invoking the script
The command syntax is ...\python.exe <name of script> <paramaters for the script>.

Calling without parameters:
...\python.exe neue_Syntax_uniface_9.3.py
The script asks for the Uniface 9.x export file in XML format as input.
All results will be written in the directory of the input file.

Calling the script in a batch file by way of an MS windows example:
cmd / batch file SOURCE CODE
Sorry- ... please log-in or register to get this!


Table of deprecated proc instructions

Since this is a historical grown document, some of the documentation in here is in german.
Sorry- ... please log-in or register to get this!

Contents of script

Actual version of script is 16 from 20.04.2011. The script can also be downloaded from the URL http://www.udev.info/stuff/converter/neue_Syntax_uniface_9.3.py (version 16)
Python script SOURCE CODE
Sorry- ... please log-in or register to get this!

Comments

on 2012-02-22 14:17:33 echwic wrote:

Answer to question of espaltman, 2011-11-16 In the year 2011 we used this python script in 2 large Uniface projects on base of Python 3.2.1: Project EWO: XML file about 350 MByte Lines in input file : 8204379 Replacements : 5023 Project OKF: XML file about 640 MByte Lines in input file : 15722351 Replacements : 29321 Thus the reason for unsuccessful conversion may be the used python version or the lack of resources like memory on the computer. Regards Ewald Wichmann, AKDB

on 2011-11-18 13:11:01 Robert wrote:

The following link is broken (should that be Version 16?). http://www.udev.info/stuff/converter/neue_Syntax_uniface_9 3.py (version 15)

on 2011-11-16 13:59:11 espaltman wrote:

Hi There, Nice tools for files < 50 Mb! The conversion is stopped after converting a little less than 60 Mb of 80Mb. I can reproduce it very easily. Is there something that can prevent this behaviour from occurring? Kind regards, Erik Spaltman

1575 view(s) / 2011-03-22 08:07:13 / LAST UPDATED: 2012-02-22 15:14:32