Upload
ca-technologies
View
19
Download
1
Embed Size (px)
Citation preview
World®’16
ModernizingtheCADatacom®Data– SQLAccessPartIKevinShuma,VPProductManagementCATechnologies
MFX95SA
MAINFRAMEANDWORKLOADAUTOMATION
2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
ForInformationalPurposesOnlyTermsofthisPresentation
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
ThisisatwopartsessionthatprovidesanoverviewofstepsnecessarytotakemakeCADatacom®availableformodernapplicationsviaSQLandserver.
FormanyshopstheirCADatacom®/DBenvironmentwascreatedbeforetheimplementationofSQL.ThissessionwillwalkthroughthestepsnecessarytomakeallthetheirdataSQLaccessibleusingCADatacom®SQL.FromthereweaddtheODBCandJDBCsupportprovidedbyCADatacom®server.Oncecompletedyouwillhavedatathatisfullyaccessibletomodernapplicationsdevelopmentenvironments.
KevinShuma
CATechnologiesVP,ProductManagement
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Agenda
WHYSHOULDWEIMPLEMENTSQL?
IMPLEMENTINGSQLACCESS
LEGACYDATASTRUCTURES
SQLCOLUMNREPORT
SUMMARY
1
2
3
4
5
5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
WhyshouldweimplementSQL?
§ SQLprovidesthebasicaccesspointformodernapplications– ODBC/JDBCuseSQLunderthecovers
§ ImplementingSQLaccessontraditionaldata– Opensupcriticalbusinessdatatonewapplicationsandbusiness
functions– Doesnotinterferewithexistingtraditionalapplications
§ Peacefulcoexistenceismuchpreferredtorevolutionarychange(rewrites)
§ ImplementingSQLconstraintsontraditionaldata– Allowsbusinessrulestobeenforcedwithoutrequiringadditionalcoding
ModernizationistheKeytoGrowthinToday’sWorld
6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
CADatacom®SQLandCADatacom®Server
CADatacomdataandbusiness
logicWeband
ApplicationServers
Webandmobileapps
ModernizationWithCoexistence
Batch
Traditionalapps
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImplementingSQL- AUTHIDs
§ AUTHIDsmustbeaddingtothesystembeforetheycanbeusedintablereferences
§ DefaultAUTHIDsprovidedwithDatacom– SYSADM(systemtables)– SYSUSR(defaultforusertables)
§ WerecommendthattheuserdefinemeaningfulAUTHIDsfortheirenvironment– user_authid (18characteruserspecifiedname)
CreatingtheSystemLevelSchemas- AUTHIDs
8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImplementingSQL- AUTHIDs(Cont’d)CreatingtheSystemLevelSchemas- AUTHIDs
DBID AUTHID0100 DB01000200 DB02001294 DB1294
• UsinganAUTHIDthattiestobusinessfunctionmaymakeiteasiertogroupthetables
• AllSQLtablenamemustbeuniquewithAUTHID
• WithmultipleDBIDsperAUTHIDbecarefulwhenassigningSQLtablenames
AUTHID BusinessFunction DBID Table
PAYROLL Payroll 0100 All
VENDOR Accounts payable 0200 VND,VNA,VN3
INVENTORY Sales andordering 03000400
INV,ITM,DTLORD,ODL,ITM
• CADatacomalreadyrequires3charactertablenamestobeuniquewithinDBID• InthisexampleweareusingtheDBIDaspartoftheAUTHIDasasimpledefault• MakesitrelativelysimpleforexistinguserstoremembertheAUTHID
9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImplementingSQL- AUTHIDs(Cont’d)
§ AUTHIDscanbeaddedtothesystemthroughvariousutilities– Theyonlyneedtobedefinedonceperenvironment(MUF)
CreatingtheSystemLevelSchemas- AUTHIDs
Datadictionarybatch Datadictionaryonline SQLstatement
10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImplementingSQL– DatabaseModelAddingSQLNamestotheDatabaseModelinPRODStatus
DDEntity
Attribute Req. Values Default Status Comment
Schema AUTHID No 18Character No ADDCPYPROD
Mustbedefinedin PRODbeforeusingfortables
Database SQL-Security
No YorN N UPDPROD
Use defaultorsettoN,Useexternalsecurity
SQL-NAME N/A 32Character None UPDPROD
Usedfordocumentationonly
Area SQL-Name No 32Character None UPDPROD
NeededifaddingnewtablesviaDDL(CREATE TABLE…IN…)
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImplementingSQL– DatabaseModel(Cont’d)AddingSQLNamestotheDatabaseModelinPRODStatus
DDEntity
Attribute Req.
Values Default Status Comment
Table SQL-Intent Yes N,YorR N UPDPROD
UseYforfullSQLaccessUseRforSQLreadaccessonly
AUTHID Yes ExistingAUTHID
None UPDPROD
Mustbealready defined
SQL-Name YES 32Character None UPDPROD
Mustbedefinedto accesstablewithSQL
Key AUTHID N/A Assigned totablevalue
auto UPDPROD
Automaticallyassigned
SQL-Name NO 32Character None UPDPROD
Mustbedefinedto accessindexwithSQL(ALTERorDROP)
12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImplementingSQL– DatabaseModel(Cont’d)AddingSQLNamestotheDatabaseModelinPRODStatus
DDEntity
Attribute Req. Values Default Status Comment
Column AUTHID N/A Assigned totablevalue
auto UPDPROD
Automaticallyassigned
SQL-Name NO 32Character Generated UPDPROD
Generatedusingexistingcolumnname
Column AUTHID N/A Assigned totablevalue
auto UPDPROD
Automaticallyassigned
SQL-Name NO 32Character Userspecified
UPDTestCPY PROD
UserwantsspecificSQLname
Userspecifiednameforcolumnrequiresextrasteps
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
SampleDDUPDATEJobtoAddSQLAttributes
UpdateSQLattributesinPRODstatus
CatalogPRODtoCXXandDDD
14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
MakingtheSQLAttributes“Live”
§ SQLattributesaresetthroughDatadictionaryprocesses– SQLattributesmadeusableduringtheCXXCATALOG
§ SQLdefinitionsarestoredintheDDD§ Only“active/production”definitionsareinDDD
UpdateTABLECopytoPROD
DDUPDATE
MUF
DD0002
Catalog DDUPDATE
MUF
DD0002
CXX
DDD0015
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
LegacyDataStructures
§ Legacydatastructuresmayhavesome“SQL”accesslimits– Alltablesareaccessible,butthecontentaccessmaybelimited
§ SQLaccessibilitytolegacytabledefinitions– GroupfieldsareignoredbySQL
§ Onlyelementaryfieldsareviewable– 2nd redefinitioncolumnsarenotaccessible
§ Onlythefirstsetofcolumndefinitionsareviewable;anythingaftertheREDEFINEisignored
– Elementsofrepeatinggroupsarenotdistinguishable§ Repeatinggroup(array)isrepresentedasasinglecharactercolumn
MayHaveBeenBuiltUsingOlderDataStructures(VSAM,COBOLCopybooks)
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
SQLColumnReport
§ Canbeexecutedagainstanyexistingtable– RegardlessofSQL-INTENTsetting– CanbeusedtopreviewSQLaccessibility
QuickWaytoDetermineHowSQLAccessibleLegacyTableDefinitionsAre
17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
SQLColumnReport(Cont’d)QuickWaytoDetermineHowSQLAccessibleLegacyTableDefinitionsAre
18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
SQLColumnReport(Cont’d)SQLACCESSSTD.- ShowsCurrentSQLAccessibility
STD– indicatesifcolumnisaccessiblebystandardSQL
NO- willincludereasondataisnotaccessible• CMP– columnisacompound
(group)field• RPT– Columnisarepeating
field• RDF– Columisaredefinition
(2nd definition)
19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ExperiencesSQLColumnreportprovidesadetailedreportshowingSQLcolumnaccessibilityforanytable.
KeyTopicsAddingSQLaccessibilitytoexistingtableswillallownewmodernapplicationstobecreatedthatpeacefullycoexistwithexistinglegacyapplications.
FindingsItisasimpleprocesstomakeanexistingtableSQLaccessible.
SummaryPartI
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
RecommendedSessionsSESSION# TITLE DATE/TIME
MFX92S StrategyandVisionforCADatacomandCAIdeal™ 11/16/2016at12:45pm
MFX93S What’snewinCADatacom 11/16/2016at1:45pm
MFX94S ReducingTCOwithDatacomCompression(Presspack) 11/16/2016at3:00pm
MFX95SA ModernizingtheCADatacomdata – SQLAccessPartI 11/16/2016at3:45pm
MFX95SB ModernizingtheCADatacomdata – SQLAccessPartII 11/16/2016at4:30pm
MFX96S CADatacom/ADInstallation/UpgradeandMaintenance 11/17/2016at12:45pm
MFX97S CADatacom/ADReportUtilization,andinformationgatherforSupport 11/17/2016at1:45pm
MFX98SUsingCASYSVIEW®tomonitorandmeasureyourCADatacomenvironment– ADandDB
11/17/2016at3:00pm
MFX99S BirdsofaFeather/StumptheTechie! 11/17/2016at3:45pm
21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Questions?
22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Stayconnectedatcommunities.ca.com
Thankyou.
@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.23 @CAWORLD#CAWORLD
MainframeandWorkloadAutomation
FormoreinformationonMainframeandWorkloadAutomation,pleasevisit:http://cainc.to/9GQ2JI