Jump to content

Click the link below to see the new game I'm developing!

Wim Soutendijk

Member Since 03 Feb 2000
Offline Last Active Mar 31 2021 06:48 AM

Topics I've Started

Permanent programmer position available

16 March 2010 - 09:02 AM

Airtrade is a market leader in the Netherlands selling tourist plane tickets.
At the head office in Haarlem, in the brand shops of Vliegwinkel, the Contact Centers for Vliegwinkel.nl, BudgetAir.nl, Airfair.nl and Flugladen.de, and at the Fulfillment Center are 190 employees at work.
It's back office system is written in PRO-IV (Version 6.2, Windows 2008, sql server 2008) is currently maintained by a group of 3 developers/analysts.
Airtrade is looking for an analyst/programmer to help us expanding the back office system to the needs of a fast growing company.
This is a permanent position, we are not looking for contractors.
Because of the complexity of the system you have to work in Haarlem to learn the system.
As the back office system is mainly a financial system, we need a programmer with a good financial background.

If you are interested and willing to work in Haarlem, the Netherlands, send your resume to wsoutendijk@airtrade.nl

Wim Soutendijk
Teamleader back office development

Random number generator

30 April 2006 - 10:09 AM

In trying to build a random number generator in pro-iv I found the following C code on the web:
#include <stdio.h>
#define A1	7141
#define C1	54773
#define M1	259200
#define RM1	(1.0 / M1)
#define A2	8121
#define C2	28411
#define M2	134456
#define RM2	(1.0 / M2)
#define A3	4561
#define C3	51349
#define M3	243000
#define MASK 131071

float uran3( int *x )
 * This routine generates uniformly distributed random numbers in the
 * range [0, 1) using the linear congruential method.
 * Actually, 3 separate generators are used, generating the upper and
 * lower halves of the output and controlling a shuffling routine.
 * Notes:  
 * 1. A negative seed value initializes the sequence.  The returned
 *    seed is 1.
 * 2. The values A,C, and M are taken from _Numerical Recipes in C_, 
 *    p.211 and are claimed to yield maximal length sequences of period
 *    M and to pass Knuth's spectral test for dimensions 2, 3, 4, 5 & 6.
{  static	long	ix1, ix2, ix3;
	static	float	r[98];
	static	int  iff = 0;
	float	temp;
	int  j;

/* init on first call or when *x is negative */
	if ( *x < 0  || iff == 0 ) {
  iff = 1;
  ix1 = (C1 - *x) % M1;
  ix1 = (A1 * ix1 + C1) % M1;
  ix2 = ix1 % M2;
  ix1 = (A1 * ix1 + C1) % M1;
  ix3 = ix1 % M3;
  for ( j = 1;  j < 97;  j++ ) {
 	 ix1 = (A1 * ix1 + C1) % M1;
 	 ix2 = (A2 * ix2 + C2) % M2;
 	 r[j] = (ix1 + ix2 * RM2) * RM1;
  *x = 1;
/* normal operation */
	ix1 = (A1 * ix1 + C1) % M1;
	ix2 = (A2 * ix2 + C2) % M2;
	ix3 = (A3 * ix3 + C3) % M3;
	j = 1 + ((97 * ix3) / M3);
	temp = r[j];
	r[j] = (ix1 + ix2 * RM2) * RM1;
	return( temp );

So I created the following global logic RANDOM (type Numeric)

DEFINE #r(98,10.20)
#A1 = 7141
#C1 = 54773
#M1 = 259200
#RM1 = (1 / #M1)
#A2 = 8121
#C2 = 28411
#M2 = 134456
#RM2 = (1 / #M2)
#A3 = 4561
#C3 = 51349
#M3 = 243000
#MASK = 131071
#iff = 0

IF ( #X < 0  OR  #iff = 0 ) THEN
  #iff = 1
  #ix1 = REM((#C1 - #X),#M1 )
  #ix1 = REM((#A1 * #ix1 + #C1),#M1)
  #ix2 = REM(#ix1,#M2)
  #ix1 = REM((#A1 * #ix1 + #C1),#M1)
  #ix3 = REM(#ix1,#M3)
  FOR #j = 1 TO 97
 	 #ix1 = REM((#A1 * #ix1 + #C1),#M1)
 	 #ix2 = REM((#A2 * #ix2 + #C2),#M2)
 	 #r(#j) = (#ix1 + #ix2 * #RM2) * #RM1
  #X = 1

#ix1 = REM((#A1 * #ix1 + #C1),#M1)
#ix2 = REM((#A2 * #ix2 + #C2),#M2)
#ix3 = REM((#A3 * #ix3 + #C3),#M3)
#j = 1 + ((97 * #ix3) / #M3)
#temp = #r(#j)
#r(#j) = (#ix1 + #ix2 * #RM2) * #RM1
RETURN(#temp )

But when I call the global, I allways get the same answer back.
My C knowledge is very limited.
Can anyone tell me how the global logic should be created?

Sudoko Game solver

02 February 2006 - 08:58 PM

After solving a couple of Sudoko puzzles, I decided I could use some help.
So I wrote a PRO-IV function to help me solve the puzzle.

Here in The Netherlands we have two types of Sudoko puzzles: the standard ones and the ones I call Extended Sudoko, they have four extra squares in which the same rules apply (all nine digits must appear in one block only once)

I wrote the function in VIP 5.5927, on a windows 5.5r5.1.8 kernel. If you load it in an older VIP version, the screen formats will not import correctly.

When you fill in the fields, illegal combinations are shown in red. For each field the program calculates the possible values you can select off. If there is only one value possible, that field turns green. The tool tips will always show the possible values. For some puzzles it takes me a while to figure out why there is only one possible value left. Sometimes that is more fun than having the puzzle solved.

There are a couple of buttons on the screen to provide the following features:
Clear the game,
Lock the fields that contain data, I use this after I loaded the initial puzzle. It prevents me retyping those fields my mistake.
Save and Restore the game. One game can have multiple versions: initial puzzle, half way version, and final solution
Undo: lets you go back one step (even the restoring an other version can be undone)
Hints on or off : shows the possible values you can use for each field.
Set game type to standard or extended
Fill in all the fields with only one possible value

I think the basic logic is there to help you solve the puzzle. If you want, you can let the Auto button fill in all the fields it calculated.

I am not happy with the user interface yet. It seems the buttons interact with the input fields, After using the save and restore buttons, I sometimes get an error ENTRY TOO LONG…RE-ENTER

I posted this function for a couple of reasons: to share it with others, to show that you can do more with PRO-IV than building legacy systems, and the most important reason: to improve the software.
I have never worked on an open source project before, but I would like to regard this as open source software. You may modify it, distribute it, as long as you provide full source code with it.
Be my guest to improve the user interface, add some graphics to it, or create a sudoko generator (maybe my next project?)
If you keep me posted of the changes you made, I can incorporate them in a new version, and release them from here. As I said, I have no experience on this so I will have to see how this works out.

Have fun

Wim Soutendijk

registry settings pro-iv client

14 September 2005 - 01:31 PM

The new pro-iv client now uses registry keys in stead of pro4.ini settings.
to enable A report file type we have to set the following key:

[HKEY_CURRENT_USER\Software\PROIV Technology, Inc.\PROIV Windows Client\Settings]

The problem we have is that our users (xp workstations) are not allowed to update the registry themselves. So the system administrator will have to do that for them, but if they log on as Administrator account and add these keys to the registry as CURRENT_USER, they will have no affect for the end-user.

Are there any more sites out there with restricted security settings?
How do you update the registry?

Memory files

02 December 2004 - 03:49 PM

We are considering to use memory files for a couple of workfiles to speed up a time consuming calculation
we use proiv 5.5 on a windows server connected to a separate MS SQL server, and all the workfiles are in SQL server as well.
there are aprox 150 pro-iv users on that box, and we have had memory problems in the past because of the SQL layer.
How many of you use memory files?
what is the best way to create them and to delete them after processing (clear flag?)

any suggestions are welcome

Wim Soutendijk

Click the link below to see the new game I'm developing!