Professional Documents
Culture Documents
The IBM AS/400 A Technical Introduction
The IBM AS/400 A Technical Introduction
Atechnicalintroduction
byTomVanLooy<tom@ctors.net>
January2009
ThispaperwaswrittenfortheAS/400's20thanniversary,
andwaspresentedatHAR2009.
TomVanLooy
1/14
Index
History..............................................................................................................................................................3
WhatisIBMi?..................................................................................................................................................3
Technologyindependence..........................................................................................................................4
Objectbaseddesign...................................................................................................................................5
Hardwareintegration...................................................................................................................................6
Softwareintegration....................................................................................................................................6
Singlelevelstore.........................................................................................................................................6
Workmanagement...........................................................................................................................................7
Jobs.............................................................................................................................................................7
Pools............................................................................................................................................................7
Programming....................................................................................................................................................8
OPM............................................................................................................................................................8
ILE...............................................................................................................................................................8
Exploringthesystem........................................................................................................................................9
Commandinterface.....................................................................................................................................9
Filesystemstructure..................................................................................................................................10
Users.........................................................................................................................................................10
Startingthesystem....................................................................................................................................11
Otherenvironments........................................................................................................................................12
Unix............................................................................................................................................................12
Hypervisor.................................................................................................................................................13
Windows....................................................................................................................................................13
Bibliography....................................................................................................................................................13
Abouttheauthor.............................................................................................................................................14
Legalnotice....................................................................................................................................................14
TomVanLooy
2/14
History
TheApplicationSystem400wasdevelopedatIBMRochester,Minnesotaasasocalledmidrangesystem.
Thisbasicallymeansthatit'sasmallmainframesystem.Rochesterstartedbuildingbusinesscomputers
withtheSystem/3.
Knowtohavesomekindoffortressmentality,Rochestersystemsdidn'thadlargeinfluencesfromEast
CoastuniversitieslikeMULTICS,Unix,VMS,WindowsNTandIBM'smainframeoperatingsystemshad.
ThisresultedinRochester'ssystemsbeingseparatistanddifferent.TheRochestersystemcodeisnot
sharedwithanyone,noteveninsideIBM.NooneexceptthesystemcodedevelopersinRochestercan
generatesystemcode.
TheSystem/38wasbuiltontheS/3(1969)butbeingverydifferentfromit.DesignedbyDr.FrankSoltis,it
grewfromtheS/3totheS/32(1975)andS/34(1977),andwasfinallyannouncedtothepublicin1978.In
1983theS/36wasreleasedasthelatestvariantoftheS/3.ThisreleasewasdonetosatisfyS/32andS/34
userswhofoundtheS/38tolargeandexpensivefortheirneeds.
ThenIBMstartedanattempttocombineallofit's(incompatible)midrangecomputersintoone.Thiswas
projectFortKnox.FortKnoxwouldreplacetheS/36andS/38,Series/1,RS/6000andabunchofsmallIBM
mainframesystems.Theprojectfaileddisastrous.AtsomepointIBMevendeclaredtheS/38asnon
strategic,anddiscouragedcustomersfrombuyingthesystem.ThismadeitdifficultfortheS/38toremain
competitive,andleftRochesterwithnothing.
Rochester'sbackupplanwasprojectSiverlake.ThisprojecttooksomestufffromS/36,S/38,some
leftoversfromFortKnoxandturnedthisintotheAS/400.InmanywaystheAS/400wasactuallyjustanew
implementationoftheS/38.Itwasannouncedtothepublicin1988.
NotethattheSystem/38wasnotbuiltontheSystem/370.ManypeopledeclaredthisinthepastandIBM
evenfundedprojectstomaketheS/38softwarerunontheS/370.Alltheseprojectshavefailed.Notethat
theS/370wasprecededbytheS/360(1964).Thisrangeofsystemsledtotoday'sSystemz.
Tomakealongstoryshort,inthepasttheAS/400wasrenamedseveraltimes:
AS/400
AS/400e
eServeriSeries
eServeri5
Systemi5
Systemi
POWERsystems
Iprobablyforgetafew,butanyway.Since2008(20yearslater),weknowtheAS/400astheIBMi.Thei
standingforintegrated.Atthetimeofthiswriting,thelatestversionofIBMiis6.1.IBMirunsonPOWER
(PerformanceOptimizedWithEnhancedRISC)hardware.
TomVanLooy
3/14
WhatisIBMi?
Inthelate1960's,tosettlesomelawsuits,IBMagreedtonotbundlesoftwarewithit'scomputersanymore.
Bundlingwasapracticethatrequirecustomerstobuythehardwaretogetthesystemsoftware.Thiswas
donetoavoidthatothercompaniesclonedthesystem'shardwareandsolditatlowerprices.
WiththeS/38theywantedtomakeasystemwheretheMIwastheonlyexternalinterface.Asaresult,
everypartofthesystemthatwashardwaredependentwaspackagedaspartofthehardware.Because
microcodeinthosedayswasconsideredhardware,theoperatingsystemkerneloftheS/38waspackaged
aspartofthemicrocode.Atthetimeofshipping,thepackaginglawswerechangedagainbuttheS/38kept
thisdesign.
IfyoulooselycomparetheAS/400systemsoftwaretoGNU/Linux,themicrocodewouldbetheLinuxpart
andIBMiwouldbetheGNUpart.DomindthatIBMiismoresophisticatedandextendedthanonly
operatingsystemsoftware.
Versions:
SystemSupportProgram(SSP)System/36
ControlProgramFacility(CPF)System/38
OS/400AS/400
i5/OSiSeries
IBMiPOWER
WiththereleaseofIBMPOWER6systemsin2008,IBMfinallyfinishedthemergeoftheSystemiand
Systemphardware.TodayitispossibletorunIBMi,AIXandLinuxontheIBMPOWERsystemshardware
line.Mainlybecauseoffinishingthismerge,Dr.FrankSoltiswillretirefromIBMattheendofthisyear.
IBMiisdefinedbythefivefundamentalarchitecturalprinciples,whichwillbeexplainedinthefollowing
paragraphs.
Technologyindependence
Unlikeothercomputersystems,theIBMiisnotdefinedbyit'shardware.Programsdon'tspeakdirectlyto
thehardwarebutinsteadspeaktotheTechnologyIndependentMachineInterface(TIMI).TheMIisa
virtualmachineinterfacetothesystem,consistingoftwoparts;computationalandobjectoriented
instructions,andoperandsuponwhichtheseinstructionsact.Objectsaretheonlysupporteddatastructure
attheMIlevel.BetweentheMIandthehardwareisthemicrocodeorSystemLicensedInternalCode
(SLIC).
Theadvantageofthistechnologyindependencewasdemonstratedin1995whentheAS/400movedfrom
the48bitCISC(IMPI)tothe64bitRISC(PowerPC)processorarchitecture.Customerscouldjust
save/restoretheirprogramsonthenewmachine,andtheywouldrunastruly64bitapplications.Without
eventheneedtorecompileanything.IBMcouldjustrewritetheLICcomponentsthatwereawareofthe
changesandthuspreservetheMI'sintegrity.
Comparethistohowwearetodaymovingfrom32bitto64bitonthex86platform.Eventhoughmost32
bitapplicationswillrunon64bithardware,theapplicationswillstillhavetoberewrittentofullyemploythe
64bitdesign.ThesamestoryhappenedwhenIntelmovedfrom16bitto32bit.
TomVanLooy
4/14
Toquoteanotherexampleofthepast.WhenpeoplewouldmigratefromDigital's32bitVAXto64bit
Alpha,Digitalestimatedthat15to20percentofeveryapplicationneededtoberewritten.
WhentheAS/400wasstilla48bitCISCsystem,themicrocodewasimplementedinaverticaland
horizontalversion.TheVLICtranslatedinstructionspassedtotheMI,andhandedthetranslated
instructionstotheHLICthatdealtdirectlywiththehardware.HLICwasthemicrocodedemulatorofthe
InternalMicroprogrammedInterface(IMPI)processorarchitecture.
WhentheAS/400movedto64bitRISC,theLICwasrewritten.BecauseaRISCprocessorhasno
microcodedemulator,thereisnoHLICpart.Theyendeduphavingonlyonelevelofmicrocode,andthey
renamedittoSystemLicensedInternalCode(SLIC).TheoriginalVLICwasprogrammedinPL/MP
(ProgrammingLanguage/MachineProduct).SincePL/MPwasnotusableforOOprogramming,theSLIC
waswritteninC++andPowerPCassembler.TheSLIC,norPPCASareaccessibletotheendusers.
+---+----------------+
|
| applications |
|
+------------+
|
|
OS/400
|
|
+----------------+---+
|
TIMI
|
+--------------------+
| +----------------+ |
| |
VLIC
| |
| +----------------+ |
| |
IMPI
| |
| +----------------+ |
| |
HLIC
| |
| +----------------+ |
| | 48-bit addr
| |
| | CISC interface | |
| |
HW
| |
| +----------------+ |
+--------------------+
+---+----------------+
|
| applications |
|
+------------+
|
|
IBM i
|
|
+----------------+---+
|
TIMI
|
+--------------------+
| +----------------+ |
| |
| |
| |
| |
| |
SLIC
| |
| |
| |
| |
| |
| +----------------+ |
| | 64-bit addr
| |
| | RISC interface | |
| |
HW
| |
| +----------------+ |
+--------------------+
SincetheS/38,thesystem'sinstructionsetdefinesallpointersas128bit.Today,128bitprocessorsare
alreadyusedforspecialpurposegamingandgraphicsapplications.Whenatapointinthefuture128bit
generalpurposeprocessorswouldappear,IBMiwillalreadybefully128bitenabled.
Objectbaseddesign
IBMihasafullyobjectbasedsystemdesign.Everythingwithinthesystemisstoredasanobject,
consistingoutoftwoinseparableparts.Adescriptivepart,whichdefinesvalidwaysofusingtheobject;and
adatapart,whichcoversthefunctionalaspectoftheobject.
Anobjectbaseddesignhassecurityimplications.Ifanobjectentersthesystemasdata,itmustremain
dataforever.Entity'sareencapsulated.Thedescriptivepartoftheobjectwillnotletyou,forexample,treat
theobjectasanexecutable.Objectsareatomicandcan'tbemanipulatedexceptasanentireobject.
Objectscommunicatewitheachotherbytheprocessofmessagepassing.EveryaddressableobjectinIBM
ihasauniquemessagequeueattached.
TomVanLooy
5/14
IBMidoesn'thaveafullyobjectorienteddesign,becauseitlackssomeofthebasiccharacteristicsofaOO
model.Forexample,itdoesn'tsupportsubclasscreationorinheritanceandpolymorphismisminimally
defined.
Hardwareintegration
Becauseofit'sbusinesscomputingnature,theAS/400wasoptimizedforinformationintensive
environmentsinsteadofcomputeintensiveenvironments.Meaningthatuserswoulddosimpleoperations
onalargeamountofdata,ratherthanperformcomplexoperationsonarelativelysmallamountofdata.
WiththearrivalofJavabasedbusinessintelligenceandebusinessapplications,thegeneralbusiness
environmentbecameincreasinglycomputeintensive.ThemovetoPowerPCprocessorswasintendedto
enhancethecomputeintensiveprocessingcapabilitiesofthesystem.Withthisintegrationtheytriedto
createabalanceddesignbetweenfastprocessing,highbandwidthmemoryandhighperformanceI/Ofor
allbusinessapplications.
AnIBMPOWERprocessor'scapacityisexpressedinaCommercialProcessingWorkload(CPW)value.
TheCPWdisregardstheCPUpercentage.InsteaditisbasedontheTPCC(TransactionProcessing
PerformanceCouncil)benchmarkandsimulatesthedatabaseserverofanonlinetransactionprocessing
(OLTP)environment.Itcountsthenumberoftransactionsasystemcancompletewhiledelivering90%of
thosetransactionatlessthanfivesecondsresponsetime.
ThePOWERprocessorsactuallysupportfivearchitectures:64bitAmazon,64bitPowerPC,32bit
PowerPC,64bitPOWERand32bitPOWER.
Softwareintegration
Insteadofhavingtogetadditionalfundamentalsoftwarecomponentsfromothervendors,softwarefor
security,communications,backup/recoveryandthedatabase(DB2/400)arefullyintegratedintothe
standardoperatingsystem.
Thesecomponentsareseparatelyinstalledaslicensedprogram's.IBMcreatesupdatesandpatchesfor
thesystemcalledProgramTemporaryFixes(PTF).Thesecanbeinstalledtemporaryorpermanent.You
havetheabilitytostartthesystemwithorwithoutloadingthetemporaryappliedfixes.And,youcanmake
thetemporaryfixespermanentwhenyoutestedthemandknowtheysolvedyourproblemanddon'tcause
newones.
Whenyouaddstoragedevicestothemachine,thesystemwilljustrecognizeanduseit.Thesystemalso
doesstufflikeautomaticallyextendingfilesthatarefulletc.DB2/400isamoderndatabaseandsupports
journaling,commitmentcontrol,triggers,referentialintegrity,storedprocedures,italsohasapredictive
querygovernor,anEXPLAINcommandtoanalyzeSQLstatements,supportfordistributeddatabases,
replication,etc.Becausetechnicaldatabaseadministrationtasksaresubsumedintooverallsystem
managementtasks,mostIBMiinstallationsdon'tneedatraditionaldatabaseadministrator.
Singlelevelstore
VirtualmemoryisorganizedbytheSLICasasinglelevelstore.IBMihasa64bitaddressspacewhich
canaddress18quintillionbytesofdata.Allprogramsanddataresideinthismassivespaceandare
addressablefromasinglepermanentaddress,whichisneverreused.Usersjusthavetoreference
programsbynameorbypointer,anddon'tneedtoworrywhereitresidesonthesystem.
TomVanLooy
6/14
Thesinglelevelstoreisaboutsharing.Thereisnoneedtocreateaseparateaddressspacewhen
executinganewtask.Program'sdon'tcopyobjectsintoauser'saddressspace.Also,taskswitchingisvery
fastbecauseit'ssimpleassavingtheprocessor'sregistersandperformingabranchinstructiontothe
locationwherethetaskresides.Thevirtualaddressingmechanismisresponsibleformovingtheobjectinto
realmemory.
Programmersorsystemadministratorsdon'thavetheabilitytoaccessrealmemory.Thesekindof
functionsaremanagedbytheSLIC,invisibletotheMIortoIBMi.
Each8bytesofmemoryinIBMihasaspecificbitreferredtoasatagbit.Ifthetagbitisset,thememory
locationistreatedasaMIaddresspointer,usedtoaccessdataandMIobjects.Ifauserprogrammodifies
anydataintheMIaddresspointer,thetagbitisturnedoffbyhardware,disablingitsfurtheruseasan
objectpointer.
Workmanagement
Jobs
Therearefourmajortypesofjobsinsideasystem:
Interactive
Batch
Communication
System
Jobsonthesystemareidentifiedbyacombinationofjobnumber/username/jobname.Thejobnumbers
arenotreused.
Asubsystemhasworkstationentry's,theseentry'sdescribeoneormoreworkstationsthatarecontrolled
bythesubsystem.Interactivejobswilluseaterminalsession.Theyrunintheforegroundandtieupa
workstationscreenuntiltheyfinish.Interactiveprogramsarecalled.Whenauserissingedon,thatuseris
runninganinteractivejob,whentheusercallsaprogramorissuesacommandfromthecommandline,the
resultingprogramrunsinteractively.
Batchjobsruninthebackgroundanddon'ttieupaworkstationscreen.Batchjobsaresubmitted.Beforea
batchjobbecomesactiveitmustpassthroughajobqueue.Asubsystemcanbefedbyseveraljobqueues,
butajobqueuecanonlybelongtoonesubsystem.Jobshaveapriorityonthejobq,jobswithequalpriority
areprocessedinFIFOorder.
Communicationjobsaresimilartobatchjobs,onlytheyarestartedbyaremoteIBMisystem.
Systemjobsarenotcriticaltomasterbecauseyoucandonothingwiththemforperformance.Buttheydo
takeresources.So,it'shandyifyouknowwhichjobsaresystembackupjobs,etc.
Pools
TheIBMi'smemoryisdividedintostoragepools.Bydefault,thesystemisdividedinapoolforsystem
tasks(*MACHINE)andapoolwhereeverythingelseruns(*BASE).Mostpeoplewillcreateadditionalpools
forspecifictypesofjobs.Forexample,apoolcanbeconfiguredtodynamicallyadjustthepagingoptionsof
thememoryinsidethepooltoincreasesystemperformance.Thepoolsizesandjobactivitylevelofshared
poolscanbeautomaticallyadjustedbythesystem(QPFRADJsystemvalue).Youcanalsomakesurethat
TomVanLooy
7/14
somejobswillnotuseupallmemorybyplacingtheminafixedsizeprivatepool.
Jobsdon'trundirectlyinastoragepool,theyruninsidesubsystemsinstead.Ajobhasajobdescription,
thisobjectcontainstheattributesthejobwillhave.Theseattributesmakesurethejobcanberecognized
bytheIBMiandaredifferentfromthejob'sruntimeattributes.Thejobdescriptioncontainsstufflikethe
outputqueueandthejob'sinitiallibrarylist.Thejobdescriptionalsocontainsroutingdata,thisdata
containsinformationthat'slaterusedbythejobclass.Ajobclassisanobjectthatprovidesruntime
attributeslikeruntimepriorityandCPUtimeslice.
Programming
OPM
ThetraditionallanguageslikeRPGandCOBOLusedtowriteAS/400applicationsarefirsttranslatedinto
MIprogramsandthenmorphedintoPowerPCprogramsbytheinternaloptimizingcompiler,beforethe
programisexecuted.
IntheearlydaysoftheAS/400,theprogrammodelwascalledtheOriginalProgramModel(OPM).MI
instructionsweregeneratedinafairlydirectmanner.TheOPMsourcewasgeneratedintoanIntermediate
RepresentationofaProgram(IRP).Next,theIRPhadtobeconvertedintoMIinstructions.Thiswasdone
bytheProgramResolutionMonitor(PRM)andresultedinanOPMprogramtemplate.
AsnewlanguageslikeC/400,Pascal,etc.wereimplementedontheAS/400,someextensionshadtobe
addedtotheOPM.ThisresultedinanExtendedProgramModel(EPM).Thecompilersforthesenew
languageswereimplementedwithseparatefrontandbackends.Thenewcompilerbackendwascalled
CommonUseBackEnd(CUBE1).Theonlytypeofcallinstructionwascallexternal.Thisisatypeoflate
binding.Allreferencesareresolvedatruntime,whichcomeswithaperformancecost.
ILE
Toimprovetheperformanceofmodularprogramming,anewprogrammingmodelwasintroduced.The
IntegratedLanguageEnvironment(ILE)introducednewlanguagecompilers,anewoptimizingtranslator
andabinderfacility.TheoutputofanILEtranslatorisnotaprogramobjectlikewithOPM,butinsteadisa
module.TheILEbinderpackagesthesemodulesintoprogramsandintroducedtheabilitytodoearly
binding.ILEusesthe3thgenerationofcompilerbackendtechnology(CUBE3).
Amodulecontainsprocedureswhichcanbecalledatanentrypoint,withoptionalparameters.Amoduleis
notexecutable,insteadmodulesarecontainedinprograms.Aprogramhasasingleentrypointandis
dynamicallycalled.Programscancontainmultiplemoduleswhichcanbegeneratedbydifferentlanguage
compilers.
Serviceprogramsarealsoexecutableunits.Theyhavemultipleentrypoints,oneforeachprocedure.Each
procedurecanbestaticallycalled.Thepurposeofserviceprogramsistosupportmultipletypesofstatic
calls.Programsusebindbycopy(CALLPGM),whereproceduresareresolvedatcompiletime.Multiple
copiesofthesamemodulemayexistinmemoryifthemoduleisboundintomultipleprograms.Service
programsusebindbyreference(CALLB).Symboliclinkstomodulesinsidetheserviceprogramsarestored
intotheprograms.Whenaprogramisactivated,thoselinkareresolvedinsidetheserviceprogramand
replacedbythecallstotheaddressoftheprocedures.
TomVanLooy
8/14
ThisisallsimilartohowLinuxandWindowswork.Belowisanoverview:
+----------+---------+-------------+
|
ILE
| Windows | Linux (ELF) |
+-------------------+----------+---------+-------------+
| After compilation | *.MODULE | *.obj
| *.o
|
+-------------------+----------+---------+-------------+
| Bind by copy
| *.PGM
| *.exe
| *
|
+-------------------+----------+---------+-------------+
| Bind by reference | *.SRVPGM | *.dll
| *.so
|
+-------------------+----------+---------+-------------+
JavaprogramsarealsofirstcompiledintobytecodesthatarepartoftheMI.Thesebytecodesarethen
usedbytheJavaVirtualMachine(JVM),whichisimplementedinSLIC.
TheIBMiusesathreelevelhierarchytomanagetheflowofworkthroughasystem.AjobontheIBMiisa
unitofworkrepresentedasanobjectthatcontains,amongotherthings,aprocessstructurethat'susedto
managethesystemresourcesrequiredtocompletetheunitofwork.Thethirdlevelintheflowofworkare
kernelthreads.Threadsareaportionoftheprocessandarescheduledforexecutionbytheprocess
managementcomponentofSLIC.TheIBMialsosupportstwouserthreadmanagementinterfaces,namely
pthreads(POSIX)andtheJavathreadclass.
AprocessisasystemobjectattheMI,calledaprocesscontrolspace(PCS).Thereisnoequivalent
OS/400object.Aprocessobject'sresponsibilityistotietogethertheresourcesneededtoexecutea
program.Aprocessobjectcontainsanactivationgroup.WhenaprogramiscalledtheCALLPGMactivates
theprogram.Itcompletestheinterprogrambindingandimplicitlycreatesanactivationgroup.Activation
groupsarealwaysnamed,ifnotexplicitlythenimplicitly.Anactivationgroupistheworkingstorage
allocatedtorunoneormoreprograms.Eachactivationgroupcontainsa:
programstaticstoragearea(PSSA):sectionusedforglobalstaticdata
programautomaticstoragearea(PASA):thecall/returnstack,usedtoallocatelocalvariables
heapstoragearea:dynamicdatathatdoesnotadheretoastackstructure,variablelengthdataetc.
Asystemmayusethesestorageareastouseacombinationofregisters,memoryanddiskstorage.That's
whytheseareasarereferredtoasstorageareasandnotmemoryareas.Thestaticandheapstorageare
accessiblebyanythreadwithaprogramorprocedurerunningintheactivationgroup.Theautomatic
storageisassociatedwiththethread.Activationgroupscanbesharedamongmultiplethreads,anda
threadmayhavecodeactivelyrunninginmultipleactivationgroups.
Exploringthesystem
Commandinterface
AnimmediatelynoticeabledistinctivefeatureoftheIBMiisitscommandsyntaxandmenubased
commandinterface.
Eachcommandconsistsofaconcatenationofsimpleabbreviations.Forexample,thecommandworkwith
objectisWRKOBJ,whilethecommandworkwithoutputqueuewouldbeWRKOUTQ.Everycommand
canbepromptedwithF4,andeverycommand'sparameterscanbepromptedaswell.Everycommand/
parameterhasahelp,youcanjustputyourcursoratitandpressF1.
TomVanLooy
9/14
Thecommandentrypromptisalwaysavailable,butthesystemalsoprovidesaseriesoftopicoriented
menustofacilitatecommanduse.Forexample,theMAINmenulookslikethis:
Select one of the following:
1. User tasks
2. Office tasks
3. General system tasks
4. Files, libraries, and folders
5. Programming
6. Communications
7. Define or change the system
8. Problem handling
9. Display a menu
10. Information Assistant options
11. iSeries Access tasks
90. Sign off
WhenyoucalltheMAJORmenuwithGOMAJOR,yougetthefollowing:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
SLTCMD
VERB
SUBJECT
CMDOBJMGT
CMDFILE
CMDSAVRST
CMDWRKMGT
CMDDTAMGT
CMDSEC
CMDPRT
CMDSPL
CMDSYSCTL
CMDPGM
Filesystemstructure
Anobjectnameismaximum10characterslongandiscontainedinalibrary(*LIBobject).Alibraryis
similartoadirectoryonUnix.TherootoftheIBMifilesystemisthespeciallibraryQSYS.Thisistheonly
*LIBobjectthatcancontainother*LIBobjects.AllIBMsuppliedsystemlibrarynamesbeginwiththeletter
Qor#,it'sconsideredgoodpracticetoneverletyourownlibrarynamesstartwithoneofthesetwoletters.
Theobjectnameconsistsofthegivennameconcatenatedwiththeobjecttype.Itisperfectlypossibleto
havetwoobjectsnamedOBJ1,onebeingafile(*FILE)andonebeingaprogram(*PGM).Relatedobjects
aregroupedintolibraries(objecttype*LIB).Everyobjectisimplicitlyrelatedtoalibrary,andalways
explicitlyaccessiblelike<library>/<object>.ObjectsarestoredinEBCDICformat,sowhentransferring
datatothePC,translationtoASCIIisneeded.
Ajobonthesystemusesalibrarylist,comparableto$PATHonUnix.Alibrarylistiscomposedofasystem
anduserpart.LibraryQSYSwillbeinthesystempartofthelibrarylist.And,forexample,alibraryTVLwill
beintheuserpartofthelibrarylist.
TheIBMihasanIntegratedFilesystem(IFS).Intheearlyyears,OS/400onlyhadtheQSYSsinglelevelfile
systemhierarchy.Overtime,additionalfilesystemsweresupportedbyaddingaVirtualFileSystem(VFS)
architecture.TheVFSprovidesacommoninterfacetoallfilesystemsintheIFS.Oneremarkablefile
systemistheQOpenSysfilesystem.ThisfilesystemcontainsUnixbasedfilesanddirectories,andisfully
TomVanLooy
10/14
compatiblewiththePortableOperatingSystemInterfaceforUnix(POSIX)andtheX/OpenPortability
Guide(XPG).TheIFSalsosupportsthingslikeopticalfilesystemsandserverslikeNFSandSMB.
Users
Usersareassignedauserclassthatholdssomespecialauthoritylevels.TheIBMisuperuseriscalled
QSECOFR(securityofficer).
Authoritylevels:
allobject(*ALLOBJ)
auditing(*AUDIT)
I/Osystemconfiguration(*IOSYSCFG)
jobcontrol(*JOBCTL)
savesystem(*SAVSYS)
securityadministration(*SECADM)
servicefunctions(*SERVICE)
spoolcontrol(*SPLCTL)
Originally,userswoulduseanIBM5250terminaldevicetoconnecttothesystem.Few5250terminalsstill
exist,theterm5250nowreferstothecontentofthedatastreamitself.IBMprovidesIBMiuserswitha
5250emulatorinstead.
Whenyouconnecttothesystemyougetasingonscreen,whichisconfigurablebutbydefault,looks
somethinglikethis:
Sign On
User . . . . . .
Password . . . .
Program/procedure
Menu . . . . . .
Current library .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
System . . . . . :
Subsystem . . . . :
Display . . . . . :
. . . .
. . . .
. . . .
. . . .
. . . .
SOMESYS
QINTER
QPADEV0001
Atsignon,theuser'sinitiallibrarylistgetssetandit'sdefaultmenuisshown.Becauseauser,like
everythingelseonthesystem,isanobject,amessagequeueisalsoattached.Alltheseparametersare
configurableintheuserprofile.Whensignedon,IBMisupportsgroupjobsonyourterminal.Thiscanbe
comparedtotheGNUscreenutilityonUnix,withoutthedetachfunctionality.
Startingthesystem
TheIBMiismanagedfromaconsole.Therearetwotypesofconsoles.Theobsoletetwinaxconsole,and
theHardwareManagementConsole(HMC).ThesecondbeingrequiredsincePOWER6.TheHMCis
basicallyanIBMSystemxrunningLinuxwithsomebaseutility's,XwithFluxboxtoprovidegraphical
login's,andaJavabasedapplicationforsystemadministration.
TheHMCconnectstotheIBMi'sFlexibleServiceProcessor(FSP)overanetworkinterface.TheFSPisa
firmwarethatprovidesaccesstotheIBMi'sSystemServiceTools(SST)andDedicatedServiceTools
(DST)fordiagnostics,initialization,configuration,runtimeerrordetectionandcorrection.SSTcanalsobe
accessedfroma5250connection,DSTisonlyalternativelyaccessiblefromthesystemcontrolpanel(CP).
TomVanLooy
11/14
+-------+\
|
||
+-------+\
| IBM i ||
|
||
|
||
+----+ +----+ +----+
| HMC ||------------[FSP] ||
| WS | | WS | | WS |
|
||----+ +---|
||
+----+ +----+ +----+
+-------+/
| |
|
|| /____/| /____/| /____/|
/_______/
| |
| [CP ] ||
|
|
|
| |
+-------+/
|
|
|
~~~~~~~
|
|
|
(
)-----------------+
|
|
(
LAN
)------------------------+
|
(
)---------------------------------+
~~~~~~~
TheHMCcanbeusedtoinitiatethesystem'sInitialProgramLoad(IPL).Or,simplystated,bootthe
system.TheFSPsendstheIPLvaluestotheHMC.Forexample,codeC6004056meansthatJournal
recoveryisrunning.YoucanlookuptheIPLvaluesofthelastbootbyusingthecommandCALL
QWCCRTEC.ThisgeneratesaQPSRVDMPspoolfile.
IPLattributescanbeconfiguredwiththeCHGIPLAcommand,forexampleyoucanspecifytonotclearthe
system'soutputqueue'setc.TherearealsosomesystemvaluesimportanttoIPL.Forexample,system
valueQCTLSBSDholdsthenameofthecontrollingsubsystem.BydefaultIBMshipstwosubsystems:
QBASEandQCTL.Thesesubsystemshaveautostartjobstostartafewrequiredsubsystems.TheQCTL
controllingsubsystemwillstartthefollowingsubsystems(QBASEstartsjustasubsetofthose):
QINTER(interactivejobs)
QBATCH(batchjobs)
QCMN(communicationjobs)
QUSRWRK(userwork)
QSERVER(serverjobs)
QSPL(spooling)
Peoplecanbringthesysteminarestrictedstatebystoppingallsubsystemsexceptthecontrolling
subsystem(ENDSBSSBS(*ALL)).Forexample,thiswillmakesurethatobjectlocksareremovedsothey
don'tgetintheway.Thingsliketheconsoledisplayandbackupjobswilltypicallyruninthecontrolling
subsystem.
TheQSTRUPPGMsystemvalueholdsthenameofthefirstprogramthatisstartedwhentheIPLis
complete.Typicallythisprogramwillstartalladditionalsubsystems.
Afewotherinterestingsystemvaluesare:
QDATETIME,keepsthecurrentdateandtime
QMODEL,thesystemmodelnumber
QSRLNBR,thesystemserialnumber
QSYSLIBL,thesystempartofthelibrarylist
QSECURITY,thesecuritylevel
TomVanLooy
12/14
Otherenvironments
Unix
InadditiontotheQOpenSysUnixbasedfilesystem,theIBMialsoincorporatesanentire64bitAIXruntime
environment.TheproblemwiththisenvironmentwasthatUnixonlysupportsprocesslocalstorage.Unix
doesn'thavetheconceptofalargesharedstoragespacelikeintheIBMi.
Processlocalstoragewasimplementedbyprovidingteraspaces.Thesetemporarystoragearea'sprovide
privatestorageforaprocess.TheAIXruntimewasinitiallycalledPrivateAddressSpaceEnvironment
(PASE),butlaterthisacronymwasrenamedtoPortableApplicationSolutionEnvironment.
PASEgivesyouaUnixshellandabunchoftools.It'sevenpossibletorunanApachewebserver,X,...You
cancallaPASEshellscriptfromIBMiwith:QSHCMD('ls/home/tvl').It'salsopossibletocallaIBMi
commandfromthePASEshellwith:systemWRKOBJLCKOBJ(MYFILE)OBJTYPE(*FILE).Youcaneven
runDB2query'sfromPASEandpipetheoutputtosomeotherscript.
Inmyopinion,thePASEenvironmentmakesIBMimoreflexible,especiallywhenyouwanttogetasmall
jobdone.Forexample,somecommand'sdon'thavetheoptiontooutputtoafile.IBMdoesprovideAPI's
soyoucanimplementthisfunctionalityyourself.ButinPASEyoucanjustcallthecommandandredirectto
afile.
AdisadvantageofPASEisthatit'snottechnologyindependent.InsteadoftalkingtotheTIMI,ithasa
syscallinterfacetotheSLIC.YouwillneedtorecompileyourPASEprogramswhenyoumovetoanother
hardwarearchitecture.
Hypervisor
TheIBMicandoLogicalPartitioning(LPAR).Thismeansyoucanrunmultipleinstancesandevendifferent
versionofIBMionthesamehardware.Ahypervisorprovidestheisolationbetweenuserandsystemstate
programs.ThehypervisorontheIBMihashardwaresupportinthePowerPCprocessor.LPAR'sarealso
createdandmanagedfromtheHMC,itispossibletoallocateresourcestoapartitionatruntime,ina
dynamicway.
IBMportedtheLinuxkerneltotheIBMiplatform,soLinuxcanruninsideanLPAR.BothRedhatandNovell
provideaLinuxdistributionforthePOWERplatform.
Also,AIXcanruninanLPAR.ThiswasalsopossibleontheSystemi.But,backtheni5/OSdidn'trunon
AIX'sSystemphardware.TodaySystemiandSystemparemergedintothePOWERplatform,makingthe
hardwareidentical.
Windows
WindowsdoesnotrunonthePOWERplatform.BecauseWindowsisn'topensourcesoftware,it'snotso
easytoportthekerneltoanotherplatform.ButIBMdidputsomeeffortinmakingitpossibletoconsolidate
WindowsserversontotheIBMi.TheycreatedanIntegratedxSeriesServer(IXS).TheIXSisphysically
packagedonacardwithanIntelprocessorandPCmemorythatfitsinsidetheIBMi.Linuxcanalsorunon
anIXS.
TomVanLooy
13/14
Bibliography
FortressRochester,theinsidestoryoftheIBMiSeries;ISBN1583040838
InsidetheAS/400;ISBN1882419138
Goodbye,AS/400,OldFriend;http://www.itjungle.com/tfh/tfh040708story05.html
WhatisaniSeries;http://systeminetwork.com/article/whatiseries
UnderstandingAS/400systemoperations;ISBN1583470158
ArchitectureoftheIBMAS/400;VincentLeVeque,JamesMadisonUniversity,CS511
Wikipedia,thefreeencyclopedia;http://en.wikipedia.org/(S/3,S/32,S/34,S/36,S/38,AS/400)
i5/OSinformationcenter,http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp
WhenisPowerPCnotPowerPC,http://systeminetwork.com/article/whenpowerpcnotpowerpc
Abouttheauthor
TomVanLooystartedouthisITcareerasasoftwaredeveloperin2005andmovedovertothepositionof
network/systemengineerin2007.Sincehechangedjobsin2009,Tomdoesn'tusetheAS/400in
productionanymore.Buttherespecttothisremarkablesystemhasremained.Tomcanbereachedby
emailattom@ctors.net.
ThispaperwaswrittenfortheAS/400's20thanniversary,andwaspresentedatHAR2009.
Legalnotice
ThispaperislicensedundertheCreativeCommons
AttributionNoncommercialNoDerivativeWorks2.0Belgiumlicense.
http://creativecommons.org/licenses/byncnd/2.0/be/deed.en
TomVanLooy
14/14