Migrating Lawson 7.3.3 Environments off the Digital Tru64 system Scope of this document Below I intend to layout in the most straightforward method possible, the steps necessary to migrate a Lawson 7.3.3 Environment off a Digital Tru64 system, and install it elsewhere for upgrade. Digital Systems, unlike Sun, HP and AIX, are challenging in that they store their files in a special format, making them incompatible if migrated directly to other systems. Therefore it is necessary to extract the data from each individual table in the GEN database, and apply that data to the target machine. It matters not whether that target machine is Sun, HP or AIX. Making it happen For the sake of clarity in the discussion and scripts this document we will name our machines SOURCE and TARGET. * On SOURCE is a SOURCE environment and in the SOURCE environment is a PROD productline. * On TARGET is a TARGET environment. We'll be creating a couple productlines there, one of which will be a new version of PROD Create your TARGET 7.3.3 Environment on the TARGET machine If you don't have a 7.3.3 environment CD or MF Cobol compiler for TARGET contact your CSM and tell them that the "Platform Change" documents must be completed and forwarded to Distribution for the 7.3.3 Environment and Compiler on your TARGET system. This usually takes at least 24 hours for the Environment and several days to ship the compiler, so plan ahead. Using the accompanying documentation install the MF Cobol compiler in it's own directory - do not confuse it with the MF Server Express Compiler required for 8.X environments. You'll install it too, but in a different place. Load in the MF Cobol compiler licenses. Note: If you already have a running copy of MF Server Express, then install the licenses into it's license manager. You can only have 0ne license manager running at a time, so it's better to install them in the one that's going to be running when everything is completed. Using the accompanying documentation install a 7.3.3 environment on the TARGET machine. For the sake of your own sanity match exactly the directory structure as it exists on the SOURCE machine for the SOURCE environment. These paths are stored inside the GEN database and things will simply "not match up" unless you want to hand edit several files as part of the upgrade process. Add the appropriate ESP to bring your TARGET environment to the same level as your SOURCE environment Backup your 7.3.3 Environment At this point DO NOT create any productlines in the TARGET environment, and UNDER NO CIRCUMSTANCES connect it to any RDBMS' yet. Dump the GEN data from the SOURCE environment The script below is part of a set to dump and load your GEN data. You'll be responsible for moving the data files between the SOURCE and TARGET machines and setting permissions. If you don't know how then you shouldn't be doing this. Make certain your environment variables are pointed at your SOURCE environment before executing this script as 'lawson' #!/bin/ksh ##### # gendump.sh # J. David Schronce 16 Dec, 2003 ###### GENDUMP=/tmp/gendump umask 000 # is env set? if [ "X$LADBDIR" = "X" ]; then echo "\nEnvironment not set - set environment and start again\n" exit 1 fi # is user 'lawson'? if [ $LOGNAME != "lawson" ]; then echo "\nExecutable only by lawson\n" exit 2 fi # is there a dump directory? if [ -f $GENDUMP ]; then : else mkdir /tmp/gendump chmod 777 /tmp/gendump fi # remove any previous attempts rm $GENDUMP/*.Z # Dump the GEN tables cd $LADBDIR/GEN for table in `ls [A-Z]*[A-Z]` do echo "Dumping $table ..." dbdump -d GEN $table > $GENDUMP/$table done # tar 'em up, clean 'em up and compress 'em cd $GENDUMP tar -cvf SOURCE.GEN.tar ./* rm [A-Z]*[A-Z] compress SOURCE.GEN.tar echo "\nYour GEN directory data is in $GENDUMP" echo "ftp it to your TARGET system in the $GENDUMP directory\n" ---------------------- Copy the contents of SOURCE:$LADBDIR/dict & SOURCE:$LADBDIR/sec - migrate them to the same directories on your TARGET machine Log into the TARGET machine as lawson. Make certain your environment variables are pointed at your TARGET environment before executing this script as 'lawson' --------------------- #!/bin/ksh ##### # genload.sh # J. David Schronce 16 Dec, 2003 # Use only in conjunction with gendump.sh ###### GENDUMP=/tmp/gendump umask 000 # is env set? if [ "X$LADBDIR" = "X" ]; then echo "\nEnvironment not set - set environment and start again\n" exit 1 fi # is user 'lawson'? if [ $LOGNAME != "lawson" ]; then echo "\nExecutable only by lawson\n" exit 2 fi # is there a dump directory? if [ -f $GENDUMP/SOURCE.GEN.tar.Z ]; then : else echo "\nYou have either not created the $GENDUMP directory or failed to" echo "place the SOURCE.GEN.tar.Z file in it\n" exit 3 fi # Uncompress and untar the SOURCE data cd $GENDUMP uncompress SOURCE.GEN.tar.Z tar -xvf SOURCE.GEN.tar # Load the data for table in `ls [A-Z]*[A-Z]` do echo "Loading $table ..." dbload -a GEN $table $table done # Cleanup echo "Cleaning up..." rm [A-Z]*[A-Z] compress SOURCE.GEN.tar echo "GEN data load completed.." stoplaw and startlaw - this load procedure may need to be repeated several times until you get no errors. If all else fails, go back to your backup and try again. Upgrade your new 7.3.3 Environment on TARGET Backup your 7.3.3 Environment Install the new MF Server Express compiler. Download the 8.X Environment and Documentation from support.lawson.com Follow the instructions in the section of the Installation Guide on Upgrading your environment. Dump the upgraded jobs and security data Your user's jobs and security settings have now been upgraded to the 8.X format, however we're going to have to destroy it to upgrade your TARGET productline, so lets make a backup. As a user with Security Officer privileges, execute 'secdump' on the target environment. secdump SOURCE /tmp/SOURCE.sec.dmp Also dump your users jobs for later recovery.: jobdump -d -l /tmp/SOURCE.jobs.dmp Save the output files for later use. Remove PROD productline Use dbdef to highlight and remove the PROD productline from your new 8.X environment. We will recreate it later as a version 8.x productline. Create new Productlines The first order of business is to create a new 7.X productline in your new 8.X environment. DO NOT name it PROD if you want PROD to be the name of your final upgraded productline. We will be upgrading INTO the new 8.X version of PROD .a little later. Also do not name it the same as any of the existing productlines in the SOURCE environment. It will be for upgrade purposes only and will be deleted once the final application upgrade is completed. Caveat: if you are not planning on upgrading to 8.X applications- or have ALREADY upgraded to 8.x applications, then feel free to name it PROD and ignore my comments on adding the 8.X productline below Use it's accompanying documentation to install and compile the 7.X applications. Use it's accompanying documentation to create and compile a new 8.X productline - call it PROD (or whatever you want your final upgraded productline name to be). Load Security and Jobs Using the files we created earlier you can now load back in your jobs and security. secload -o /tmp/SOURCE.sec.dmp jobload -c-l-o Productline PROD target-pl-name-in-caps /tmp/SOURCE.jobs.dmp Cleanup the Extra productlines Your TARGET environment now has the memory of the SOURCE environment, meaning it thinks it has all the same productlines as SOURCE, but it doesn't. open 'dbdef' in your TARGET environment and for each productline you find, that is not PROD or the newly created 7.X productline, press F9 to delete it. That's it... You're now ready to attach your new productlines to their RDBMS., the process for that is in the Lawson Enterprise Server manuals and outside the scope of this document. Then you can proceed with your application upgrades - good luck! J. David Schronce