modeparameterdirection

parameterdirection  时间:2021-02-25  阅读:()
IBMOperationalDecisionManagerVersion8Release0GettingStartedTutorialsNoteBeforeusingthisinformationandtheproductitsupports,readtheinformationin"Notices"onpage35.
Thiseditionappliestoversion8,release5,modification1ofOperationalDecisionManagerandtoallsubsequentreleasesandmodificationsuntilotherwiseindicatedinneweditions.
CopyrightIBMCorporation2008,2012.
USGovernmentUsersRestrictedRights–Use,duplicationordisclosurerestrictedbyGSAADPScheduleContractwithIBMCorp.
ContentsTutorials1Tutorial:Creatingacopybook-basedrulesetforzRuleExecutionServerforz/OS1Beforeyoustart2Task1:Importinganexistingruleproject.
.
.
.
4Task2:GeneratingaXOMfromaCOBOLcopybook5Task3:CreatingaBOMfromtheCOBOLXOM.
6Task4:Declaringrulesetparameters7Task5:AddingBOMmethodsandmappingthemtotheXOM.
8Task6:Creatingaruleflow10Task7:Writingactionrules11Task8:Preparingforruleexecution13Step1:CreateaRuleAppproject13Step2:DeploytheXOMandRuleApptozRuleExecutionServerforz/OS13Step3:Viewthedeployedartifacts.
.
.
.
14Task9:BuildingyourCOBOLapplication.
.
.
14Task10:ExecutingtheCOBOLprogram.
.
.
.
15Tutorial:SharingaBOMbetweenJavaandCOBOLapplications15Beforeyoustart16Task1:Importinganexistingruleproject.
.
.
17Task2:ConfiguringtheBOMforCOBOLcopybookgeneration18Task3:CreatingaRuleAppproject19Task4:DeployingtheXOMandRuleApp.
.
.
20Task5:BuildingyourCOBOLapplication.
.
.
20Task6:ExecutingtheCOBOLapplication.
.
.
21Tutorial:GeneratingCOBOLcodefromacopybook-basedruleproject21Beforeyoustart22Task1:Importinganexistingruleproject.
.
.
24Task2:GeneratingaXOMfromaCOBOLcopybook25Task3:CreatingaBOMfromtheCOBOLXOM25Task4:Declaringrulesetparameters26Task5:ImplementingBOMmethodsinCOBOL27Task6:Creatingaruleflow30Task7:Writingactionrules31Task8:Preparingforruleexecution32DecisionCentertutorials34Notices35Trademarks37Index39CopyrightIBMCorp.
2008,2012iiiivIBMOperationalDecisionManager:GettingStartedTutorialsTutorialsDevelopyourtechnicalskillswithtutorialsforOperationalDecisionManagerforz/OS.
TutorialsinstalledwithDecisionServerRulesonadistributedplatformalsodemonstratesomefeaturesthatareapplicabletotheRuleExecutionServerruntimeonz/OS.
TheDecisionServerRulestutorialsarepre-configuredtorunonthesampleserver.
However,thesameusertasksarerelevantwhenyoudeployyourrulestoz/OS,andadministerRuleExecutionServeronWebSphereApplicationServerforz/OS.
Therefore,thefollowingtutorialsandtaskscanbeofinteresttoyou.
Note:Youcaninstallthesampleserveronadistributedplatformandfollowthetutorialsonthatcomputer.
YoucandeploythetutorialapplicationsonaninstanceofWebSphereApplicationServerforz/OSandfollowthetasksthatapplytobothenvironments,oryoucansimplyreadthedocumentationtounderstandthetasksandfindoutwhatstepsareinvolved.
Table1.
TutorialsunderDecisionServerRulesthatarealsorelevantonz/OSTutorialTasksManagingRuleAppsTask1(Steps2-5),Task3,andTask4ExecutingahostedtransparentdecisionserviceonJavaTasks2-7DebuggingaremoteRuleExecutionServerapplicationTasks1-4ThefollowingtutorialsarespecifictoDecisionServerforz/OS.
Tutorial:Creatingacopybook-basedrulesetforzRuleExecutionServerforz/OSInRuleDesigner,youcanuseaCOBOLcopybookasthebasisforyourXOM,anddeployyourrulesettozRuleExecutionServerforz/OSsothatyoucanexecuteitfromaCOBOLapplication.
WhatyouwilllearnAfictitiousloancompanyusesalargeCOBOLapplicationrunningonz/OStovalidateloanapplications.
Inthistutorial,thecompanydecidestousebusinessrulestotestcustomereligibilityfortheirloans.
Inthistutorial,youlearnhowtoperformthesetasks:vImportanexistingruleprojectnamedreszminiloanIfyoualreadyhavearuleprojectnamedreszminiloaninyourworkspace,eitherswitchtoadifferentworkspaceorchooseadifferentname.
vCreateaXOMfromthesampleCOBOLcopybookprovidedwiththistutorialvCreateaBOMbasedontheXOMvAddtworulepackages:eligibilityandvalidationCopyrightIBMCorp.
2008,20121vAddmethodstotheBOMsothatyoucanspecifyconditionsandactionsinyourrules,andmapthemtotheXOMvAddaruleflowtocontrolruleexecutionvWriteasetofrulesvDeployyourrulesforruleexecutioninaCOBOLapplicationonz/OSTimerequiredThistutorialtakesaboutonehourtocomplete.
BeforeyoustartInthistopic,findoutwhatyouneedtoknowbeforeyoustartthetutorial.
RuleDesignerprovidesfeaturesthatyoucanusetoabstractCOBOLdatastructurestoaBusinessObjectModel(BOM).
WithaBOM,youcanwriterulesinmorenaturallanguagethanyoucanusingtheCOBOLstructuresandnamingdirectly.
AfictitiousloancompanyusesalargeCOBOLapplicationrunningonz/OStovalidateloanapplications.
Inthistutorial,thecompanydecidestousebusinessrulestotestcustomereligibilityfortheirloans.
ThecompanywantstosharerulescontainedintheCOBOLapplicationwithotherbusinessapplications,andmanagethechangesmadetotheserules.
ThecompanydecidestomigratethebusinesslogictoaBRMSbyprioritizingthemostcommonlysharedrules.
Therulesthatarechosendefinecustomereligibility.
Thissetofrulescalculatestheincomeverificationandminimumcreditamount.
Duringexecution,therulespassamessagetothemainprogramtonotifytheresultoftheinitialvalidation.
Inareallifescenario,youidentifyorcreateaCOBOLcopybookcontainingtheCOBOLdataitemsrequiredforthebusinessrules.
Youthenusethiscopybookasabasisforcreatingyourexecutionobjectmodel(XOM).
Inthistutorial,youusethesampleCOBOLcopybookprovided,HBRLDAT1.
cpy.
TheHBRLDAT1.
cpycopybookcontainsthefollowingdataitems:01Borrower.
05namePICX(20).
05creditScorePIC9(10).
05yearlyIncomePIC9(10).
05agePIC9(3).
88teenagerVALUE0THRU17.
88adultVALUE18THRU60.
88retiredVALUE61THRU150.
01Loan.
05amountPIC9(10).
05yearlyInterestRatePIC99.
05yearlyRepaymentPIC9(10).
05effectDatePICX(8).
05approvedPICX.
05messageCountPIC9(2).
05messagesPICX(60)OCCURS0TO99TIMESDEPENDINGONmessageCount.
Fromthiscopybook,youwillgeneratearulesettobedeployedonzRuleExecutionServerforz/OS.
2IBMOperationalDecisionManager:GettingStartedTutorialsStartthistutorial:"Task1:Importinganexistingruleproject"onpage4.
WhatyouwilllearnAfictitiousloancompanyusesalargeCOBOLapplicationrunningonz/OStovalidateloanapplications.
Inthistutorial,thecompanydecidestousebusinessrulestotestcustomereligibilityfortheirloans.
Inthistutorial,youlearnhowtoperformthesetasks:vImportanexistingruleprojectnamedreszminiloanIfyoualreadyhavearuleprojectnamedreszminiloaninyourworkspace,eitherswitchtoadifferentworkspaceorchooseadifferentname.
vCreateaXOMfromthesampleCOBOLcopybookprovidedwiththistutorialvCreateaBOMbasedontheXOMvAddtworulepackages:eligibilityandvalidationvAddmethodstotheBOMsothatyoucanspecifyconditionsandactionsinyourrules,andmapthemtotheXOMvAddaruleflowtocontrolruleexecutionvWriteasetofrulesvDeployyourrulesforruleexecutioninaCOBOLapplicationonz/OSTimerequiredThistutorialtakesaboutonehourtocomplete.
SoftwarerequirementsTousethistutorialyoumusthaveRuleDesignerinstalledonWindowsorLinux.
ThistutorialusesRuleDesigneronWindows.
YoumustalsohaveaninstanceofzRuleExecutionServerforz/OSinstalledandconfiguredonz/OS.
Note:YoucanalsowriteandmanagerulesusingDecisionCenter.
However,thistutorialdoesnotincludetasksusingDecisionCenter.
WhatyouneedtoknowTofollowthistutorial,youmustbefamiliarwithcertainaspectsrelatingtoyourinstallation:vYoumusthaveabasicunderstandingoftheEnterpriseCOBOLprogramminglanguage,knowhowtomakecallsfromaCOBOLprogram,andknowhowtobuildaCOBOLapplication.
vYoumustknowwheretodeployyourRuleApps.
YourzRuleExecutionServerforz/OSsystemadministratorhasconfiguredthelocationwhereyourRuleAppsandXOMsmustbedeployed,eitheronthefilesystemorinaDB2database.
Ifyoudonotknowthelocation,contactyoursystemadministrator.
vYoumustalsobefamiliarwithRuleDesignerandunderstandsomebasicBusinessRuleManagementSystem(BRMS)termsandconcepts,suchas:–Executionobjectmodel(XOM)–Businessobjectmodel(BOM)Tutorials3–Verbalization–RuleApp–Ruleset–Rulesetparameter–BusinessActionLanguage–RuleflowYoucanfindallthesetermsintheGlossary.
ForinformationaboutspecialconsiderationsforruleexecutioninCOBOLapplications,seeCOBOLconsiderationsforruleapplicationdevelopment.
Important:ThistutorialisonlyavailableinAmericanEnglish.
Theruleprojectcontainingtherulestoimportinthistutorialisonlyprovidedintheen_USlocale.
Ifen_USisnotyourdefaultlocale,youcanusethesamplesconsoleshortcut:FromtheStartmenu,clickAllPrograms>IBM>>SampleServer>SamplesConsole(en_US).
DirectorystructureAllthefilesforthistutorialarecontainedinthefollowingdirectory:/studio/tutorials/cobol/cobolstartresz,whereistheDecisionServerinstallationdirectory.
ThistutorialprovidesasampleCOBOLcopybooknamedHBRLDAT1.
cpyforyoutouse.
Thecopybookisstoredin:v/studio/tutorials/cobol/cobolstartresz/start/reszminiloan-execution/copy/HBRLDAT1.
cpy.
Startthistutorial:"Task1:Importinganexistingruleproject.
"Task1:ImportinganexistingruleprojectTofocusonthemainpurposeofthetutorial,youimportanexistingruleprojectratherthancreateone.
Thistutorialprovidesanexistingruleproject,reszminiloan,whichhasaCOBOLcopybookfromwhichyouwanttogeneratearulesettobedeployedonzRuleExecutionServerforz/OS.
Ifyoualreadyhavearuleprojectwiththesamename,switchtoanewworkspacebeforestartingthistask.
Toimportanexistingruleproject:1.
Ifnecessary,switchtoanewworkspace:a.
InRuleDesigner,ontheFilemenu,clickSwitchWorkspace>Other.
b.
OntheWorkspaceLauncherpage,intheWorkspacefield,changethenameofthecurrentworkspacetoanewworkspacename.
c.
ClickOK.
2.
Toimportaruleprojectfromthesamplesconsole,clickWindow>OpenPerspective>Other.
3.
IntheOpenPerspectivedialog,clickSamplesConsole,andthenclickOK.
4IBMOperationalDecisionManager:GettingStartedTutorialsTheSamplesandTutorialsviewisdisplayed.
4.
Inthisperspective,expandtheRuleDesignersectionifnecessary,andthenclickTutorials>Cobol>Creatingacopybook-basedruleprojectforzRulesExecutionServerforZ.
5.
Understart,clickImportprojects.
ThereszminiloanruleprojectisaddedtothelistofprojectsintheRuleExplorer.
Note:Bydefault,therulesinthistutorialareexecutedusingtheclassicruleengine.
Ifyouwanttousethedecisionengineinstead,seeChoosingabuildmodeandDecisionengine.
Task2:GeneratingaXOMfromaCOBOLcopybookToexecuteyourrulesinaCOBOLapplication,youuseaCOBOLcopybookasthebasisforyourXOM.
ACOBOLXOMprovidesthenecessaryCOBOL-to-JavamappingsothatyoucanexecuteyourrulesinaCOBOLapplication.
TogenerateaCOBOLXOM:1.
IntheDesignpartoftheRuleProjectMap,clickImportXOMandthenselectCOBOLExecutionObjectModel.
Note:YouusetheRuleProjectMaptoviewthestatusofgoalsandtasksinaruleproject.
Todisplayit,selectWindow>ShowView>Other>RuleDesigner>RuleProjectMap.
Alternatively,right-clickyourruleprojectandthenselectProperties>COBOLManagement>COBOLExecutionObjectModel.
2.
OnthePropertiespage,intheCOBOLExecutionObjectModelpane,clickAdd.
3.
OntheImportCOBOLXOMpage,intheExecutionObjectModelNamefield,typeanamefortheXOM.
Forexample,rezminiloan-xom.
4.
ClickAdd.
5.
OntheSelectCobolCopybookpage,clickFileSystemandthennavigatetotheHBRLDAT1copybook.
See"Beforeyoustart"onpage2forthecopybooklocation.
6.
SelectHBRLDAT1.
cpy,andthenclickOpen.
7.
InthePackagenamefield,typeapackagename,forexample,xom.
ClickOK.
8.
OntheImportCOBOLXOMpage,clickNexttodisplayasummaryofthedefaultJavatypesandclassattributesderivedfromeachCOBOLiteminthecopybook.
9.
ChangeapprovedfromtypeStringtoboolean,usingthetypeconverter:a.
ExpandtheLoanitem.
b.
Right-clicktherowthatcontainstheapproveddataitemandthenclickAddconverter.
c.
OntheConfigureConverterSettingspage,selectthebooleanconverter.
d.
ForthebooleanTruevalue,typeTandfortheFalsevalue,typeF.
e.
ClickOK.
Tutorials5Attention:IfyouchangethedefaultmappingsandthensubsequentlyreimporttheXOM,youloseyourconfiguredvalues.
10.
ClickFinishtoclosethepageandcreatetheCOBOLXOM.
YouseethenewXOMonthePropertiespageintheCOBOLExecutionObjectModelpane.
11.
ClickOKtoclosethePropertieswindow.
NoticethefollowingadditionintheRuleExplorerview:arezminiloanJavaXOMproject.
Task3:CreatingaBOMfromtheCOBOLXOMYoucreateaBOMinRuleDesignerbasedonyourCOBOLXOM.
Inthistask,youcreateaBOMinRuleDesigner,basedontheCOBOLXOMyoucreatedintheprevioustask.
TocreateaBOMfromtheCOBOLXOM:1.
IntheDesignpartoftheRuleProjectmap,clickCreateBOM.
Alternatively,intheRuleExplorerview,selectthebomfolderinyourruleprojectandthen,ontheFilemenu,clickNew>BOMEntry.
2.
IntheNewBOMEntrywizard,intheNamefield,acceptthedefaultnamefortheBOMentry:model.
3.
MakesurethattheoptionCreateaBOMentryfromaXOMisselectedandthenclickNext.
4.
OntheNewBOMEntryscreen,intheChooseaXOMentryfield,clickBrowseXOM,selectplatform:/rezminiloan,andthenclickOK.
5.
UnderSelectclasses,selectthexompackage.
Whenyouselectthepackage,youautomaticallyselectalltheclassesitcontains.
6.
ClickNext.
OntheBOMVerbalizationpage,selecttheAllMethodscheckbox.
Thisoptionmakessurethatallthemethodsareverbalized,inadditiontotheelementsyoualreadyselected.
7.
ClickFinish.
IntheRuleExplorerview,thebomfoldercontainsanewBOMentry.
8.
IntheRuleExplorer,double-clickbom>modeltoopentheBOMEditor.
9.
IntheBOMEditor,expandthexompackage.
YouseethattheBOMhastwoclassestomatchtheBorrowerandLoanclassesintheXOM.
10.
Double-clicktheBorrowerclasstoviewthedefaultverbalization:borrower.
ThedefaultverbalizationfortheLoanclassisloan.
Note:ThedefaultverbalizationisinAmericanEnglish.
IfyouareworkinginalocalizedversionofRuleDesigner,youcanverbalizetheBorrowerandLoanclassesinthelanguageofyourlocale,usingtheEditTermdialog.
6IBMOperationalDecisionManager:GettingStartedTutorialsTodisplaytheEditTermdialog,intheRuleExplorerdouble-clicktheclassormemberyouwanttomodify.
IntheVerbalizationsectionoftheBOMEditor,clickEdit.
Task4:DeclaringrulesetparametersRulesetparametersdefinethedatathatissentbetweentheCOBOLcallingprogramandtheRuleApp.
RulesetparametersprovidethemeanstoexchangedatabetweenyourCOBOLapplicationandtheRuleApp.
Youdefinerulesetparametersbyname,type,anddirection.
Inthistutorial,youwanttomakeadecisiononthestatusofaloan,soyoucreaterulesetparametersfortheBorrowerandLoanclasses.
YoumustusetheINdirectionfortheborrowerparameter.
ThevalueoftheborrowerparameterisprovidedasinputfromtheCOBOLclientapplicationonexecution.
ThedirectionfortheloanparametermustbeIN_OUT.
ThevalueoftheloanparameterissetbytheINvaluepassedbytheclientandthenupdatedbytheengineonthewayout.
Theupdatedvalueisreturnedtotheclient.
Note:YoucannotusetheOUTparameterdirectionwithzRuleExecutionServerforz/OS.
Todeclarerulesetparameters:1.
IntheDesignpartoftheRuleProjectmap,clickDefineparameters.
Alternatively,intheRuleExplorer,right-clickyourruleprojectandthenclickProperties.
2.
InthetypefilterpaneofthePropertiesdialog,selectRulesetParameters.
3.
OntheRulesetParameterspage,selecttheEnabletypecheckforCOBOLXOMcheckbox.
ThisselectionfilterstherulesetparametertypesyoucanuseforaruleprojectthathasaCOBOLXOM.
4.
Todefinetheborrowerparameter,clickAddandthenchangethedefaultvaluesasfollows:a.
IntheNamecolumn,typeborrower.
b.
IntheTypecolumn,clickthe.
.
.
buttontodisplaytheTypesdialog,andthendouble-clicktheBorrowertypeintheMatchingtypesbox.
Thexom.
BorrowertypeisdisplayedintheTypecolumn.
c.
IntheDirectioncolumn,selecttheINdirection.
d.
IntheVerbalizationcolumn,typetheborrower.
5.
Todefinetheloanparameter,clickAdd.
Yourrulesetparametersettingslooklikethis:NameTypeDirectionDefaultValueVerbalizationborrowerxom.
BorrowerINtheborrowerloanxom.
LoanIN_OUTtheloana.
IntheNamecolumn,typeloan.
b.
IntheTypecolumn,clickthe.
.
.
buttontodisplaytheTypesdialog,andthendouble-clicktheLoantypeintheMatchingtypesbox.
Tutorials7Thexom.
LoantypeisdisplayedintheTypecolumn.
c.
IntheDirectioncolumn,usethedefaultIN_OUTdirection.
d.
IntheVerbalizationcolumn,typetheloan.
6.
ClickOKtosaveyourrulesetparameters.
Task5:AddingBOMmethodsandmappingthemtotheXOMYouaddBOMmethodstoaBOMclasstohelpverbalizeyourrules.
TokeeptheXOMsynchronizedwiththeBOM,youmustmapthenewBOMmethodstotheXOM.
Youusemethodstospecifyconditionsandactionsinyourrules.
YoucreatemethodsinRuleDesigner.
WhenyouaddmethodstotheBOM,youcreatemembersintheBOMthatarenotdefinedintheXOM.
Thismismatchcreateserrorsinyourruleproject.
Toavoidthismismatch,youmapthenewmethodstotheXOM,usingtheBOMEditor.
Note:YoumustnotmakeanychangesdirectlyintheXOM.
Inthistask,youaddthefollowingmethods,verbalizethem,andthenapplyBOMtoXOMmapping.
ClassMethodDescriptionLoanpublicvoidaddMessage(Stringmsg)Defineswhatisneededtopassinformationfromtherules.
LoanpublicvoidrejectIdentifieswhethertheloanapplicationwasrejected.
BorrowerpubliclongcomputeIncomeAfterTaxComputestheincomeoftheborrower,aftertax.
ToaddBOMmethodsandmapthemtotheXOM:1.
StartbyaddingtheaddMessagemethod.
IntheOutlineview,expandthemodelpackageandthendouble-clicktheLoanclass.
2.
OntheClasspageoftheBOMeditor,intheMemberssection,clickNew.
3.
OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTypeaddMessageMethodtypeTypevoid4.
Onthesamepage,clickAddandthencompletetheMethodArgumentdialogasfollows.
FieldDataentryNameTypemsgTypeTypejava.
lang.
String5.
ClickOKtoclosetheMethodArgumentdialog,andthenclickFinish.
8IBMOperationalDecisionManager:GettingStartedTutorialsOntheClasspageoftheBOMeditor,theMemberslistnowincludestheaddMessagemethod.
6.
Double-clicktheaddMessagemethod,andintheMemberVerbalizationsectionoftheBOMEditor,clickCreatetoviewthedefaultverbalization:add{0}tothemessagesof{this}Youarenotgoingtochangethisverbalization.
7.
ScrolldowntotheBOMtoXOMmappingsectionoftheBOMEditorandthenclickthearrownexttotheBodyfieldtoopentheBOMtoXOMMappingeditor.
8.
TypethefollowingJavacode:this.
messages.
add(msg);9.
Saveyourwork.
10.
AddtherejectmethodtotheLoanclassandthensaveit:OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTyperejectMethodtypeTypevoidYoudonotaddparametersforthismethod.
ThefollowingtableshowsyouwhattoenterfortheverbalizationandtheBOMtoXOMmapping.
VerbalizationBOMtoXOMmappingAcceptthedefaultverbalization,reject{this}this.
approved=false;.
11.
AddthecomputeIncomeAfterTaxmethodtotheBorrowerclassandthensaveit:OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTypecomputeIncomeAfterTaxMethodtypeTypelongYoudonotaddparameterstothismethod.
ThefollowingtableshowsyouwhattoenterfortheverbalizationandtheBOMtoXOMmapping.
VerbalizationBOMtoXOMmappingChangetheverbalizationtotheincomeaftertaxof{this}if(this.
yearlyIncomeRulePackage.
b.
IntheNewRulePackagewizard,inthePackagefield,typevalidationandthenclickFinish.
ThenewvalidationrulepackagedisplaysintheRuleExplorer.
c.
Createanotherpackageandnameiteligibility.
Yourruleprojectnowcontainstwopackagesforstoringyourrules.
2.
Tocreatetheruleflow,intheRuleExplorer,selectyourruleprojectandthenclickNewRuleflowontheRuleDesignertoolbar.
3.
IntheNewRuleflowdialog,intheNamefield,typemainflowandthenclickFinish.
TheRuleflowEditoropens,displayingtheDiagrampage.
4.
ClickthestartnodeintheRuleflowpaletteandthenclicktheDiagrampage.
5.
ClicktheCreatearuletaskiconinthepaletteandthenclicktheDiagrampage.
Anewruletaskiscreated.
6.
ClickthenewruletaskandthenmakethefollowingentriesonthePropertiestab:vChangetheIDtovalidationvForRuleExecution>Algorithm,selectSequential7.
OnthePropertiestab,clickRuleSelectionandthenclickEdit.
8.
IntheSelectRulesdialog,usethearrowbuttontomovethevalidationpackagetothesidepaneandthenclickOK.
9.
Createasecondruletasknamedeligibilityandthensetitspropertiesasforthevalidationtask.
10.
MovetheeligibilitypackagetothesidepaneoftheSelectRulesdialogandthenclickOK.
10IBMOperationalDecisionManager:GettingStartedTutorials11.
Addanendnodetotheruleflow.
12.
UsingtheCreateatransitioniconinthepalette,createthefollowingtransitions:vFromthestartpointtothevalidationtaskvFromthevalidationtasktotheeligibilitytaskvFromtheeligibilitytasktotheendpoint13.
AligntheruleflowbyclickingtheLayoutAllNodesicon.
14.
Savetheruleflow.
Yourruleflowlookslikethis.
Task7:WritingactionrulesYouwriterulesusingdedicatededitorsandtheBusinessActionLanguage(BAL).
Inthistask,youwritefiveactionrulesandputthemintotherelevantpackage.
YoucanwriterulesinRuleDesigner,orinDecisionCenter.
IfyouuseDecisionCenter,makesurethatyousynchronizewithRuleDesignerbeforeyoudoso.
YoucreatethefollowingrulesinRuleDesignertotheeligibilityandvalidationpackages:PackagenameRulenameeligibilityMinimumCreditScoreMinimumAmountMinimumNetIncomevalidationMaximumAgeReqMaximumAmountTutorials11Note:Ifyouareworkinginalocalizedversionoftheproduct,makesurethatyouhaveverbalizedtheBorrowerandLoanclassesinthelanguageforyourlocalebeforeyoustartwritingrules.
Tocreatetheactionrules:1.
CreatetheMinimumCreditScorerule:a.
Intheruleproject,right-clicktheeligibilitypackageandthenclickNew>ActionRule.
b.
IntheNamefield,typeMinimumCreditScore.
c.
ClickFinish.
ThenewactionruledisplaysintheRuleExplorerviewandtheIntelliruleEditoropens.
Youcanswitchtotheguidededitorifyouprefer.
2.
Writetheeligibility.
MinimumCreditScoreruleasfollows:ifthecreditscoreof'theborrower'islessthan200thenadd"Creditscorebelow200"tothemessagesof'theloan';reject'theloan';3.
Intheeligibilitypackage,addthefollowingrules:NameRuleMinimumAmountiftheyearlyrepaymentof'theloan'ismorethantheyearlyincomeof'theborrower'*0.
3thenadd"ToobigDebt-To-Incomeratio"tothemessagesof'theloan';reject'theloan';MinimumNetIncomeiftheincomeaftertaxof'theborrower'islessthan24000thenadd"Theyearlyincomeislowerthanthebasicrequest"tothemessagesof'theloan';reject'theloan';4.
Inthevalidationpackage,addthefollowingrules:NameRuleMaximumAgeReqiftheageof'theborrower'ismorethan65thenadd"Theageexceedsthemaximum.
"tothemessagesof'theloan';reject'theloan';MaximumAmountiftheamountof'theloan'ismorethan1000000thenadd"Theloancannotexceed1000000"tothemessagesof'theloan';reject'theloan';5.
Saveyourwork.
12IBMOperationalDecisionManager:GettingStartedTutorialsRelatedinformation:RuleauthoringforCOBOLcompatibilityTask8:PreparingforruleexecutionToprepareforruleexecution,youmustcreateaRuleAppprojectandthendeploytheRuleAppandtheXOMtothezRuleExecutionServerforz/OSpersistenceonz/OS.
Step1:CreateaRuleAppprojectYoucreateaRuleAppprojectinRuleDesigner.
YoumustcreateaRuleAppprojecttocontaintherulesetsthatyouwanttoexecute.
TocreateaRuleAppproject:1.
InRuleDesigner,intheDeployandIntegratepartoftheRuleProjectMap,clickCreateRuleAppproject.
Alternatively,ontheFilemenu,clickNew>Project,selectRuleAppProjectandthenclickNext.
2.
IntheNewRuleAppProjectwizard,intheProjectnamefield,typethisnameforyourruleproject:reszminiloanApp.
3.
MakesurethattheUsedefaultlocationcheckboxisselected.
4.
ClickNext.
YourruleprojectisshownasselectedontheRuleProjectstab.
Note:Inthistutorialyouincludealltherulesintheruleproject.
Forlargeruleprojects,youmightwanttousetherulesetextractortoextractonlycertainsetsofrules.
Inthiscase,youclickAddandthenselecttheruleextractoroption.
5.
ClickFinish.
TheRuleAppprojectiscreatedandisaddedtothelistofprojectsintheRuleExplorer.
TheRuleAppprojecteditoropensautomatically.
LeavetheRuleAppprojecteditoropen,asyouusetheDeployoptioninthenextstep.
Step2:DeploytheXOMandRuleApptozRuleExecutionServerforz/OSYoudeployyourartifactssothatyoucanexecutetherulesetonz/OS.
TobeabletoexecuteyourrulesetwithzRuleExecutionServerforz/OS,youmustdeploytheCOBOLXOMandyourRuleApptozRuleExecutionServerforz/OS.
TodeploytheXOMandRuleApp:1.
IntheRuleAppprojecteditor,intheDeploymentpane,clickDeploytodeploytheRuleApptooneormoreRuleExecutionServerinstances.
2.
FortheRuleApp,acceptthedefaultIncrementRuleAppmajorversionandthenclickNext.
3.
SelectCreateatemporaryRuleExecutionServerconfigurationandenterthefollowingdetails:vURL:http://your.
server.
address:PORT/resTutorials13vLogin:resAdminvPassword:resAdmin4.
ClickFinish.
YourartifactsaredeployedtozRuleExecutionServerforz/OS.
YoucannowlogintothezRuleExecutionServerforz/OSconsoleandviewthem.
Step3:ViewthedeployedartifactsUsethezRuleExecutionServerforz/OSconsoletoviewthedeployedRuleAppandXOM.
LogintothezRuleExecutionServerforz/OSconsoleandusetheNavigatorpanetoviewthedeployedRuleAppandXOM.
Toviewyourdeployedartifacts:1.
OpenthezRuleExecutionServerforz/OSconsoleusingthefollowingURL:http://your.
server.
address:PORT/res2.
Attheloginprompt,enterthefollowinglogindetails:vLogin:resAdminvPassword:resAdmin3.
ClicktheExplorertab.
4.
IntheNavigatorpane,clickResourcestoviewthedeployedXOM.
5.
IntheNavigatorpane,clickRuleAppstoviewthedeployedRuleApp.
Task9:BuildingyourCOBOLapplicationToexecuteyourruleset,youcalltheRuleAppfromyourCOBOLapplicationandpasstherulesetparameterstotheruleenginerunninganinstanceofzRuleExecutionServerforz/OS.
ThistutorialincludesacodesamplethatyoucanusetocallaRuleAppfromaCOBOLapplication.
Thefollowingprocedureexplainseachpartoftheclientcodeandthestepstofollow.
TobuildyourCOBOLapplication:1.
CopyinthezRuleExecutionServerforz/OSruntimecopybooks:01WS-REASON-CODES.
COPYHBRC.
COPYHBRWS.
HBRCcontainsconstantsthatyoucanuseinyourapplication.
HBRWScontainstheworkingstoragestructureusedforcallingHBRCONN,HBRRULE,andHBRDISC.
2.
Addtherulesetparameters:MOVELENGTHOFBorrowertoHBRA-RA-DATA-LENGTH(1)MOVE"borrower"toHBRA-RA-PARAMETER-NAME(1)SETHBRA-RA-DATA-ADDRESS(1)toaddressofBorrowerMOVELENGTHOFLoanTOHBRA-RA-DATA-LENGTH(2)COMPUTEWS-MAX-TABLE-LEN=LENGTHOFMessages*99ADDWS-MAX-TABLE-LENTOHBRA-RA-DATA-LENGTH(2)MOVE"loan"toHBRA-RA-PARAMETER-NAME(2)SETHBRA-RA-DATA-ADDRESS(2)toaddressofLoan3.
Specifytherulesettocall:MOVE""toHBRA-CONN-RULEAPP-PATH4.
ConnecttozRuleExecutionServerforz/OS:14IBMOperationalDecisionManager:GettingStartedTutorialscall"HBRCONN"usingHBRA-CONN-AREA5.
Calltherulesetandcheckthereturncodes:call"HBRRULE"usingHBRA-CONN-AREAIFHBRA-CONN-COMPLETION-CODE=HBR-CC-OKTHENDISPLAY"Successfulcall"ELSEDISPLAY"Error"HBRA-CONN-COMPLETION-CODEHBRA-CONN-REASON-CODE6.
DisconnectfromzRuleExecutionServerforz/OS:call"HBRDISC"usingHBRA-CONN-AREAYoucanfindasampleprogramfortheCOBOLapplicationin/studio/tutorials/cobol/cobolstartresz/answer/reszminiloan-execution/cobol/MINITUT1.
cbl,whereistheDecisionServerinstallationdirectory.
Task10:ExecutingtheCOBOLprogramYouexecutetheCOBOLprogramusingJCL.
YoucanfindaprebuiltversionofthetutorialwithyourDecisionServerinstallationonz/OS:v++HBRWORKDS++.
SHBRJCL(HBRMTUT1),theJCLusedtoexecutetheCOBOLprogramv++HBRWORKDS++.
SHBRCOBS(HBRMTUT1),theCOBOLprogramusedtoinvoketheruleexecutionv++HBRWORKDS++.
SHBRCOBC(HBRLDAT1),theCOBOLcopybookToexecutetheprogram:1.
SubmitthesampleJCL.
2.
Checktheoutput.
Theoutputshouldlooksomethinglikethis:EXECUTIONRESULTBorrowerName:JohnLoanApproved:FRejectmessages:Theageexceedsthemaximum.
Youhavenowcompletedthetutorial.
Tutorial:SharingaBOMbetweenJavaandCOBOLapplicationsThistutorialshowsyouhowtouseRuleDesignertoconfigureaJavaBOMforCOBOLstructuressothatyoucandeployyourrulesettozRuleExecutionServerforz/OSandexecuteitfromaCOBOLapplication.
WhatyouwilllearnInthistutorial,youdevelopthefollowingskills:vImportingaJava-basedruleprojectintoyourworkspacevEnablingthebusinessobjectmodel(BOM)forCOBOLcopybookgenerationTutorials15vGeneratingaCOBOLcopybookfromtheBOMvCustomizingthedefaultJavatoCOBOLmappingvDeployingyourrulesforruleexecutioninaCOBOLapplicationonz/OS.
TimerequiredThistutorialshouldtakeapproximately60minutestofinish.
BeforeyoustartFindoutwhatyouneedtoknowbeforeyoustartthetutorial.
Note:ThistutorialisavailableonlyinAmericanEnglish.
Theruleprojectcontainingtherulestoimportinthistutorialisonlyprovidedintheen_USlocale.
Ifen_USisnotyourdefaultlocale,youcanusethesamplesconsoleshortcuttochangethelocale.
FromtheStartmenu,clickAllPrograms>IBM>package_group>SampleServer>SamplesConsole(en_US).
ThedefaultpackagegroupisOperationalDecisionManager8.
5.
1.
AfictitiousloancompanywantstousebusinessrulestovalidateloanapplicationsandexecutethemineitheraJavaenvironment,orusingaCOBOLapplicationrunningonz/OS.
Thecompanyusesbusinessrulestodefinecustomereligibilityforloanapplications.
TheruleprojectsthatthecompanycurrentlyusescontainBOMsbasedonaJavaXOM.
TheydeploytherulestoRuleExecutionServeronWebSphereApplicationServerforz/OS,toexecuteinaJavaenvironment.
ThecompanynowwantstosharetheJavaruleprojectswithCOBOLapplicationsrunningonz/OS,andmanagethechangesmadetotheserules.
ToshareruleswithCOBOLapplications,theymustaddthenecessaryCOBOLstructurestotheBOMandgenerateaCOBOLcopybook.
Withthesestructuresintheruleproject,thecompanydeploystheRuleAppstozRuleExecutionServerforz/OSsothattheCOBOLapplicationcancalltherulesetsandexecutetherules.
WhatyouwilllearnInthistutorial,youdevelopthefollowingskills:vImportingaJava-basedruleprojectintoyourworkspacevEnablingthebusinessobjectmodel(BOM)forCOBOLcopybookgenerationvGeneratingaCOBOLcopybookfromtheBOMvCustomizingthedefaultJavatoCOBOLmappingvDeployingyourrulesforruleexecutioninaCOBOLapplicationonz/OS.
TimerequiredThistutorialshouldtakeapproximately60minutestofinish.
SoftwarerequirementsYoumusthaveRuleDesignerinstalledonWindowsorLinux.
ThistutorialusesRuleDesigneronWindows.
YoumustalsohaveaninstanceofzRuleExecutionServerforz/OSinstalledandconfiguredonz/OS.
16IBMOperationalDecisionManager:GettingStartedTutorialsAllthefilesforthistutorialarecontainedinthefollowingdirectory:/studio/tutorials/cobol/bomstartrez,whereistheDecisionServerforz/OSinstallationdirectory.
ThistutorialprovidesasampleruleprojectnamedSharingZMiniloanforyoutouse.
Theruleprojectisstoredinthefollowingdirectory:/studio/tutorials/cobol/bomstartrez/start.
WhatyouneedtoknowTofollowthistutorial,youmustbefamiliarwithcertainaspectsrelatingtoyourinstallation:vYoumusthaveabasicunderstandingoftheEnterpriseCOBOLprogramminglanguage,knowhowtomakecallsfromaCOBOLprogram,andknowhowtobuildaCOBOLapplication.
vYoumustknowwheretodeployyourRuleApps.
YourzRuleExecutionServerforz/OSsystemadministratorhasconfiguredthelocationwhereyourRuleAppsandXOMsmustbedeployed,eitheronthefilesystemorinaDB2database.
Ifyoudonotknowthelocation,contactyoursystemadministrator.
vYoumustalsobefamiliarwithRuleDesignerandunderstandsomebasicBusinessRuleManagementSystem(BRMS)termsandconceptssuchas:–Executionobjectmodel(XOM)–Businessobjectmodel(BOM)–RuleApp–RuleApparchive–Ruleset–Rulesetparameter.
YoucanfindthesetermsintheGlossary.
IfyouwanttosharerulesbetweenJavaandCOBOLapplications,itisimportanttounderstandhowJavastructuresmaptoCOBOLstructures,andanylimitationsthatapply.
Formoreinformation,seeGuidelinesforsharingaBOMandHandlingdatatypedifferencesbetweenJavaandCOBOLinthedistributedplatformpartofthisinformationcenter.
DirectorystructureAllthefilesforthistutorialarecontainedinthefollowingdirectory:/studio/tutorials/cobol/bomstartresz,whereistheDecisionServerinstallationdirectory.
ThistutorialprovidesasampleruleprojectnamedSharingZMiniloanforyoutouse.
Theruleprojectisstoredinthefollowingdirectory:v/studio/tutorials/cobol/bomstartresz/start.
Startthistutorial:"Task1:Importinganexistingruleproject.
"Task1:ImportinganexistingruleprojectTofocusonthemainpurposeofthetutorial,youimportanexistingruleprojectratherthancreateone.
Thistutorialprovidesanexistingruleproject,SharingZMiniloan,whichhasaBOMgeneratedfromaJavaXOM.
Ifyoualreadyhavearuleprojectwiththesamename,switchtoanewworkspacebeforestartingthistask.
Tutorials171.
Ifnecessary,switchtoanewworkspace:a.
InRuleDesigner,ontheFilemenu,clickSwitchWorkspace>Other.
b.
OntheWorkspaceLauncherpage,intheWorkspacefield,changethenameofthecurrentworkspacetoanewworkspacename.
c.
ClickOK.
2.
Toimportaruleprojectfromthesamplesconsole,clickWindow>OpenPerspective>Other.
3.
IntheOpenPerspectivedialog,clickSamplesConsole,andthenclickOK.
TheSamplesandTutorialsviewdisplays.
4.
ExpandtheRuleDesignersectionifnecessary,andthenclickTutorials>COBOL>CreatingaBOM-basedrulesetforzRuleExecutionServerforz/OS.
5.
Understart,clickImportprojects.
TheSharingZMiniloanruleprojectisaddedtothelistofprojectsintheRuleExplorer.
Task2:ConfiguringtheBOMforCOBOLcopybookgenerationBeforeyoucanuseaJavaBOMtogenerateaCOBOLcopybook,youmustmakeyourBOMentriescompatiblewithCOBOLcode.
Iftheyarenotcompatible,thecopybookyougeneratefromtheBOMisinvalid.
ToconfiguretheBOMforcopybookgeneration:1.
InRuleExplorer,right-clicktheruleprojectSharingZMiniloanandthenselectProperties>COBOLManagement>COBOLEnabledBOM.
2.
OntheCOBOLEnabledBOMpage,clickAdd.
3.
IntheSelectBOMentrydialog,clickmodel,andthenclickOK.
Thetableunder"ConfiguretypesettingforCOBOLitems"showstheproposedmappingbetweentheJavastructuresintheBOMandtheCOBOLstructures:NameJavaTypeCOBOLPicture/DateFormatGeneratedCOBOLItemxom.
Borrower-ageintS9(10)agePICS9(10).
-creditScorelongS9(18)creditScorePICS9(18).
-namejava.
lang.
StringX(20)namePICX(20)VALUESPACE.
-yearlyIncomelongS9(18)yearlyIncomePICS9(18).
xom.
Loan-amountlongS9(18)amountPICS9(18).
-approvedbooleanXapprovedPICX.
88BoolValueValue'T'.
-effectDatejava.
util.
Date9(8)[yyyyMMdd]effectDatePIC9(8).
-messagesjava.
util.
ListX(20)messagesPICX(20)OCCURS10TIMES.
-yearlyInterestRateshortS9(5)yearlyInterestRatePICS9(5).
18IBMOperationalDecisionManager:GettingStartedTutorialsNameJavaTypeCOBOLPicture/DateFormatGeneratedCOBOLItem-yearlyRepaymentlongS9(18)yearlyRepaymentPICS9(18).
ChangethedefaultlengthformessagesfromX(20)toX(60).
4.
ClickFinish.
TheCOBOLenabledBOMisgenerated.
5.
BackontheCOBOLEnabledBOMpage,clickManage.
6.
OntheCopybookGenerationpage,specifythenameandpathofthecopybooktobegenerated.
a.
Clickthedefaultcopybookname.
Abuttonwiththreedotsappears.
b.
ClickthebuttontodisplaytheSelectCOBOLCopybookpage.
c.
ClickBrowse,andthenspecifythefollowingcopybooknameandpath:/SharingZMiniloan-execution/copy/HBRLDAT2.
cpyinplaceofthedefaultnameandpath.
7.
ClickOK.
8.
UndertheTopLevelObjectcolumnoftheCopybookGenerationpage,accepttheJavatypesxom.
Borrowerandxom.
Loanasthetopleveldataitemsinthecopybook.
9.
UndertheItemNamecolumn,acceptthenamesborrowerandloancorrespondingtotheJavatypes.
WhenyougeneratetheCOBOLcopybook,thesearethenamesgiventothetopleveldataitems.
10.
ClickNexttomovetoacopybookpreview.
11.
ClickFinish.
12.
ClickOKtoclosethePropertiesforSharingZMiniloandialog.
Task3:CreatingaRuleAppprojectYoucreateaRuleAppprojecttocontaintherulesetsthatyouwanttoexecute.
1.
InRuleDesigner,intheDeployandIntegratepartoftheRuleProjectMap,clickCreateRuleAppproject.
2.
IntheNewRuleAppProjectwizard,intheProjectnamefield,typethisnameforyourruleproject:SharingZMiniloan-App.
3.
MakesurethattheUsedefaultlocationcheckboxisselected.
4.
ClickNext.
YourruleprojectisshownasselectedontheRuleProjectstab.
Note:Inthistutorial,youincludealltherulesintheruleproject.
Forlargeruleprojects,youmightwanttousetherulesetextractortoextractonlycertainsetsofrules.
Inthiscase,youclickAddandthenselecttheruleextractoroption.
5.
ClickFinish.
TheRuleAppprojectiscreatedandisaddedtothelistofprojectsintheRuleExplorer.
TheRuleAppprojecteditoropensautomatically.
LeavetheRuleAppprojecteditoropen,asyouusetheDeployoptioninthenextstep.
Tutorials19Task4:DeployingtheXOMandRuleAppYoudeployyourartifactssothatyoucanexecutetherulesetonz/OS.
TobeabletoexecuteyourrulesetwithzRuleExecutionServerforz/OS,youmustdeploytheCOBOLXOMandyourRuleApptozRuleExecutionServerforz/OS1.
IntheRuleAppprojecteditor,intheDeploymentpane,clickDeployaRuleApptooneormoreRuleExecutionServers.
2.
FortheRuleApp,acceptthedefaultIncrementRuleAppmajorversionandthenclickNext.
3.
SelectCreateatemporaryRuleExecutionServerconfigurationandenterthefollowingdetails:vURL:http://your.
server.
address:PORT/resvLogin:resAdminvPassword:resAdmin4.
ClickFinish.
UndertheConsoletab,youcancheckwhetheryourartifactshavebeensuccessfullydeployedtoRuleExecutionServer.
Ifso,youcanlogintotheRuleExecutionServerconsoleandviewthem.
Task5:BuildingyourCOBOLapplicationToexecuteyourruleset,youcalltheRuleAppfromyourCOBOLapplicationandpasstherulesetparameterstotheruleenginethatisrunninginsideaninstanceofzRuleExecutionServerforz/OS.
ThistutorialincludesacodesamplethatyoucanusetocallaRuleAppfromaCOBOLapplication.
Thefollowingprocedureexplainseachpartoftheclientcodeandthestepstofollow.
YoucanfindthesampleCOBOLapplicationin/studio/tutorials/cobol/bomstartrez/answer/SharingZMiniloan-execution/cobol/HBRMTUT2.
COBOLwhereistheDecisionServerinstallationdirectory.
1.
CopyinthezRuleExecutionServerforz/OSruntimecopybooks:01WS-REASON-CODES.
COPYHBRC.
COPYHBRWS.
HBRCcontainsconstantsthatyoucanuseinyourapplication.
HBRWScontainstheworkingstoragestructureusedforcallingHBRCONN,HBRRULE,andHBRDISC.
2.
Addtherulesetparameters:MOVELENGTHOFBorrowertoHBRA-RA-DATA-LENGTH(1)MOVE"Borrower"toHBRA-RA-PARAMETER-NAME(1)SETHBRA-RA-DATA-ADDRESS(1)toaddressofBorrowerMOVELENGTHOFLoantoHBRA-RA-DATA-LENGTH(2)MOVE"Loan"toHBRA-RA-PARAMETER-NAME(2)SETHBRA-RA-DATA-ADDRESS(2)toaddressofLoan3.
Specifytherulesettocall:MOVE''toHBRA-CONN-RULEAPP-PATH4.
ConnecttozRuleExecutionServerforz/OS:call'HBRCONN'usingHBRA-CONN-AREA5.
Calltherulesetandcheckthereturncodes:20IBMOperationalDecisionManager:GettingStartedTutorialscall'HBRRULE'usingHBRA-CONN-AREAIFHBRA-CONN-COMPLETION-CODE=HBR-CC-OKTHENDISPLAY'Successfulcall'ELSEDISPLAY'Error'HBRA-CONN-COMPLETION-CODEHBRA-CONN-REASON-CODE6.
DisconnectfromzRuleExecutionServerforz/OS:call'HBRDISC'usingHBRA-CONN-AREATask6:ExecutingtheCOBOLapplicationYouexecutetheCOBOLapplicationusingJCL.
YoucanfindaprebuiltversionofthetutorialwithyourDecisionServerinstallationonz/OS:v++HBRWORKDS++.
SHBRJCL(HBRMTUT2),theJCLusedtoexecutetheCOBOLprogramv++HBRWORKDS++.
SHBRCOBS(HBRMTUT2),theCOBOLprogramusedtoinvoketheruleexecutionv++HBRWORKDS++.
SHBRCOBC(HBRLDAT2),theCOBOLcopybookwhere++HBRWORKDS++representsthehigh-levelqualifierassignedtotheworkingdatasets.
1.
SubmitthesampleJCL.
2.
Checktheoutput.
Theoutputshouldlooksomethinglikethis:EXECUTIONRESULTBorrowerName:JohnLoanApproved:FRejectmessages:Theageexceedsthemaximum.
Youhavenowcompletedthetutorial.
Tutorial:GeneratingCOBOLcodefromacopybook-basedruleprojectInRuleDesigner,youcanwriterulesagainstnativeCOBOLdatastructures,andgenerateCOBOLcodeforruleexecution.
Note:TheCOBOLcodegenerationfeatureisdeprecatedinV8.
5.
1.
InV8.
5.
1,theCOBOLcodegenerationuserinterfaceisnotdisplayedinRuleDesignerbydefault.
Tocompletethistutorial,youmustenabletheinterfacemanually.
TodisplaytheCOBOLcodegenerationuserinterfaceinRuleDesigner,addthefollowingparameterinthefile/eclipse.
ini:-Dcobol.
code.
gen=trueWhatyouwilllearnInthistutorial,youlearnhowtoperformthesetasks:vImportanexistingruleprojectnamedcodegenminiloanTutorials21Ifyoualreadyhavearuleprojectnamedcodegenminiloaninyourworkspace,eitherswitchtoadifferentworkspaceorchooseadifferentname.
vAddtworulepackages:eligibilityandvalidationvCreateaXOMfromthesampleCOBOLcopybookprovidedwiththistutorialvCreateaBOMbasedontheXOMvAddmethodstotheBOMsothatyoucanspecifyconditionsandactionsinyourrules,andimplementtheminCOBOLvAddaruleflowtocontrolruleexecutionvWriteasetofrulesvGenerateCOBOLcodefromtheruleproject,inpreparationforruleexecutioninyourEnterpriseCOBOLapplicationTimerequiredThistutorialtakesaboutonehourtocomplete.
BeforeyoustartInthistopic,findoutwhatyouneedtoknowbeforeyoustartthetutorial.
RuleDesignerprovidesfeaturestobridgethegapbetweentwodistinctprogramminglanguages.
COBOLisastructuredprogramminglanguageandJavaisanobject-orientedprogramminglanguage.
AfictitiousloancompanyusesalargeCOBOLapplicationrunningonz/OStovalidateloanapplications.
Inthistutorial,thecompanydecidestousebusinessrulestotestcustomereligibilityfortheirloans.
ThecompanywantstosharerulescontainedintheCOBOLapplicationwithotherbusinessapplications,andmanagethechangesmadetotheserules.
ThecompanydecidestomigratethebusinesslogictoaBRMSbyprioritizingthemostcommonlysharedrules.
Therulesthatarechosendefinecustomereligibility.
Thissetofrulescalculatestheincomeverificationandminimumcreditamount.
Duringexecution,therulespassamessagetothemainprogramtonotifytheresultoftheinitialvalidation.
Inareallifescenario,youidentifyorcreateaCOBOLcopybookcontainingtheCOBOLdataitemsrequiredforthebusinessrules.
Youthenusethiscopybookasabasisforcreatingyourexecutionobjectmodel(XOM).
Inthistutorial,youusethesampleCOBOLcopybookprovided,miniloan.
cpy.
Theminiloan.
cpycopybookcontainsthefollowingdataitems:01Borrower.
05namePICX(20).
05creditScorePIC9(10).
05yearlyIncomePIC9(10).
05agePIC9(3).
88teenagerVALUE0THRU17.
88adultVALUE18THRU60.
88retiredVALUE61THRU150.
01Loan.
05amountPIC9(10).
05yearlyInterestRatePIC99.
05yearlyRepaymentPIC9(10).
05effectDatePICX(8).
05approvedPICX.
05messageCountPIC9(2).
22IBMOperationalDecisionManager:GettingStartedTutorials05messagesPICX(60)OCCURS0TO99TIMESDEPENDINGONmessageCount.
Fromthiscopybook,youwillgeneratenativeCOBOLcodetoexecuteruleswithinanEnterpriseCOBOLapplication.
Startthistutorial:"Task1:Importinganexistingruleproject"onpage24.
WhatyouwilllearnInthistutorial,youlearnhowtoperformthesetasks:vImportanexistingruleprojectnamedcodegenminiloanIfyoualreadyhavearuleprojectnamedcodegenminiloaninyourworkspace,eitherswitchtoadifferentworkspaceorchooseadifferentname.
vAddtworulepackages:eligibilityandvalidationvCreateaXOMfromthesampleCOBOLcopybookprovidedwiththistutorialvCreateaBOMbasedontheXOMvAddmethodstotheBOMsothatyoucanspecifyconditionsandactionsinyourrules,andimplementtheminCOBOLvAddaruleflowtocontrolruleexecutionvWriteasetofrulesvGenerateCOBOLcodefromtheruleproject,inpreparationforruleexecutioninyourEnterpriseCOBOLapplicationTimerequiredThistutorialtakesaboutonehourtocomplete.
SoftwarerequirementsTousethistutorialyoumusthaveRuleDesignerinstalledonWindowsorLinux.
Note:YoucanalsowriteandmanagerulesusingDecisionCenter.
However,thistutorialdoesnotincludetasksusingDecisionCenter.
WhatyouneedtoknowTofollowthistutorial,youmusthaveabasicunderstandingoftheEnterpriseCOBOLprogramminglanguage,knowhowtobuildaCOBOLcopybook,andhowtocompile,link,andexecuteaCOBOLprogram.
YoumustalsobefamiliarwithRuleDesignerandunderstandsomebasicBusinessRuleManagementSystem(BRMS)termsandconcepts,suchas:vExecutionobjectmodel(XOM)vBusinessobjectmodel(BOM)vVerbalizationvRulesetvRulesetparametervBusinessActionLanguagevRuleflowTutorials23YoucanfindallthesetermsintheGlossary.
ForinformationaboutspecialconsiderationsforruleexecutioninCOBOLapplications,seeCOBOLconsiderationsforruleapplicationdevelopment.
ThistutorialisonlyavailableinAmericanEnglish.
Theruleprojectcontainingtherulestoimportinthistutorialisonlyprovidedintheen_USlocale.
Ifen_USisnotyourdefaultlocale,youcanusethesamplesconsoleshortcut:FromtheStartmenu,clickAllPrograms>IBM>>SampleServer>SamplesConsole(en_US).
DirectorystructureAllthefilesforthistutorialarecontainedinthefollowingdirectory:/studio/tutorials/cobol/cobolcodegen,whereistheDecisionServerinstallationdirectory.
ThistutorialprovidesasampleCOBOLcopybooknamedminiloan.
cpyforyoutouse.
Thecopybookisstoredin:/studio/tutorials/cobol/cobolcodegen/start/codegenminiloan-execution/copy/miniloan.
cpyStartthistutorial:"Task1:Importinganexistingruleproject.
"Task1:ImportinganexistingruleprojectTofocusonthemainpurposeofthetutorial,youimportanexistingruleprojectratherthancreateone.
Thistutorialprovidesanexistingruleproject,namedcodegenminiloan,whichhasacopybookfromwhichyouwanttogenerateCOBOLcode.
Ifyoualreadyhavearuleprojectwiththesamename,switchtoanewworkspacebeforestartingthistask.
Toimportanexistingruleproject:1.
Ifnecessary,switchtoanewworkspace:a.
InRuleDesigner,ontheFilemenu,clickSwitchWorkspace>Other.
b.
OntheWorkspaceLauncherpage,intheWorkspacefield,changethenameofthecurrentworkspacetoanewworkspacename.
c.
ClickOK.
2.
Toimportaruleprojectfromthesamplesconsole,clickWindow>OpenPerspective>Other.
3.
IntheOpenPerspectivedialog,clickSamplesConsole,andthenclickOK.
TheSamplesandTutorialsviewisdisplayed.
4.
Inthisperspective,expandtheRuleDesignersectionifnecessary,andthenclickTutorials>COBOL>GeneratingCOBOLcodefromacopybook-basedruleproject.
5.
Understart,clickImportprojects.
ThecodegenminiloanruleprojectisaddedtothelistofprojectsintheRuleExplorer.
24IBMOperationalDecisionManager:GettingStartedTutorialsTask2:GeneratingaXOMfromaCOBOLcopybookToexecuteyourrulesinaCOBOLapplication,youuseaCOBOLcopybookasthebasisforyourXOM.
ACOBOLXOMprovidesthenecessaryCOBOLtoJavamappingsothatyoucanexecuteyourrulesinaCOBOLapplication.
TogenerateaCOBOLXOM:1.
IntheDesignpartoftheRuleProjectMap,clickImportXOMandthenselectCOBOLExecutionObjectModel.
Alternatively,right-clickyourruleprojectandthenselectProperties>COBOLManagement>COBOLExecutionObjectModel.
OnthePropertiespage,intheCOBOLExecutionObjectModelpane,clickAdd.
2.
OntheImportCOBOLXOMpage,intheExecutionObjectModelNamefield,typeanamefortheXOM.
Forexample,codegenminiloan-xom.
3.
ClickAdd.
4.
IntheCOBOLCopybookpage,clickFileSystemandthennavigatetotheminiloancopybook.
See"Beforeyoustart"onpage22forthecopybooklocation.
5.
Selectminiloan.
cpy,andthenclickOK.
6.
ClickOK.
7.
OntheImportCOBOLXOMpage,clickNexttodisplayasummaryofthedefaultJavatypesandclassattributesderivedfromeachCOBOLiteminthecopybook.
8.
ChangeapprovedfromtypeStringtoboolean,usingthetypeconverter:a.
ExpandtheLoanitem.
b.
Right-clicktherowthatcontainstheapproveddataitemandthenclickAddconverter.
c.
OntheConfigureConverterSettingspage,selectthebooleanconverter.
d.
ForthebooleanTruevalue,typeTandfortheFalsevalue,typeF.
e.
ClickOK.
Attention:IfyouchangethedefaultmappingsandthensubsequentlyreimporttheXOM,youloseyourconfiguredvalues.
9.
ClickFinishtoclosetheConfigureCOBOLXOMMappingpageandcreatetheCOBOLXOM.
YouseethenewXOMonthePropertiespageintheCOBOLExecutionObjectModelwindow.
10.
ClickOKtoclosethePropertieswindow.
NoticethefollowingadditionintheRuleExplorerview:aminiloanJavaXOMproject.
Task3:CreatingaBOMfromtheCOBOLXOMYoucreateaBOMinRuleDesignerbasedonyourCOBOLXOM.
Tutorials25Inthistask,youcreateaBOMinRuleDesigner,basedontheCOBOLXOMyoucreatedintheprevioustask.
TocreateaBOMfromtheCOBOLXOM:1.
IntheDesignpartoftheRuleProjectmap,clickCreateBOM.
Alternatively,intheRuleExplorerview,selectthebomfolderinyourruleprojectandthen,ontheFilemenu,clickNew>BOMEntry.
2.
IntheNewBOMEntrywizard,intheNamefield,acceptthedefaultnamefortheBOMentry:model.
3.
MakesurethattheoptionCreateaBOMentryfromaXOMisselectedandthenclickNext.
4.
OntheNewBOMEntryscreen,intheChooseaXOMentryfield,clickBrowseXOM,selectcodegenminiloan-xom,andthenclickOK.
5.
UnderSelectclasses,selectthexompackage.
Whenyouselectthepackage,youautomaticallyselectalltheclassesitcontains.
6.
ClickNext.
OntheBOMverbalizationpage,selecttheAllMethodscheckbox.
Thisoptionmakessurethatallthemethodsareverbalized,inadditiontotheelementsyoualreadyselected.
7.
ClickFinish.
IntheRuleExplorerview,thebomfoldercontainsanewBOMentry.
8.
IntheRuleExplorer,double-clickbom>modeltoopentheBOMEditor.
9.
IntheBOMEditor,expandthexompackage.
YouseethattheBOMhastwoclassestomatchtheBorrowerandLoanclassesintheXOM.
10.
Double-clicktheBorrowerclasstoviewthedefaultverbalization:borrower.
ThedefaultverbalizationfortheLoanclassisloan.
Note:ThedefaultverbalizationisinAmericanEnglish.
IfyouareworkinginalocalizedversionofRuleDesigner,youcanverbalizetheBorrowerandLoanclassesinthelanguageofyourlocale,usingtheEditTermdialog.
TodisplaytheEditTermdialog,intheRuleExplorerdouble-clicktheclassormemberyouwanttomodify.
IntheVerbalizationsectionoftheBOMEditor,clickEdit.
Task4:DeclaringrulesetparametersRulesetparametersdefinethedatathatissentbetweenthegeneratedCOBOLprogramandtheCOBOLcallingprogram.
RulesetparametersprovidethemeanstoexchangedatabetweenthegeneratedCOBOLprogramandthecallingapplication.
Youdefinerulesetparametersbyname,type,anddirection.
Inthistutorial,youmakeadecisiononthestatusofaloan,soyoucreaterulesetparametersfortheBorrowerandLoanclasses.
YoumustusetheIN_OUTdirectionforbothparameters.
ThevalueoftheIN_OUTparameterisprovidedasinputtothe26IBMOperationalDecisionManager:GettingStartedTutorialscallingapplicationonexecution.
Itcanbemodifiedbythecallingapplicationandprovidedasoutputatexecutioncompletion.
Note:YoucanuseonlytheIN_OUTparameterforCOBOLcodegeneration.
Todeclarerulesetparameters:1.
IntheDesignpartoftheRuleProjectmap,clickDefineparameters.
Alternatively,intheRuleExplorer,right-clickyourruleprojectandthenclickProperties.
2.
InthetypefilterpaneofthePropertiesdialog,selectRulesetParameters.
3.
OntheRulesetParameterspage,selecttheEnabletypecheckforCOBOLXOMcheckbox.
ThisselectionfilterstherulesetparametertypesyoucanuseforaruleprojectthathasaCOBOLXOM.
4.
Todefinetheborrowerparameter,clickAddandthenchangethedefaultvaluesasfollows:a.
IntheNamecolumn,typeborrower.
b.
IntheTypecolumn,clickthe.
.
.
buttontodisplaytheTypesdialog,andthendouble-clicktheBorrowertypeintheMatchingtypesbox.
Thexom.
BorrowertypeisdisplayedintheTypecolumn.
c.
IntheDirectioncolumn,usethedefaultIN-OUTdirection.
d.
IntheVerbalizationcolumn,typetheborrower.
5.
Todefinetheloanparameter,clickAdd.
Yourrulesetparametersettingslooklikethis:NameTypeDirectionDefaultValueVerbalizationborrowerxom.
BorrowerIN_OUTtheborrowerloanxom.
LoanIN_OUTtheloana.
IntheNamecolumn,typeloan.
b.
IntheTypecolumn,clickthe.
.
.
buttontodisplaytheTypesdialog,andthendouble-clicktheLoantypeintheMatchingtypesbox.
Thexom.
LoantypeisdisplayedintheTypecolumn.
c.
IntheDirectioncolumn,keepthedefaultIN_OUTdirection.
d.
IntheVerbalizationcolumn,typetheloan.
6.
ClickOKtosave.
Task5:ImplementingBOMmethodsinCOBOLYouaddBOMmethodstoaBOMclasstohelpverbalizeyourrules.
YouthenmapthemtotheXOMtokeeptheXOMsynchronizedwiththeBOM,andimplementthemethodsinCOBOLsothatthegeneratedCOBOLprogramcancallthemethods.
Youusemethodstospecifyconditionsandactionsinyourrules.
YoucreatemethodsinRuleDesigner.
WhenyouaddmethodstotheBOM,youcreatemembersintheBOMthatarenotdefinedintheXOM.
Thismismatchcreateserrorsinyourruleproject.
Toavoidthismismatch,youmapthenewmethodstotheXOM,usingtheBOMEditor.
Tutorials27Note:YoudonotmakeanychangesdirectlyintheXOM.
YoumustalsoimplementthemethodsinCOBOLsothat,whenyougeneratetheCOBOLprogramtoexecutetherules,thegeneratedCOBOLprogramcancallthemethods.
Inthistask,youaddthefollowingmethodstoyourclasses,verbalizethem,mapthemtotheXOM,andthenimplementtheminCOBOL.
TheorderinwhichyoumapthemethodsorimplementtheminCOBOLisnotimportant.
ClassMethodDescriptionLoanpublicvoidaddMessage(Stringmsg)Defineswhatisneededtopassinformationfromtherules.
LoanpublicvoidrejectIdentifieswhetherornottheloanapplicationwasrejected.
BorrowerpubliclongcomputeIncomeAfterTaxComputesthenetincomeoftheborrower.
ToimplementCOBOLmethods:1.
StartbyaddingtheaddMessagemethod.
IntheRuleExplorer,expandtheBOMmodelandthendouble-clicktheLoanclass.
2.
OntheClasspageoftheBOMeditor,intheMemberssection,clickNew.
3.
OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTypeaddMessageMethodtypeTypevoid4.
IntheNewMemberdialog,ontheMemberpage,clickAddandthencompletetheMethodArgumentdialogasfollows.
FieldDataentryNameTypemsgMethodtypeTypejava.
lang.
String5.
ClickOK.
6.
ClickFinishtoclosetheNewMemberdialog.
OntheClasspageoftheBOMeditor,theMemberslistnowincludestheaddMessagemethod.
7.
Double-clicktheaddMessagemethod,andintheMemberVerbalizationsectionoftheBOMEditor,clickCreatetoviewthedefaultverbalization:add{0}tothemessagesof{this}Youarenotgoingtochangethisverbalization.
8.
ScrolldowntotheBOMtoXOMmappingsectionoftheBOMEditorandthentypethefollowingJavacode:this.
messages.
add(msg);28IBMOperationalDecisionManager:GettingStartedTutorials9.
IntheCOBOLMethodsection,clickCreateamappedmethod.
ThisoptiongeneratestheCOBOLdatatypedefinitionsforthemethodanddisplaysthemintheMappedMethodtable.
10.
ChangethedefaultlengthformsgfromX(20)toX(60).
11.
IntheCOBOLMethodBodyEditor,typethefollowingCOBOLcodetoimplementthemethod.
COMPUTEmessageCount=messageCount+1MOVE{msg}TOmessages(messageCount)12.
Saveyourwork.
13.
AddtherejectmethodtotheLoanclassandthensaveit:OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTyperejectMethodtypeTypevoidYoudonotaddparameterstothismethod.
Thefollowingtableshowsyouwhattoenterfortheverbalization,BOMtoXOMmapping,andCOBOLimplementation.
VerbalizationBOMtoXOMmappingCOBOLmethodAcceptthedefaultverbalization:reject{this}.
Typethefollowingcode:this.
approved=false;Implementamappedmethod:MOVE"F"TOapproved14.
AddthecomputeIncomeAfterTaxmethodtotheBorrowerclassandthensaveit:OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTypecomputeIncomeAfterTaxMethodtypeTypelongYoudonotaddparameterstothismethod.
Thefollowingtableshowsyouwhattoenterfortheverbalization,BOMtoXOMmapping,andCOBOLimplementation.
VerbalizationBOMtoXOMmappingCOBOLmethodChangetheverbalizationtotheincomeaftertaxof{this}.
Typethefollowingcode:if(this.
yearlyIncomeRulePackage.
b.
IntheNewRulePackagewizard,inthePackagefield,typevalidationandthenclickFinish.
ThenewvalidationrulepackagedisplaysintheRuleExplorer.
c.
Createanotherpackageandnameiteligibility.
Yourruleprojectnowcontainstwopackagesforstoringyourrules.
2.
Tocreatetheruleflow,intheRuleExplorer,selectyourruleprojectandthenclickNewRuleflowontheRuleDesignertoolbar.
3.
IntheNewRuleflowdialog,intheNamefield,typemainflowandthenclickFinish.
TheRuleflowEditoropens,displayingtheDiagrampage.
4.
ClickthestartnodeintheRuleflowpaletteandthenclicktheDiagrampage.
5.
ClicktheCreatearuletaskiconinthepaletteandthenclicktheDiagrampage.
Anewruletaskiscreated.
6.
ClickthenewruletaskandthenmakethefollowingentriesonthePropertiestab:vChangetheIDtovalidationvForRuleExecution>Algorithm,selectSequential7.
OnthePropertiestab,clickRuleSelectionandthenclickEdit.
8.
IntheSelectRulesdialog,usethearrowbuttontomovethevalidationpackagetothesidepaneandthenclickOK.
9.
Createasecondruletasknamedeligibilityandthensetitspropertiesasforthevalidationtask.
10.
MovetheeligibilitypackagetothesidepaneoftheSelectRulesdialogandthenclickOK.
30IBMOperationalDecisionManager:GettingStartedTutorials11.
Addanendnodetotheruleflow.
12.
UsingtheCreateatransitioniconinthepalette,createthefollowingtransitions:vFromthestartpointtothevalidationtaskvFromthevalidationtasktotheeligibilitytaskvFromtheeligibilitytasktotheendpoint13.
AligntheruleflowbyclickingtheLayoutAllNodesicon.
14.
Savetheruleflow.
Yourruleflowlookslikethis.
Task7:WritingactionrulesYouwriterulesusingdedicatededitorsandtheBusinessActionLanguage(BAL).
Inthistask,youwritefiveactionrulesandputthemintotherelevantpackage.
YoucanwriterulesinRuleDesigner,orinDecisionCenter.
IfyouuseDecisionCenter,makesurethatyousynchronizewithRuleDesignerbeforeyoudoso.
YoucreatethefollowingrulesinRuleDesignertotheeligibilityandvalidationpackages:PackagenameRulenameeligibilityMinimumCreditScoreMinimumAmountMinimumNetIncomevalidationMaximumAgeReqMaximumAmountTutorials31Note:Ifyouareworkinginalocalizedversionoftheproduct,makesurethatyouhaveverbalizedtheBorrowerandLoanclassesinthelanguageforyourlocalebeforeyoustartwritingrules.
Tocreatetheactionrules:1.
CreatetheMinimumCreditScorerule:a.
Intheruleproject,right-clicktheeligibilitypackageandthenclickNew>ActionRule.
b.
IntheNamefield,typeMinimumCreditScore.
c.
ClickFinish.
ThenewactionruledisplaysintheRuleExplorerviewandtheIntelliruleEditoropens.
Youcanswitchtotheguidededitorifyouprefer.
2.
Writetheeligibility.
MinimumCreditScoreruleasfollows:ifthecreditscoreof'theborrower'islessthan200thenadd"Creditscorebelow200"tothemessagesof'theloan';reject'theloan';3.
Intheeligibilitypackage,addthefollowingrules:NameRuleMinimumAmountiftheyearlyrepaymentof'theloan'ismorethantheyearlyincomeof'theborrower'*0.
3thenadd"ToobigDebt-To-Incomeratio"tothemessagesof'theloan';reject'theloan';MinimumNetIncomeiftheincomeaftertaxof'theborrower'islessthan24000thenadd"Theyearlyincomeislowerthanthebasicrequest"tothemessagesof'theloan';reject'theloan';4.
Inthevalidationpackage,addthefollowingrules:NameRuleMaximumAgeReqiftheageof'theborrower'ismorethan65thenadd"Theageexceedsthemaximum.
"tothemessagesof'theloan';reject'theloan';MaximumAmountiftheamountof'theloan'ismorethan1000000thenadd"Theloancannotexceed1000000"tothemessagesof'theloan';reject'theloan';5.
Saveyourwork.
Relatedinformation:RuleauthoringforCOBOLcompatibilityTask8:PreparingforruleexecutionToprepareforruleexecution,yougeneratetheCOBOLprogramforruleexecution.
32IBMOperationalDecisionManager:GettingStartedTutorialsInthistask,yougeneratetheCOBOLcodethatwillbeusedtoexecutetheruleswithinanEnterpriseCOBOLapplication.
ThistaskdescribeshowtogeneratethecodeinRuleDesigner,butyoucanuseDecisionCenter,oryoucanuseanAnttask.
ForinformationaboutgeneratingtheCOBOLcodeusingDecisionCenterorAnt,seeGeneratingCOBOLcode,andGeneratingCOBOLcodeusingAnt.
Note:Theselinkspointtothedistributedplatformpartofthisinformationcenter.
YoucanusetheCICSusageoptiontogenerateaCOBOLprogramthatcanrunwithCICSchannelsandcontainers.
YouconfiguretheCICSchannelandcontainernamesinRuleDesigner.
ThistaskdescribesthebasicstepsforgeneratingtheCOBOLcodeanddoesnotcovertheCICSusageoption.
ForinformationaboutconfiguringthegeneratedcodeforCICS,seeGeneratingCOBOLcodeinRuleDesignerinthedistributedplatformpartofthisinformationcenter.
TogeneratetheCOBOLcodeinRuleDesigner:1.
IntheRuleExplorer,right-clickthecodegenminiloanprojectandthenclickCOBOLCodeGeneration>GenerateCOBOLCode.
2.
IntheGenerateCOBOLCodewizard,intheCOBOLProgramIDfield,typeminirule.
3.
IntheOutputfilefield,specifywhereyouwanttostorethegeneratedCOBOLcode:vTostorethecodeinyourworkspace,clickWorkspaceandthen,ontheSaveAspage,selecttheparentfolderandtypeafilename.
vTostorethecodeinyourfilesystem,clickFileSystem,navigatetotherequireddirectory,typeafilenameintheFilenamefieldandthenclickOpen.
Forexample:/codegenminiloan/batch/minicbl.
cbl,whereisyourworkingdirectory.
4.
ClickFinish.
TheCOBOLcodegeneratorgeneratesaCOBOLprogramcontainingyourruleprojectrulesets,convertedtoCOBOLcode.
5.
AttheCOBOLcodegeneratedsuccessfullyprompt,clickOK.
6.
Navigatetoyouroutputfileandhavealookatthecodeyouhavegenerated.
ThistutorialprovidesafilecontainingasampleCOBOLprogramthatwasgeneratedagainstthecodegenminiloandatausedinthistutorial.
7.
Ifyouwanttocompareyouroutputfilewiththesampleoutputfile,openthesamplefilein:/tutorials/cobol/cobolcodegen/answer/codegenminiloan-execution/cobol/minirule.
cbl,whereistheRuleDesignerinstallationdirectory.
Note:Thesampleoutputfilerelatesonlytoen_USlocale.
Omitthisstepifyouareworkinginadifferentlocale.
Tutorials33Inareallifescenario,youpasstheCOBOLprogramtothez/OSapplicationandcompileitwiththecallingprogram.
Itisthenreadyfortestingandexecution.
Whenyouexecutetheprogramgeneratedfromthistutorial,yougetthefollowingresult:EXECUTIONRESULTBorrowerName:JohnLoanApproved:FRejectmessages:Theageexceedsthemaximum.
Themaincallingprogramforthistutorialisminimain.
cbl.
Youcanseethisfilein/tutorials/cobol/cobolcodegen/answer/codegenminiloan-execution/cobol/minimain.
cbl.
Youhavenowcompletedthetutorial.
DecisionCentertutorialsDevelopyourskillswithtutorialsforDecisionCenter.
TutorialsinstalledwithDecisionCenteronadistributedplatformdemonstratefeaturesthatarealsoapplicableonz/OS.
TheDecisionCentertutorialsarepre-configuredtorunonthesampleserver.
However,thesameusertasksarerelevantwhenyouauthorandtestyourrulesonz/OS,andadministerDecisionCenteronWebSphereApplicationServerforz/OS.
Therefore,thefollowingtutorialsandtaskscanbeofinteresttoyou.
Note:Youcaninstallthesampleserveronadistributedplatformandfollowthetutorialsonthatcomputer.
YoucandeploythetutorialapplicationsonaninstanceofWebSphereApplicationServerforz/OSandfollowthetasksthatapplytobothenvironments,oryoucansimplyreadthedocumentationtounderstandthetasksandtofindoutwhatstepsareinvolved.
Table2.
TutorialsunderDecisionCenterthatarealsorelevantonz/OSTutorialTasksEditingactionrulesanddecisiontablesTasks1-3UsingsmartfoldersandqueriesTasks1-4AnalyzingrulesTasks1-6TestingasetofrulesTasks1-4ManagingreleasesTasks1-3ImplementingpermissionsTasks1-534IBMOperationalDecisionManager:GettingStartedTutorialsNoticesThisinformationwasdevelopedforproductsandservicesofferedintheU.
S.
A.
IBMmaynotoffertheproducts,services,orfeaturesdiscussedinthisdocumentinothercountries.
ConsultyourlocalIBMrepresentativeforinformationontheproductsandservicescurrentlyavailableinyourarea.
AnyreferencetoanIBMproduct,program,orserviceisnotintendedtostateorimplythatonlythatIBMproduct,program,orservicemaybeused.
Anyfunctionallyequivalentproduct,program,orservicethatdoesnotinfringeanyIBMintellectualpropertyrightmaybeusedinstead.
However,itistheuser'sresponsibilitytoevaluateandverifytheoperationofanynon-IBMproduct,program,orservice.
IBMmayhavepatentsorpendingpatentapplicationscoveringsubjectmatterdescribedinthisdocument.
Thefurnishingofthisdocumentdoesnotgrantyouanylicensetothesepatents.
Youcansendlicenseinquiries,inwriting,to:IBMUnitedKingdomLaboratories,MailPoint151,HursleyPark,Winchester,Hampshire,EnglandSO212JNForlicenseinquiriesregardingdouble-bytecharacterset(DBCS)information,contacttheIBMIntellectualPropertyDepartmentinyourcountryorsendinquiries,inwriting,to:IntellectualPropertyLicensingLegalandIntellectualPropertyLawIBMJapan,Ltd.
19-21,Nihonbashi-Hakozakicho,Chuo-kuTokyo103-8510,JapanThefollowingparagraphdoesnotapplytotheUnitedKingdomoranyothercountrywheresuchprovisionsareinconsistentwithlocallaw:INTERNATIONALBUSINESSMACHINESCORPORATIONPROVIDESTHISPUBLICATION"ASIS"WITHOUTWARRANTYOFANYKIND,EITHEREXPRESSORIMPLIED,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFNON-INFRINGEMENT,MERCHANTABILITYORFITNESSFORAPARTICULARPURPOSE.
Somestatesdonotallowdisclaimerofexpressorimpliedwarrantiesincertaintransactions,therefore,thisstatementmaynotapplytoyou.
Thisinformationcouldincludetechnicalinaccuraciesortypographicalerrors.
Changesareperiodicallymadetotheinformationherein;thesechangeswillbeincorporatedinneweditionsofthepublication.
IBMmaymakeimprovementsand/orchangesintheproduct(s)and/ortheprogram(s)describedinthispublicationatanytimewithoutnotice.
Anyreferencesinthisinformationtonon-IBMWebsitesareprovidedforconvenienceonlyanddonotinanymannerserveasanendorsementofthoseCopyrightIBMCorp.
2008,201235websites.
ThematerialsatthosewebsitesarenotpartofthematerialsforthisIBMproductanduseofthosewebsitesisatyourownrisk.
IBMmayuseordistributeanyoftheinformationyousupplyinanywayitbelievesappropriatewithoutincurringanyobligationtoyou.
Licenseesofthisprogramwhowishtohaveinformationaboutitforthepurposeofenabling:(i)theexchangeofinformationbetweenindependentlycreatedprogramsandotherprograms(includingthisone)and(ii)themutualuseoftheinformationwhichhasbeenexchanged,shouldcontact:IBMUnitedKingdomLaboratories,MailPoint151,HursleyPark,Winchester,Hampshire,EnglandSO212JNSuchinformationmaybeavailable,subjecttoappropriatetermsandconditions,includinginsomecases,paymentofafee.
ThelicensedprogramdescribedinthisdocumentandalllicensedmaterialavailableforitareprovidedbyIBMundertermsoftheIBMCustomerAgreement,IBMInternationalProgramLicenseAgreementoranyequivalentagreementbetweenus.
Anyperformancedatacontainedhereinwasdeterminedinacontrolledenvironment.
Therefore,theresultsobtainedinotheroperatingenvironmentsmayvarysignificantly.
Somemeasurementsmayhavebeenmadeondevelopment-levelsystemsandthereisnoguaranteethatthesemeasurementswillbethesameongenerallyavailablesystems.
Furthermore,somemeasurementsmayhavebeenestimatedthroughextrapolation.
Actualresultsmayvary.
Usersofthisdocumentshouldverifytheapplicabledatafortheirspecificenvironment.
Informationconcerningnon-IBMproductswasobtainedfromthesuppliersofthoseproducts,theirpublishedannouncementsorotherpubliclyavailablesources.
IBMhasnottestedthoseproductsandcannotconfirmtheaccuracyofperformance,compatibilityoranyotherclaimsrelatedtonon-IBMproducts.
Questionsonthecapabilitiesofnon-IBMproductsshouldbeaddressedtothesuppliersofthoseproducts.
Thisinformationcontainsexamplesofdataandreportsusedindailybusinessoperations.
Toillustratethemascompletelyaspossible,theexamplesincludethenamesofindividuals,companies,brands,andproducts.
Allofthesenamesarefictitiousandanysimilaritytothenamesandaddressesusedbyanactualbusinessenterpriseisentirelycoincidental.
COPYRIGHTLICENSE:Thisinformationcontainssampleapplicationprogramsinsourcelanguage,whichillustrateprogrammingtechniquesonvariousoperatingplatforms.
Youmaycopy,modify,anddistributethesesampleprogramsinanyformwithoutpaymenttoIBM,forthepurposesofdeveloping,using,marketingordistributingapplicationprogramsconformingtotheapplicationprogramminginterfacefortheoperatingplatformforwhichthesampleprogramsarewritten.
Theseexampleshavenotbeenthoroughlytestedunderallconditions.
IBM,therefore,cannotguaranteeor36IBMOperationalDecisionManager:GettingStartedTutorialsimplyreliability,serviceability,orfunctionoftheseprograms.
Thesampleprogramsareprovided"ASIS",withoutwarrantyofanykind.
IBMshallnotbeliableforanydamagesarisingoutofyouruseofthesampleprograms.
Eachcopyoranyportionofthesesampleprogramsoranyderivativework,mustincludeacopyrightnoticeasfollows:(yourcompanyname)(year).
PortionsofthiscodearederivedfromIBMCorp.
SamplePrograms.
CopyrightIBMCorp.
_entertheyearoryears_.
TrademarksIBM,theIBMlogo,andibm.
comaretrademarksorregisteredtrademarksofInternationalBusinessMachinesCorp.
,registeredinmanyjurisdictionsworldwide.
OtherproductandservicenamesmightbetrademarksofIBMorothercompanies.
AcurrentlistofIBMtrademarksisavailableontheWebat"Copyrightandtrademarkinformation"atwww.
ibm.
com/legal/copytrade.
shtml.
LinuxisaregisteredtrademarkofLinusTorvaldsintheUnitedStates,othercountries,orboth.
Microsoft,Windows,andtheWindowslogoaretrademarksofMicrosoftCorporationintheUnitedStates,othercountries,orboth.
UNIXisaregisteredtrademarkofTheOpenGroupintheUnitedStatesandothercountries.
JavaandallJava-basedtrademarksandlogosaretrademarksorregisteredtrademarksofOracleand/oritsaffiliates.
Notices3738IBMOperationalDecisionManager:GettingStartedTutorialsIndexAactionrule11,31BBOMcreating6,26BOMmethodsimplementing8implementinginCOBOL27BOMtoXOMmapping8,27businessobjectmodel(BOM)creatingfromCOBOLXOM6,26CCOBOLapplicationexecutingtheruleset14,20COBOLapplicationexecution21COBOLcodegeneration33COBOLprogramexecution15COBOLXOMfromCOBOLcopybook5,25Ddeclaringrulesetparameters7,26deployingartifacts13,20EexecutingaCOBOLapplication21executingaCOBOLprogram15executingaruleset14,20GgeneratingCOBOLcode33Mmarshallerdeploying20Rruleexecution13creatingaRuleApp13deployingartifacts13viewingdeployedartifacts14rulepackage11,31RuleAppprojectdeploying20RuleApp,creating13ruleflowscreating10,30rulesetexecutionCOBOLapplication14,20rulesetparametersdeclaring,intutorial7,26Vviewingdeployedartifacts14XXOMdeploying20CopyrightIBMCorp.
2008,20123940IBMOperationalDecisionManager:GettingStartedTutorialsPrintedinUSA

TabbyCloud周年庆&七夕节活动 美國INAP 香港CN2

TabbyCloud迎来一周岁的生日啦!在这一年里,感谢您包容我们的不足和缺点,在您的理解与建议下我们也在不断改变与成长。为庆祝TabbyCloud运营一周年和七夕节,TabbyCloud推出以下活动。TabbyCloud周年庆&七夕节活动官方网站:https://tabbycloud.com/香港CN2: https://tabbycloud.com/cart.php?gid=16购买链...

韩国服务器租用优惠点评大全

韩国服务器怎么样?韩国云服务器租用推荐?韩国服务器距离中国近,有天然的地域优势,韩国服务器速度快而且非常稳定!有不少有亚洲市场的外贸公司选择韩国服务器开拓业务,韩国服务器因自身的优势也受到不少用户的青睐。目前的IDC市场上,韩国、香港、美国三个地方的服务器几乎占据了海外服务器的百分之九十以上。韩国服务器相比美国服务器来说速度更快,而相比香港机房来说则带宽更充足,占用市场份额非常大。那么,韩国服务器...

Tudcloud(月付7.2美元),香港VPS,可选大带宽或不限流量

Tudcloud是一家新开的主机商,提供VPS和独立服务器租用,数据中心在中国香港(VPS和独立服务器)和美国洛杉矶(独立服务器),商家VPS基于KVM架构,开设在香港机房,可以选择限制流量大带宽或者限制带宽不限流量套餐。目前提供8折优惠码,优惠后最低每月7.2美元起。虽然主机商网站为英文界面,但是支付方式仅支付宝和Stripe,可能是国人商家。下面列出部分VPS主机套餐配置信息。CPU:1cor...

parameterdirection为你推荐
qq讨论组qq讨论组是什么意思?cornerradius如何给TextView加个圆角?蘑菇街美丽说蘑菇街、美丽说这类网站前期是怎么推广的?神雕侠侣礼包大全神雕侠侣手游版四重大礼包怎么得到啊?怎么点亮qq空间图标QQ空间图标怎么点亮?商标注册查询官网怎么查商标是否注册成功宕机何谓宕机?iphone6上市时间iphone6什么时候上市,价格是多少?什么是云平台谁能简单说一下什么是云平台啊?微信怎么看聊天记录怎样才能调取微信聊天记录
青岛虚拟主机 宿迁服务器租用 vps是什么意思 如何注销域名备案 花生壳域名贝锐 hostigation 独享100m buyvm themeforest 腾讯云数据库 godaddy支付宝 http500内部服务器错误 win8.1企业版升级win10 架设服务器 工作站服务器 沈阳主机托管 成都主机托管 带宽测试 杭州电信宽带 聚惠网 更多