Archive for category iSeries

iSeries (AS400) error messages

Every so often (mostly during development) iSeries will return an error number.  Generally I find they do nothing but confuse since the person using iSeries is a PC developer and knows little about the AS400 and the AS400 developer knows nothing about iSeries.

Next time you’re dealing with an obscure error from iSeries try looking for it in this document:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzaik/rzaik.pdf

I found my error in there.

3 Comments

How to automate installing the .Net Framework, iSeries and Oracle Client

I created a batch file that checks to see if the .net framework 3.5, 4.0, iSeries and Oracle Client is installed and if not install them.  I found it pretty useful, here’s the code:

@echo off
if not exist %windir%\microsoft.net\framework\v3.5 (
echo Copying installer for .Net 3.5
xcopy “\\somenetworklocation\dotNetInstallers\dotnetfx35.exe” c:\dotNetInstallers\ /c /r /y /q
echo Installing .Net 3.5
c:\dotNetInstallers\dotnetfx35.exe /qb /nopatch /norestart /lang:enu
) Else (
echo .Net 3.5 already installed, skipping
)

if not exist %windir%\microsoft.net\framework\v4.0.30319 (
echo Copying installer for .Net 4.0
xcopy “\\somenetworklocation\dotNetInstallers\dotNetFx40_Full_x86_x64.exe” c:\dotNetInstallers\ /c /r /y /q
echo Installing .Net 4.0
c:\dotNetInstallers\dotNetFx40_Full_x86_x64.exe /norestart /passive
) Else (
echo .Net 4.0 already installed, skipping
)

if exist c:\dotNetInstallers (
rmdir c:\dotNetInstallers /S /Q
)

if not exist C:\ORACLE\Base\product\11.1.0\client (
echo Copying Oracle 11g .Net Data Adapter
xcopy “\\somenetworklocation\Oracle 11g ODAC and Oracle Developer Tools for Visual Studio 11.1.0.7.20\*.*” C:\OraInst\ /E /C /H /R /Y /Q
echo Installing Oracle 11g .Net Data Adapter
setup.exe -responseFile C:\OraInst\OracleInstallPrefrencesNew.rsp
rem setup.exe -silent -responseFile C:\OraInst\OracleInstallPrefrencesNew.rsp
) Else (
echo Oracle 11.1.0 client already installed, skipping
if exist c:\OraInst (
rmdir c:\OraInst /S /Q
)
)

if not exist “C:\Program Files\IBM\Client Access\READMESP.TXT” (
echo Installing IBM iSeries Driver
“\\somenetworklocation\iSeries Access Install Image w all Options\setup.exe” -s
) Else (
echo IBM iSeries Driver already installed, skipping
)

echo Installation Complete
echo NOTE: you may need to restart for the changes to take effect.
pause

Thanks to symantec’s forum for the inspiration for this one:
http://www.symantec.com/connect/forums/how-do-i-check-see-if-net-35-installed-continuing-install-job

===== ORACLE NOTES =====

Automating Oracle’s install requires an ini file of sorts.  The easiest way to generate this file is to run the install on a machine with the settings you’re interested in, like so:
setup.exe -record -destinationFile C:\OraInst\rec.rsp
Once you have that file you can use it to install like so:

setup.exe -silent -responseFile C:\OraInst\custom.rsp

There are some gotcha’s with this, one of note is the -responseFile option would not work for me when the file path had a space in it, even if I used the standard double quote escaping.  So
setup.exe -silent -responseFile "C:\Oracle Install\custom.rsp

wouldn’t work.
Also you can’t move the installer after generating it, if you do you will get a “Invalid staging area” error.  What I did to get around this was create a folder for installing, like:
c:\OracleInstallerVerx_xx_xx_x\
and generated the file there.  Then in the batch file copy the install from a network share to this local dir and then run setup.
Some more info on this is available on informit’s website here:
http://www.informit.com/articles/article.aspx?p=174771

===== iSeries NOTES =====

Automating iSeries works much the same as automating Oracle.  It creates an ini file of sorts when you run this command:
setup -r -f1d:\dir\file.iss
note that the flag "-f1" actually runs into the file and folder path, in this case: "d:\dir\file.iss". More here:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzaij/rzaijcd.htm
To then install the app on subsequent machines run this:
setup -s -f1d:\dir\file.iss -f2d:\dir\file.log
-s indicates a silent install, -f1 is the ini file and -f2 is where the install logs messages to.  If you name the iss file this:
setup.iss, and put it in the same dir as the setup app you don’t have to provide the -f1 parm.  This is because the setup app will look for setup.iss automatically. More here:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzaij/rzaijcd.htm

5 Comments