Sunday, October 29, 2006

Leukerbad for the weekend

We just spent the weekend in the spa town of Leukerbad. It was a totally relaxing time and very easy by train/bus from Geneva. Here are the photos from our walk around the lake up at Gemmi.

Wednesday, October 25, 2006

Making the AIX shell more friendly

To make the standard korn shell more friendly, you can edit your .profile with the following settings:

set -o emacs

stty erase ^?

alias __A='^P"
alias __B='^N"
alias __C='^F"
alias __D='^B"

Note, to get control in vi ctrl-v (keep this down when typing the next character).

This will now give you the use of the up and down arror keys as well as the backspace key for editing commands. This much easier than using ctrl-h and all the standard keystrokes.

Tuesday, October 24, 2006

Changing a database replica id on AIX

There has been a utility floating around to change a Lotus Notes database's replica id for some time. I recently migrated a company to AIX 5.3 from another platform to run Domino 7.0.2. Here is a simple HOWTO get up and running to compile with the Notes API on AIX 5.3.

Upload the NotesApi tool kit from the Lotus Developer Domain (under toolkits).

Uncompress and extract the tar file to /yourmount/notesapi

Make sure the notes user owns these files and any links
chown –r notes:notes /yourmount/notesapi

Create a link under /opt/ibm/lotus

cd /opt/ibm/lotus
ln -s /yourmount/notesapi notesapi
chown notes:notes notesapi

Change to the notes user with their profile
su - notes

Create a script to set all the environment variables

server:/home/notes$ cat setenv

LOTUS=/opt/ibm/lotus; export LOTUS
NOTES_DATA_DIR=/yourmount/domino/data; export NOTES_DATA_DIR
Notes_ExecDirectory=$LOTUS/notes/latest/ibmpow; export Notes_ExecDirectory
PATH=$PATH:$NOTES_DATA_DIR:$Notes_ExecDirectory; export PATH

Source the file before running any compilations

server:/home/notes$ . setenv

compile the intro sample as a test
cd /yourmount/notesapi/sample/basic/intro
make -f aix.mak

You can now compile any notesapi program.

The chrepid.c example is available for download here:
chrepid make
chrepid compiled program