• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Accessing IMS Databases with IMS Explorer - IMS UG Singapore 8-2013
 

Accessing IMS Databases with IMS Explorer - IMS UG Singapore 8-2013

on

  • 572 views

 

Statistics

Views

Total Views
572
Views on SlideShare
572
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Accessing IMS Databases with IMS Explorer - IMS UG Singapore 8-2013 Accessing IMS Databases with IMS Explorer - IMS UG Singapore 8-2013 Presentation Transcript

    • Connect for SQL Access © Copyright IBM Corporation 2013 135
    • Connecting to an IMS database for SQL access • You can create and manage connections to IMS databases by using the Data Source Explorer. Use the New Connection wizard to create a connection profile so that you can connect to an IMS database and browse data objects. • Before you begin – Make sure that the host system that you are connecting to is set up to use Open Database. © Copyright IBM Corporation 2013 136
    • Connecting to an IMS Database for SQL Access • In the Data Source Explorer, right-click the Database Connections folder, and click New. • Select IMS as the database manager and the IMS Universal JDBC driver as the JDBC driver. Enter the connection properties. © Copyright IBM Corporation 2013 137
    • RDz – Open the IMS Explorer perspective u~,~ ~ rle , ~~ t:.xplore· - Iask t dr': N:rvrga":e ::,earct" ProJect . - -= IJl - x - Ht..n IM) t xa:lc rer Wrr d.)A' HeiJ; a IRF ~~~lc :t n I ihrmy [jdk) 9 ir r;uc1t:Jilr C' rrogr.~ l""" Fil"" 1 ).:'o rDt :.r.• ~p ... _ ") om ~ rse Ta~k Overview G~ing Learn more Stnrted TMk!. Get $-t<lrtc d with It..tS E:~o:p lorcr (im j:o rt rc s.: u rc c·s., .:::c r ncc t t c z./OS populate the IMS (ata lo ;;,~). DBD 11nd PSB Tl'l$k! Work w ith y·oJr DBD . md PSB rcs..oJrcc s.. : (l) IMS lnformlltion CentiN Vi~w tt'c IMS Explorer do.:urrc-ntut ion WI'! ott Is IMS hplorcr nf.!l l ll :l ' ',h :~ l f.t&; h: IJ,.' TM ~ Fxpllllt-1 !:im plifiRo; T MI ..;p pl i: ,.; it HI d C'v p n .:-r,;; 'Cic IMS Explorer ~b page I f-!:irn m e t ~ ,.;h :Htl Tt.AS F ~ p l : tt t-!1' c -tp:i hililif-!', o nd ocs:·.- p m d u< I i i r-:::- ~ ~tion. Changr:s to IMS hplorr:r by version '..t>t> a < w nul -t l iv~ li•.l of c h:iiiJ I-!L. IH IMt:; F:<pll:ti-!t, t ~l ,.; ~ : 1 ir :>tJIIc1tion infc rm ~ti ')n, cr d known i:;$JL·> c1 n :l v.•o rkc rou n :l~. ~;;;;;;;;;;~;;;;;;;;;;;~J I "'l Properties · ·~ Llal< ~cc~e• I:>:IJior•r ~; '·•••'&'. Navt~alor · =n Pr.opert'l " :1 -----1 = ~t::l '·' '·•••.,"-- rrorr-""-"-=!Z Prob'-'-"-'-'--]_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ______,==I-='------= .'!') I ! ['--'-"- loq I =-'---'-"lerr·: ~ s l!L ~· L' Value G s ~ IDJ ·o> i e.u l ll'l ~ e U :;tab::~ ~e <.c r necbon~. a OIKI llcb~r:.. M~.,;U:ol~ :S....mplt:= D~L:tb.:b~ """ Iii Dt!rl:y S;;trnplt! C<.:r·nt!t.liun Q::!. Of>1~. n .i l,.; ~cur.'"'"· - B- C.l - 1. ,j , M< :ti. ·l~ ~ Jd Flm lu: Sample 0 -tl·tbrJ,c r:mn ~r. 1.rc~ Jd 1 r:P.r. r:<1M Sr.t.rrr. ~ Fil~ Web Serv ices Dc1to Set. r.::e .-. v • • ~-·- r. n" © Copyright IBM Corporation 2013 138
    • Data Source Explorer • In the Data Source Explorer panel, right-click on Database Connections © Copyright IBM Corporation 2013 139
    • New Connection ~ New Connection Connection Parameters Select the database manager, JDBC driver, and required connection parameters. Connection identification [{] Use default naming convention Connection Name: MyDB Select a database manager: Cloudscape DB2 for iS/OS DB2 for Linux, UNIX. and Windo1LJ DB2 for z/OS Derby Generic JDBC JDBC driver: ooudscape- Cloudscape Embedded JDBC .... I f:l (c HSOLDB ,_----,::-:------, Properties Database location: C: Cio udscapeDatabases MyDB URL: Ill ITest Connection I Browse... I "" jdbcdb2j :C: CioudscapeDatabases MyDB;create=true 171 Create the database if reauired <Back ~--N e~ >__~l !~----i_is___~] !~___c _n_ _l__~ ____ F n_h _a ce • In Select a database manager, scroll down and select IMS © Copyright IBM Corporation 2013 140
    • New Connection C."lnn:'"1it O i rt ~r-i fir.:-i:~ n i . P" L se detault nam_n_c _o_ ,_·e_r -.lo _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _, o g_o n _ _n f !.!rll"r' r li c u N m m :: -'M'--'-1S -'' 1~._..'---------------------------------_j , lf)P.C: rlrio'H [1 '1::: lln ii:Pr.'=il JI)RC.:Ori-.:Pr f).., fa ull M::. Clo J d ~c pe a 0 8 2 fer i:::,'OS DB2 f<..:1 l inw;, r>R? fc:r 7/ 0 S Derby UNIX. i.1nd Wi wJ ;Jw~ G~nenc. J LJIK H~l llR l'ropertiES t:eneral TrM in!J l orrinn:'l ll *Connection r ame; My 11-AS HS * H<..:~t fnformix •rort numhr.r: M a:<V~ 9.~0 H :l.Hi d U ser name: 6666 - CJCc -n_ _ _ _ _ _ _ _ _ _ _ __ - -.·· MySQI Oracle S(.,!l. :::er~o~er Syba>e W-~ h·;r. l" r.rr - Passwo rd: 1 1 e p assword r Sav D~ fu J it 5chc m~: Met adat a source [IMS Catalo;~ ..,. ] ~============~ rse: C:FSCPOOl URL Jdt·c:lm );/ ,":3 ::lU.:.3:l.l8i:(J()(J.~/Ut:::-CPUOl:dt: sbOrCommlt-true;t~tch :::- ..... j,-;:= 0; [ 1ert Cor r ecttc-n ] (?~ ___ J~ C_----~ ~-- B~_k___ L __~No~·~ ': ~ '--~1 L--~ in_h __~l ~~ ~ £~ i<_ • Select the JDBC Driver for the version of IMS you are accessing, and enter the parameters in the Properties panel (see next page for details), then click Finish. © Copyright IBM Corporation 2013 141
    • Connection Properties Connection Name Description Connection name Unique alphanumeric name for this connection. Data store Name of the IMS data store to access, provided by your IMS system administrator. Host Name or IP address of the data store server (IMS Connect). Specify either the host name (for example, dev123.svl.ibm.com) or the IP address (for example, 192.166.0.2). Port number TCP/IP server DRDA® port number used to communicate with IMS Connect. User name User name for the connection to IMS Connect, provided by your RACF® administrator. Password Password for the connection to IMS Connect, provided by your RACF administrator. Metadata source (see next page) © Copyright IBM Corporation 2013 142
    • Connection Properties: Metadata Source • Location of the database metadata that represents the target IMS database: – IMS catalog • select a PSB in an IMS catalog-enabled system from the list. – Local IMS Explorer project • select a Project and a PSB from the lists. – Local file system • browse to a .jar file that contains the Java metadata class. • In the .jar file, the metadata class must be stored under a directory that is named for the PSB (for example, BMP255/BMP255DatabaseView.class, where BMP255 is the PSB name). • The .jar file can contain multiple metadata classes. In the connection wizard, you must specify the name of the metadata class (for example, BMP255.BMP255DatabaseView). © Copyright IBM Corporation 2013 143
    • IMS Explorer perspective IMS F)lpl or~.. Wro £ilr. £r1ii t:!:'J'~·i ~)i1it: ~}ret' eroj r.N El.n ™~ F:< lr:r:-:r r ~i r r1 :')'J.' t l.r·lr ~ 'ID Projec: D<J:Ior~r >..:.< ·• •} : Packag e [xplo rer l ,...., Ef (~';, J S Cxplo rer Task Laun: t'er M 1-1 Wel:o11~ t 'J z/ 0:1 Proj~:-":5 ' >..:.~ · c !!- 1-:i- v lfl Re moteS... ,...., Ef :;.-: OJdin~ ;..:.~ · ..... 1r ot..: hr e 1$ n:;.t .l'3ll.sble. ii; CM66Pr<iect ~ lM:::. Univcr>al C ri·~·ers Metadat a a JR[ :;:,.-stem library [jdkl g ir uudt.j ar • CP'"Ogrcr · File5' •X8G: IBf...tSDPIit : Welcome to z/OS Projects L LJW ':) ~ P~l::! The Z/OS Proj ects perspective offers an integrated development environment th!!t lets you develop !!nd mllintllin !lssemble r, COBOL, PL./I, and C/ C+ + applicat ions targeted t o run on CICS or Ir·1S. If you 11re new to R11tionl!l Developer for System z, can get started by we~tching demo5 or viewing Qu ick Tasks to learn how t o use some of t he features in t he procuct. )'OU Ill HI C<:~to Snrce Explorer ~ r=~ ·~ .... "~ ~.. N~wi~<:~tor .... t:l. ill []) -.<I ~ .:. 1I§ o ::.-:'Jh:'J ;r. lc. r nr.rtion~, W BIRT O<:~ ;si ::: M c d:-ls Sample For the more experienced users, follow one of the Global Auto Mart samples ( New > Example••• > v Workstation Global Auto Mart Samples) to get D::::;::::~ b :::~ ;e familiarized with the tools. tf Dert:•t Sample Cc r nection • .ill 1.- MyiMSI 0 My iMS To modernize, tr~~nsform, Md Web service eMble your CI CS and Ir•1S applications, you will be interested in using t he Enterprise Service Tools (Window > Open Perspective > Other••• > Enterprise Service Tools). • 10 ODA Date Scurces 10 Class1 M c d els Inc. ~ample U ataba>e c 10 1-lat tile L:ct c ~ c t..r<:e e Jt;I::!C t;at .s ~c t..rce e ' N~lJ ~1 '1 :. ~~ LJ.:tld ~t: l.. I L~ t=> XMLD .:tld SuuJ l~ =:l folrcp~rbes ~~ - -...~ t.rrvr Log '.:.:ff. ,_= b,l::.:_:_ ._ _cPro err sL__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _·~ ~_- :=-j _c_ _ D 1');-tl:· : .. ,.p < d :..urrent us::r geottr :.::Unr1~ l1 :.11 1 rl:'Jrl:': 0 .-:'ltJ .. N J m C M1• IMS ::onnec:i'Jn UKL . F:-tct'ir q child ren c f GE:JFFN.A.PPL.CBD• • We now have “My IMS” in the list of Database Connections © Copyright IBM Corporation 2013 144
    • Data Source Explorer • Expand “My IMS”, showing the PSB, PCBs, and segments (tables) in the PCBs. © Copyright IBM Corporation 2013 145
    • Connection Properties – Options • On the Tracing tab of the connection properties, deselect the Disable Tracing box to turn on tracing. – Turning on tracing creates a log file of your activity that helps with troubleshooting problems. • On the Optional tab, specify whether to use an SSL for your connection, a log-in timeout value, and any additional property values you want to add to the JDBC connection URL. © Copyright IBM Corporation 2013 146
    • Properties for My IMS – Disable Tracing Pru!J.,rli"' for My IMS IMH15§11 Driver Proper lies Common Default Schema Filter Default Stored Proce< Drivers: IMS V12 Universal JDBC Driver Defaclt Properties Default Table Filter D river Properties Version Direc•)ry Fi Ie nam€: [ IMS_JDOC_t rKe.tx1 0 Apper d Trace l e~el > D Dll .A.Pl c: DRDA 0 Ja~a : E C JDBC ISPIPrt All[ F1Pft!.!l] ~ I ITest Connect io n Ill J ~--- K__~J [L__l_a_ _el__~ o_ nc • By default, tracing is disabled © Copyright IBM Corporation 2013 147
    • Properties for My IMS – Enable Tracing • The trace information is written to the file in the directory you nominate. The levels of trace are selected here. © Copyright IBM Corporation 2013 148
    • Properties for My IMS – Options • Set SSL use, log-in timeout value, and Additional Connection Properties © Copyright IBM Corporation 2013 149
    • Connect for SQL Access END © Copyright IBM Corporation 2013 150
    • Viewing an IMS Database in SQL Results © Copyright IBM Corporation 2013 151
    • Viewing an IMS database in the SQL Results view • You can display the contents of an IMS database as a table in the SQL Results view. © Copyright IBM Corporation 2013 152
    • Procedure • To display the contents of a table in the SQL Results view: – In the IMS Explorer perspective, open an IMS Explorer project. – Import the program specification block (PSB) and database descriptor (DBD) files for the database into the project. – Open the Data perspective. • From the main menu, click Window > Open Perspective > Other. • In the Select Perspective wizard, click Data. • Click OK. The Data perspective opens. © Copyright IBM Corporation 2013 153
    • IMS Explorer perspective ~~ • • ~ 11e t dlt N :rv1 ga-.:e Searc.t" '10 ~' "je< f < '"' FI" ProJect Ht..n ----=-=' Cl - x-- lM) t xt:lc rer 1'lr d.:r...· Helt: i~'-., 11l l>~cb9e F.f~"~'-1'!;, I: ;,: : ti>' CM66Ptcjet-l ®>~•I~"'"' h,lfaw~l-eo ~, """'----------------------------------------- ".,1!~ :L~~:;~; i~n~t a,-,a-ileb- le.- - - - - - - ---. - ;-- 9l<!~ew 1 ~I I : I .. "-1. -. • a IRF ~,.·..,lc 'l n l ihr.uy [jdl::) 9 ir r ;uc1t:j.1r ( "1~ogr,-:r FIIC'" •:1(~1'JP.MC)fl'..lit: om q rse I') Ta~k Overview Learn more G~ing Stt1rted TMk!. Get started 'Nith It.AS Exp l :~rcr (im j:o rt res.:~ J rc c s., .::c rrect t c z/ OS p opulate the IMS c ata lo ;~). DBD 11n d PSB Tl!l$k! W o rk w ith 'y 'OJr C:E!D .md PSB res:urc: ·s... : Work wilh 1QI o iml pur ~. l i-!1 )' I MS ln form!'ltion CentiN li ~·,~,~ t l"c lMS Explorer d o ~L.rrc ntuti :~ n Wti<Jt I~ IMS h plorcr nf.m l( :l · •.h.~ l ..._ h: I.A iM S. FxpiC .. .' llt-1 !.implifi..._ i M I ..;flpli: ,.; it Ill .. ::l ~·v·ctc p M~ rt .;;g 5QL ond pur<Quory Tosk• ' 4l4t{ (I) I MS Explorer ~t» page :1 qu~ y iM I :1-tl:i fr u 11 h;.> l/0~ I f-!:irn lli C:I i'! ,.;h :n ll Tt..AS F ~ p l : 11 t-!f c -lfMhililif-!', ond oc:!l.·.- p n uh J< I i i rt:O ~ I<)tion. ;y$t:Cr1. · Chang~s '" to IMS hplor~r t»y version CllllltJI -tliv.- li•.l o r ch;mJI-!L. It I iM I F:<FIC:Ii-!l, l i-!lri i-!:l ir s.t JIIJtion infc rr'l ~ti ':'ln. cr d kn01Nn i:>sJc·s. ~ n :l v.·o rkJ r'Jun :l~. :::.,., :i '9.1 t.:al,; S~.;L.H.~ hjJiur~r :t~ ...~- Na'I~O:llUI . =n E:J ~ 'Jri[!J '"" l ~u l l!il. IC U 3n b ::r ~e <..c r necbon~ ii OlKI Ud.~~r:.. Mt.; ll ~l!. ~mple U i f..:ll.J:be li Dt:'rly Sd1nple (~,;r·netliun :IJ ~ MyiM!'. onA n .Jioi ~c l n 1 ( ~, H: n-.. r ~i M c.rlr·ls in:-. ~"1mplr O:W1h.11r H Flm FiiC' r:mn ~.c. r.r.;C' 8 JC:E!C C:.nJ SCLrCe k:.·.. W e b Servi ~es Dat a Sc L rce ~.. )(M L Dat a Source ·~ Prcp~rties ~£'··~ ~ error Loq' I!: Problerrs] Vai J ~ n'' "' • Click on “Window” > “Open Perspective” > “Other” © Copyright IBM Corporation 2013 154
    • Open Perspective • Select the “Data” perspective, then click “OK” © Copyright IBM Corporation 2013 155
    • RDz – Data perspective ~ 11e r~ l:d r': N av1 ga-.:e .... n ,,; .:=. ::,earc.t" ~ .... ProJect # .... ".t- r..-tl... P111_1t-1 I Fxplo rH ~ ~~ l-!.1.. r Uata ~!- .... :. lea rCa~.e IM ) b:J;Io rer W1 d.Jv.· H ell= r h .... " ·...... .... _ _ _ _ _ _ _ _.:= 'q' _ - _r- l,$ 1tJ!S Fxplm +-'r T..t.,k I ;-tun: I·H ~... ·..••.._""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"" ...il ~ 0 1. Eo___:e_ v_ --l - r'1 . • ::;:.:-.,__---.. I Ta~k GeHing Started Tasks I DBD and PSB Tasks Overview ~.... ·--- ~ R~m:llt-! Sy-.11-!lll!-; I SQL and pure Query Tasks Pro~r<n<= Learn more Getting Stlrted Tluk' Get sttlrtcd with IMS E>:p l::>rcr Omp:.rt rcs:JUrcs, conr c·ct tc z/ 0 '5, pcp ...lar.:e t he IMS cataiC>g) DBD ond PSB T osk• Wc rk w ith ~y·oJr CBD and r se res.::~ure:;, IMS l nfonnntion Cerrt~r View th~ IM S E;<plc r-~ r d ocu me ntatio n. iO Wh<lt Is 11'1.'15 Explore-r Oi-!l'l:m -.1 o~ l i-! ·. ho w tMS F"r:l1111-!1 •.il1"flli 'iH· 1 n~t~ :-tpplico~ l ion dcv~ lopment. 'il ' SQl ond pur.,quory Toslcs ~~ li11+-> An o ut line is no t availab le. Wc:rk wilh SQI ;-tnd p tllt-!Qlli-!1 lo qul-!fy I~AS d :-tl:-t h u 11 I hi-! )' z/ OS S S.t cm. ' IMS Explorrr w~b p<lge I i-! ~ lt 1 H I : lf l-! ;-thouiJMS. Fxplc lf ~ r 1 ;.tp;-thililit-_, o~ 111 l . p rc d J: t in c ,qrotion. Ctlange~ t o IJI.1S Explorc:r by VB~Ion St-!t-! .rt .; Ul1 1lliilivl-! li-.111- .; 1·.-tnut-'-.. In 1 inst ollot io n i r "':. rrno:~ticn, ~n :l ru~ h p b rt-!1, rt-!liih·! d kf1.o·,on is :;ue~ and worka round~ . .... (_-+ 11!1n h :"J;r. lc. r ncrtinn~, Q RT (];y;si,; M r.rl~ls ~1mplr. l1!1-1h1i r. RT [J Dcrt:•1 Sample Cc r ncctio n ~ MilMSj .... 123 ODA Data Scurces ~-· Cl a ssi c Mc dels In: . Sample G3- rlat rile Data ~c L.r·:::e fO JCBC Cata ScL.rce 10 We b ::ierv~e es D a taba~e ~ rrop~rti~ ~ SQL Rc-sul~ ~~ '··~ ill Re mote Errc r List Ty·pe q J.ery :itatus t xprt s~ic n here Operat io n Dat e 5tatusl Connecti : m Pro file l)ata ::,C1 ..rce 10 XM L l)ata ::iource Ill n~- liD My IM S (Cis: o rmected; © Copyright IBM Corporation 2013 156
    • Data Source Explorer • In the Data Source Explorer pane, right-click on “My IMS”, and click on “Connect” © Copyright IBM Corporation 2013 157
    • Properties for My IMS Properties for My IMS f ____..,_~~ Driver Properties __ [type filter text _j ~ ~---- .... .... .... Common Default Schema Filter Default Stored Proce< Drivers: J IMS V12 Universal JDBC Driver Default Properties Default Table Filter Driver Properties Versi on •connection name: My IMS •Host: 9.30.132.182 •Port number. 6666 User name: myuseridj Password: •••••••• D Save password Default schema: Metadata source: I..__ s_c _ _ l_ g_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ___,J IM _at a o..:. .... PSB: DFSCP001 URL: jdbc:ims://9.30.132.182:6666/DFSCP001:dpsbOnCommit=true;fetchSize =0; ~ I Test Connection J I _JJ IL___ o_ __ K L __ _ _ c_an_ce_l__~ • Enter the parameters for the connection to My IMS in the “General” tab of the Properties panel, then click “OK” © Copyright IBM Corporation 2013 158
    • Data Source Explorer • When connected to My IMS, expand to show the Tables (Segments) in the database PCB you wish to access © Copyright IBM Corporation 2013 159
    • Data Source Explorer • Right-click on the Table you wish to access, Select “Data” and “Sample Contents” – This will return 50 rows from the table (segments from the database) © Copyright IBM Corporation 2013 160
    • SQL Results • The SQL Results panel shows the status of the request • The Result1 panel shows the sample data returned – Double-click on the tab to maximize it, and double-click again to return it to normal size. © Copyright IBM Corporation 2013 161
    • SQL Results • The Status tab shows the SQL used for this request. – SELECT * FROM “DFSCAT00”.”DBD” © Copyright IBM Corporation 2013 162
    • Data Explorer perspective ~ 11e t dr': N av1 ge-.:e ::>earct" ProJect Uata 1-!.t.r :. lea rCa~.e IMS b q::lorer W 1 r d ~v.· H ell= ''• r..'tl ... P111_1t-1 I FxplorH ~ ··.._ _ _ _ _ _ _ _ _ _.:= 'q' _ - _r- l,$ 1 k Eo___:e_ v_ --l t.<!S Fxplmt-!r T..t-.k I :i un: I H ~-- ....__ ·~:g:-:---.:..:..._ 1 Ta~k = r-, · ~ Or. lirrt-> ~..._ ··._ lll R~rn:llt-! S)•-.lt-!111!. - - -- An c-ut llne is r.o t available. GeHing S Overview Learn more G ~tting Strlrt~d Tluk! Get started with IM S E>:p lorcr Omp'Jrt rc~rc:~s., .::orrc·ct tc z/0"5, pcp ...la::e t he £ cataiC'g) MS DBD ond PSB T o<k! W c rk w ith ~y·oJr CBD .:md rse rcs.oure;, (l) IMS l nf onnmion Cent~r View th~ [M S E;<plc r~ r documenrntion. W hM Is 01..'15 Explorer o ~ r ·r : lll·. l l -l ~ -- how tMS F"r:ILIII-!1•.ill ' fl li 'iH- Tl...1S :-~ppli(-:--l l ion dcv~ lopmcnt. .t:llj' SQl ond p u r<Quory To<ks ~ · Wc:rk wilh SQI < <tnd pt~r E-!QLJ ~I)' lo q uf-!fy I~AS d;i l;i hc111 I h~ z/ OS S t cm. 'S- JMS Explorrr w~b p<~ge I ~ ~ 1 11 rrr:lff-! :iboul lt.<!S Fxplort-r 1<tp<tbililit-_ - d < ., m prc d.1:1 ir -.:c ,qrotion. Chan~e~ t o lll.15 ExplarN by ver~lan St-!t-! ~ .; Ul lilll<ilivt-! li< 11- ' lo ,l ..tnUt-'-" lo TlvtS h pbrt-!1', rt-!l,...h- d ! instJIIJt ion ir "''JrmJticn, Jn j krown is;ucs and w::>rka round~ . C..-t o ::-:"Jh:"J;r. lc. r nc.r.tinn~, {j RT (];r ;sic RT M r:rl ~ls S. mplc. 1 0 :;-,l h:"J;c. Q Dcrt•1 Sample Cc r ncction ,ID M)'IMS U r.tv ltA S ~ Authorizatic n lOs T~y·pe Q J ~ ry· expres>ic n ::_ Catalogs here Status Resulti Op erat ion Dat e -/' :::t.Lli:!i:!:Ji:!:J ::J S· t"erras c Connecti ::>n Pro f ile ::: lill.r.zo:. ~ ..!19:2~ ' I'M I ICADCR RIIOR>CQ en My tM::: OR[) DOC A [)P [) [)P CDCDOO on D I:H.: :;tatus 0 OF5CPC •l ( ~n tJt-SCA 100 liJt{0<..0-'1 - A.,J 0 ~ Gl ToiJI• > "'1 f,RFA (->[)Rfl] "' ARFARMK [ >ARFA] "' CAPXOP.rl ( >[)P[)] ~ r.t..c::«= r ~117?. HilA.. V~AM ~073 I lOA.. DSAM ( >"G'A) VI:~OO/~ IJH u JxUOOU.. 201~ - .. ::lU.'3 Hll!l.. I~N-A ORr. OP.007ft ODD 0 00076 [)P, G :l'liOOOO. ?01, .. ~117?. HlOA.. VSAM DO ) I ODA.. VSt..r.A IJH ::lU/3 p ~07~ lNL'cX T NilFX V~-f1-A [)P, J G O OOO.. 2012 -.. xO J• UOOU.. 2012 -.. 1> '0000. ?01;- .. ~073 UHOO/~S::: VSAM p O OOO. xO ~073 !NDCX VStJ.A p . DQ lOl l · .. Ill -. t..tt:.r:' Ill : n:- ?0" ' .. l Ol l -.. oRr. OP.007 ft~ :: DOD 000076;) 1-'H.J;. tllr..r i::!~ ~ CAPX~FC: M 1<0000 .. OxOOOO. 1 L ~~ Dep er d e r c•e~. 8 :::il urt ll ;CQNUM CATVCP.S DODSC TSVCRS RL Q VL ACCCSS OSACC T o: al SO reco rdi sh.a wn Displa·jfed 1 o "' 2 r.~:;ults- 1 s.J ::ceeded, 0 fa il~d, 0 term im~te j, 0 warninq, 0 critical erro r © Copyright IBM Corporation 2013 163
    • SQL Queries against an IMS Database © Copyright IBM Corporation 2013 164
    • Creating and running SQL queries against an IMS database • You can access and manipulate data that is stored in an IMS database by creating and running SQL queries in IMS Explorer. • Before you begin – Connect to an IMS database for SQL access © Copyright IBM Corporation 2013 165
    • Procedure • In the Data Source Explorer, create a database connection to the IMS system. – Check with your IMS system administrator for the values of the database connection properties. • Under the connection that you created, expand the database > Catalogs > catalog node > Schemas > schema node > Tables. – catalog node The name of the PSB. – schema node The name of the PCB. • Right-click the table whose contents you want to display, and then select Data > Sample Contents. – The SQL Results view displays a sample of the rows in a table based on the maximum number of rows specified in the Preferences window. © Copyright IBM Corporation 2013 166
    • RDz – IMS Explorer perspective ~~ • • ~ 11e t dlt N :rv1 ga-.:e Searc.t" '10 ~' "je< f < '"' FI" ProJect Ht..n ----=-=' Cl - x-- lM) t xt:lc rer 1'lr d.:r...· Helt: i~'-., 11l l>~cb9e F.f~"~'-1'!;, I: ;,: : ti>' CM66Ptcjet-l ®>~•I~"'"' h,lfaw~l-eo ~, """'----------------------------------------- ".,1!~ :L~~:;~; i~n~t a,-,a-ileb- le.- - - - - - - ---. - ;-- 9l<!~ew 1 ~I I : I .. "-1. -. • a IRF ~,.·..,lc 'l n l ihr.uy [jdl::) 9 ir r ;uc1t:j.1r ( "1~ogr,-:r FIIC'" •:1(~1'JP.MC)fl'..lit: om q rse I') Ta~k Overview Learn more G~ing Stt1rted TMk!. Get started 'Nith It.AS Exp l :~rcr (im j:o rt res.:~ J rc c s., .::c rrect t c z/ OS p opulate the IMS c ata lo ;~). DBD 11n d PSB Tl!l$k! W o rk w ith 'y 'OJr C:E!D .md PSB res:urc: ·s... : Work wilh 1QI o iml pur ~. l i-!1 )' I MS ln form!'ltion CentiN li ~·,~,~ t l"c lMS Explorer d o ~L.rrc ntuti :~ n Wti<Jt I~ IMS h plorcr nf.m l( :l · •.h.~ l ..._ h: I.A iM S. FxpiC .. .' llt-1 !.implifi..._ i M I ..;flpli: ,.; it Ill .. ::l ~·v·ctc p M~ rt .;;g 5QL ond pur<Quory Tosk• ' 4l4t{ (I) I MS Explorer ~t» page :1 qu~ y iM I :1-tl:i fr u 11 h;.> l/0~ I f-!:irn lli C:I i'! ,.;h :n ll Tt..AS F ~ p l : 11 t-!f c -lfMhililif-!', ond oc:!l.·.- p n uh J< I i i rt:O ~ I<)tion. ;y$t:Cr1. · Chang~s '" to IMS hplor~r t»y version CllllltJI -tliv.- li•.l o r ch;mJI-!L. It I iM I F:<FIC:Ii-!l, l i-!lri i-!:l ir s.t JIIJtion infc rr'l ~ti ':'ln. cr d kn01Nn i:>sJc·s. ~ n :l v.·o rkJ r'Jun :l~. :::.,., :i '9.1 t.:al,; S~.;L.H.~ hjJiur~r :t~ ...~- Na'I~O:llUI . =n E:J ~ 'Jri[!J '"" l ~u l l!il. IC U 3n b ::r ~e <..c r necbon~ ii OlKI Ud.~~r:.. Mt.; ll ~l!. ~mple U i f..:ll.J:be li Dt:'rly Sd1nple (~,;r·netliun :IJ ~ MyiM!'. onA n .Jioi ~c l n 1 ( ~, H: n-.. r ~i M c.rlr·ls in:-. ~"1mplr O:W1h.11r H Flm FiiC' r:mn ~.c. r.r.;C' 8 JC:E!C C:.nJ SCLrCe k:.·.. W e b Servi ~es Dat a Sc L rce ~.. )(M L Dat a Source ·~ Prcp~rties ~£'··~ ~ error Loq' I!: Problerrs] Vai J ~ n'' "' • Open the Data perspective by selecting Window > Open Perspective… > Other © Copyright IBM Corporation 2013 167
    • Open Perspective • (Enable Show all if needed) • Select the Data perspective, and click OK © Copyright IBM Corporation 2013 168
    • RDz – Data Perspective ~ 11e r~ l:d r': N av1 ga-.:e .... n ,,; .:=. ::,earc.t" ~ .... ProJect # .... ".t- r..-tl... P111_1t-1 I Fxplo rH ~ ~~ l-!.1.. r Uata ~!- .... :. lea rCa~.e IM ) b:J;Io rer W1 d.Jv.· H ell= r h .... " ·...... .... _ _ _ _ _ _ _ _.:= 'q' _ - _r- l,$ 1tJ!S Fxplm +-'r T..t.,k I ;-tun: I·H ~... ·..••.._""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"" ...il ~ 0 1. Eo___:e_ v_ --l - r'1 . • ::;:.:-.,__---.. I Ta~k GeHing Started Tasks I DBD and PSB Tasks Overview ~.... ·--- ~ R~m:llt-! Sy-.11-!lll!-; I SQL and pure Query Tasks Pro~r<n<= Learn more Getting Stlrted Tluk' Get sttlrtcd with IMS E>:p l::>rcr Omp:.rt rcs:JUrcs, conr c·ct tc z/ 0 '5, pcp ...lar.:e t he IMS cataiC>g) DBD ond PSB T osk• Wc rk w ith ~y·oJr CBD and r se res.::~ure:;, IMS l nfonnntion Cerrt~r View th~ IM S E;<plc r-~ r d ocu me ntatio n. iO Wh<lt Is 11'1.'15 Explore-r Oi-!l'l:m -.1 o~ l i-! ·. ho w tMS F"r:l1111-!1 •.il1"flli 'iH· 1 n~t~ :-tpplico~ l ion dcv~ lopment. 'il ' SQl ond pur.,quory Toslcs ~~ li11+-> An o ut line is no t availab le. Wc:rk wilh SQI ;-tnd p tllt-!Qlli-!1 lo qul-!fy I~AS d :-tl:-t h u 11 I hi-! )' z/ OS S S.t cm. ' IMS Explorrr w~b p<lge I i-! ~ lt 1 H I : lf l-! ;-thouiJMS. Fxplc lf ~ r 1 ;.tp;-thililit-_, o~ 111 l . p rc d J: t in c ,qrotion. Ctlange~ t o IJI.1S Explorc:r by VB~Ion St-!t-! .rt .; Ul1 1lliilivl-! li-.111- .; 1·.-tnut-'-.. In 1 inst ollot io n i r "':. rrno:~ticn, ~n :l ru~ h p b rt-!1, rt-!liih·! d kf1.o·,on is :;ue~ and worka round~ . .... (_-+ 11!1n h :"J;r. lc. r ncrtinn~, Q RT (];y;si,; M r.rl~ls ~1mplr. l1!1-1h1i r. RT [J Dcrt:•1 Sample Cc r ncctio n ~ MilMSj .... 123 ODA Data Scurces ~-· Cl a ssi c Mc dels In: . Sample G3- rlat rile Data ~c L.r·:::e fO JCBC Cata ScL.rce 10 We b ::ierv~e es D a taba~e ~ rrop~rti~ ~ SQL Rc-sul~ ~~ '··~ ill Re mote Errc r List Ty·pe q J.ery :itatus t xprt s~ic n here Operat io n Dat e 5tatusl Connecti : m Pro file l)ata ::,C1 ..rce 10 XM L l)ata ::iource Ill n~- liD My IM S (Cis: o rmected; © Copyright IBM Corporation 2013 169
    • Data Source Explorer • In the Data Source Explorer pane, right-click My IMS, and select Connect © Copyright IBM Corporation 2013 170
    • Properties for My IMS Properties for My IMS f ____..,_~~ Driver Properties __ [type filter text _j ~ ~---- .... .... .... Common Default Schema Filter Default Stored Proce< Drivers: J IMS V12 Universal JDBC Driver Default Properties Default Table Filter Driver Properties Versi on •connection name: My IMS •Host: 9.30.132.182 •Port number. 6666 User name: myuseridj Password: •••••••• D Save password Default schema: Metadata source: I..__ s_c _ _ l_ g_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ___,J IM _at a o..:. .... PSB: DFSCP001 URL: jdbc:ims://9.30.132.182:6666/DFSCP001:dpsbOnCommit=true;fetchSize =0; ~ I Test Connection J I _JJ IL___ o_ __ K L __ _ _ c_an_ce_l__~ • Enter the parameters needed, and click OK © Copyright IBM Corporation 2013 171
    • Data Source Explorer • Expand My IMS © Copyright IBM Corporation 2013 172
    • Create a Data Development Project To create and run custom SQL queries against the IMS database: • Create a data development project. – The data development project is required to create and run custom SQL scripts. • Procedure: – From the main menu, click File > New > Data Development Project. – Enter a name for the data development project. – Click Next. – Select the connection name of the IMS database. – Click Finish. © Copyright IBM Corporation 2013 173
    • RDz – Data perspective '1:·~ ~ 11e l:dlt N av1 e 5earct" ProJect gat r~ ...- ~~ Uata 1-!J.. r F ..- ;1 :Jea rCa~.e ------------ - -="' IJI ~j ----- IMS b:plorer 'v'lr dvv.· H ell= T ~ ·-.- T - T = r-, · ~ Or.' lirr+-> ~.... ·-•• ~ R~rn:llt-!S)•-.11-!n~. f-"o.;.;;;;;;;.;=-..;.;..;.;;= ;.;.;...;.;."""'- - - - - - - -:- ;....q;..._ _ -_ r- I;$ 1~S Fxplm t-!r Tit-.k I ;m n : l t>r ~--,,_ E ' ;:, v :: _, ·~:g:-:---- - I Ta~k ., An c-ut l i ne is not available. GeHing S Overview Learn more G~tting Strlrted TIUk! Get $-trlrtcd with IMS E>:plorcr Omp'Jrt rcs-3Urc::os., corre- t tc c z/0~ . pcp ...lace t he IMS cataiC'g) DBD ond PSB Tosk• Wc rk w ith o,·oJr CBD and :o<r.' ~"'- rse rcsoure ;. Wh ;,t Is IMS EYplarc-r O ""rTt:m .. lr o~ [ ""·· ho w tM~ F• r:lrrrl-!r ~.i 1r · r• l i "iH·. Tl..i~ :o~pplic-o~ l ion dcv~ lopmcnt. SQl ond p u r<Quory Tosks Wc:rk w ilh SQI ;md z/ OS Srstc m . IMS l nfonnntion Cftrt~r View th ~ IMS E;<plc r.~ r .::Jocumc nrotion. ptllt~Qui-!1)' lo qu~y I~AS d :-tl:i h e m : hi-! IMS Explorrr w~b p<~ge I "" ~ rt • rrr:lfl-! :·ilJCJUI IMS. Fxplor ~ r • o-tpo-tbili l i ~. . prc dJ::t in c·qrotion. o~ u d Change~ to lll.1S ExplorN by ver~lon Ulrtrdalivl-! li.-...1 r , - ' l·a rrul-'_ I1J Tl~1~ h j•l-nt-!1', rt-!lah- d ., : ! inst ollot ion i r "'') rm<:~tic n, o:~n :J krown i~ :>l.IC~ and workarounds -. ~1-!t-! C' ~ .j .; O:t.n h :"J;r. lc. r nc.r.tinn~, {I RTRT O rr ;!ii-- M r. rl ~ls ~"1mplr. O :t.·,1 h1; r. : U Dcrt•1 ~mplc Cc r ncction ,ID M)' IMS J.!3. ODA Data So: urces ~-- Cl a ssi c Models (n:. Sample D a ta ba ~e rlat rile Data ~c L. r-:::e ro JCS.C Data Sc1..rce ~ ~ Pro p~ rtic~ ~ SQL Re-sult. ~~ '·-~ ~ Remote Errc r Li~t Ty·pe Q J ~ r expres> n y· ic :;t atus here Operat ion Dat e :;tatusl COnnecti :m Profile 10 Web ::ieiVIces l)ata Sc1..rce 10 XM L IJata Source Ill n.::.- 0 it~m s s.~lected • Starting with the Data perspective © Copyright IBM Corporation 2013 174
    • RDz - Data perspective lor z . Uata- I ask ~ 11e l:dlt N av1 a;:e ::>earct" ProJect g Uata 1-!J.. r ----------- :Jea rC a~-e IM S b:j:-lo rer '8 N ew Op ~ n Filr... Ctri+W Clli+Shi "l +W :""hii C S-r .. r· ~.::h~ t.~.. :,av·eAII Mov:-- .. J = r-, · ~ Or. liru- ~.... ·--- ~ R~rn:llt-! S)•-.1 1-!IH!. An c ut Ii ne is no t available . n.• •I M :xld fii l"lo ill y:,ir ~ 11:~r ~I<.; IIH :Iti:Jn WnhyurdtiUII rasks I DBD and PSB Tasks I SQL and pure Query Tasks .,...~,."~ ! U ~tored Procedure ~ User-D.e:"'i n=d r unction WcbSphcrc M Q r?" r? F~~. 1mpl r._ U~:-r O~fin~::l FLr.ctic r. Learn more Oli n ... f lrl r N p:.n ',--,,-,---~~~~TIM~~ nename .. - X Dat a Oe:;ign Proj ect JJ Dat a Oe·~·el op m ~nt Pro ject r? r rojoC" .. ? t'-..evert -=" IJI· 'v'lr dvv.· H ell= Refresh rc~:>Urcs. correct tc Wh;,t Is 01.'15 E-xplorer DBD • nd PSB T•sks Convert line IJehmrters 1·::> W c rk w ith 'y"OJr L.BD : md . 1-'1 1nL. :r;r_' ~ Sw i ' h VJr ~rhp;-u;~ n.es:art IMS l nfonnntion Cent~r View th~ (MS E;<plc r~ r -:locumc nmtion. : O ""r· t:ln -.lr -l ""·· ho w (MS F• r:ltrrl-!r •.il1' fl li "iH· rse rC$DUrc ;. I M~ :.~pplic-l l ion dcv~ lopmcnt. 5Ql on d puroQuory Toslcs Wc ok wilh S~l " " d f" " eQ<' " ')' :o ' I" " 'Y JMS d ;,l;, hun I he z/ OS S S.tcm . ' IMS Explorrr w~b P<l9e I ""-u rr rrr:lfl-! :-tbo u l l t.AS. F:r:plor ~ r r rtpo-tbili l i ~ ., -w rl prc dJ:-t ir --.:c orotion. · ~ l mp o rr.... Ctl i:U19e~ to d St-!1-! -l .; IJIHIIIa liYI-! li< r t. ' 1 ,l ".-JilUI-'-" Ill D:po rt.. 01.15 EYPIOrN by VB~Ion rus h pbrt·!f, rt-!lrth·d in$1JIIJt ion i r "':. rrn~tic n, ~n ::l krown i$ ;r.lc~ ~nd Properties A lt+Cmer 1 2 S ~ U:PSB.p;b w:> rka round~ . 52 1 J:DB D.d~u (CM66~rujecliDBDI ICM OOr rojcct/PSB] 3 S2UWXD.dbd fCMG6ProjectiDBDI It T:~ :J:. Laum.:il ~1 D:it l:i Dcrl:•t ~mplc Cc r ncction ,iJ MyiMS 123- ODA Dat a Scurces ~-· Cl assi c Mc dels (n: . Samp le C rlat rile Cat a Scr..r·:::e ro JCSC Dat a Scr..rce 10 We b ~erv~e-es D a ta ba~e = - Proportie< SQL Rc·sull$ T~y·pe QJ~ry· expres:;ic n here :it atus ~' ···-s~ P.';;;";;; Er;;;;;Li;''"==~~~~~~~~~~~~~~~~~=;-----------------------='--'-X'---' ~; ' ; 'c;;; rcr ; ;; 'm il ~"-'-I'=I::i"--'=l"-'-l-='··__------l 1--- ·. · ~ t:l' Operat ion Dat e :;rat sl u Connecti :>n Profile l)at a Scr..rce 10 XM L IJat a ::>ource Ill n.::.- 0 it~m ~ s~lected • “File” > “New” > “Data Development Project” © Copyright IBM Corporation 2013 175
    • Data Development Project ~ Data Development Project Specify a basic definition for the new project. Use the project to store a set of objects that can be deployed. L_/ £roject name: Access_IMS_w ith_SQL L < f!ack ~L'--=N ___ =.ext > _J L finish~ l __ L- c _a_n_ce_l_----' • Enter the name for the new data development project, then click “Next” © Copyright IBM Corporation 2013 176
    • SQL Script • Create an SQL script by using the SQL Query Builder. • In the SQL script, specify the SQL query statements to run against the IMS database. • Procedure – In the Data Project Explorer view, expand the data development project pane. – Create an SQL script. Right-click the SQL Scripts folder and select New > SQL or XQuery Script. – Enter a name for the SQL script. – Use one of the following options to create an SQL script: • To enter the SQL statement as text, select SQL and XQuery editor. • To graphically create the SQL statement, select SQL Query Builder. – Click Finish. © Copyright IBM Corporation 2013 177
    • Select Connection Choose to use a new connection or select an existing connection. Connections U I Derby Sample Connection liD My IMS New... l BIRT Classic Models Sample Database Ed1t... [ Delete '-- • Properties Property Va lue ~--- ~a_ k__~IL[__-=N~e-~ > __~] <~~ c_ __ ~' L[____ E_in_i_sh ____ L c_a_nc_e_l__~ l ____ • Select “My IMS” in the “Connections” panel © Copyright IBM Corporation 2013 178
    • Select Connection Choose t o use a new connection or select an existing connection. Connections 6 I I I BlRT Classic Models Sample Dat abase lJ Derby Sample Connection I~ MyiMS I New... Edit... Delete I I I • Properties Property Value Name My iMS Descripti on Category Database Connections Database MyiMS JDBC Driver Cl ass com.ibm.ims.jdbc.IMSDriver Class location C:Program Files (x86)IBMSDPIi... <_~_a_c_k__~IL[____ N_e_x_t_>__~l L[_____ _i_h Ein s ____~l I ____ L c_a_nc_e_l__~ L __ _ _ • Click “Finish” © Copyright IBM Corporation 2013 179
    • Data Project Explorer • Once connected, the Data Project is shown. Expand “Access_IMS_with_SQL” © Copyright IBM Corporation 2013 180
    • Data Project Explorer • Right-click on “SQL Scripts”, select “New” then click on “SQL or Xquery Script” © Copyright IBM Corporation 2013 181
    • New SQL or XQuery Script • Enter a name for the script, and choose either “SQ and XQuery Editor”, or “SQL Query Builder” © Copyright IBM Corporation 2013 182
    • New SQL or XQuery Script • Select “SQL Query Builder”, Statement type: SELECT, and click “Finish”. © Copyright IBM Corporation 2013 183
    • Data perspective ·'»- -, ~ 11e r~.. 1 l:dr': N av1 ga-.:e Searct" ProJect r~ ~ n ,; ~ q. - ,;> ~ , - .dM Kallollil l.leYelo Uata SQL 1:un ii' ' ~ ;',J ~ r tor zt '-1J~ - - - - - - - - - - -- U earCase JM:: txplorer Wmdcw •eo ·o:= - =: ~ ~ Cl'" _ - x- Help lj. _ _ _ _ _ _ _ _.== 'q__ - _r- 1$ J~ S F:a:plm t-!r Ta!-.k I :.fun: I t>r Eo...:e_ v_ -1 illi SQI _I, _H.tS_h = r-, · ~ Or.l lirrt-> ~""····-.• ~ R~rn:llt-!S)•·.It-!111!.] I !:&, ~ t;_ =:t:'l' :~~~ tl) Acc-e.ss U1S with S-QL (My IMS jdbc.;ims.//9.30.132.182 GGG ¥ G/CFSC ~ >C!L )wpts ()o SELECT Statem ent SQL to IMS l.sql f'Oii ~ ~QUoJM>.J..;ql ~ XM L l c add a t 3ble nght- chck. m t has pane ar d L.se the pop- Jp menu rl DISTINCT ~~;;;;;;;;;;~~~~~;;;;;;;;;;L=======c~'J ~ t.or d1tl.:ms l u rJups [Urcup Conj 1bons[ ~ ~ ~~~ ~~ ~--=~~=~~~-~= ~~ ~~~ ~ '~ C' ~ ;;; 1 <ql! 1~.u.d I IQ. @I ~~==~=~=====~---------------------------------,11 Column Alias Output Scrt Typ e Sort Ord er 0 :'1n h :"J>r. l c.r nN'Jinn", Q RfRT (],, ;sj.; M r:fl.rls S. mplr. 0 :1i,l h:"J;r. 1 Cl 16 ~ Dcrt•1 Sample Cc r ncction ~ MyiMS Scurces ODA Data !£?.· Classic Mo d els Inc. Sample D ataba ~e 0 rlat rile Dat a ScL.rce 10 JDBC Dat .:: Sc 1..rce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~============~~~~~~~=-=~~ "' Pro portio,; p= SQL R~sul" ~' ··., VI Remote Errc r Li'ti iOl lt iflll:::i ;'] I 1'· ·.· ~ t:l' · Type Q J ~ ry expres> icn here ~tatus Operat ion Dat e Statu s I COnnection Profile 10 Web SeN1 lJata ~ 1..rce ces 10 XM L IJata Source Ill • Showing SQL Builder (tab SQL_to_IMS_1.sql) © Copyright IBM Corporation 2013 184
    • SQL_to_IMS_1.sql @; IMS Explorer Task Launcher ~ELECT =LJ 19:1 SQL_to_IMS_l.sql ,&3, * FROM To add a table, right-click in this pane and use the pop-up menu. [J DISTING l i 1 Columns Conditions Groups Group Conditions I Column Alias Output Sort Type Sort Order • Detail of the SQL_to_IMS_1.sql panel © Copyright IBM Corporation 2013 185
    • SQL_to_IMS_1.sql 12) SQL_to_IMS_l.sql ~ @; IMS Explorer Task Launcher SELECT ""Ll * FROM iTo add a table, right-click in this pane and use the pop-up menu. i ! Add Table ... . 1•• ~.~··~·~-·~·~··-··-·-··-··-·-·····-··-·-..- ··- · - ··- · - ··- · - ··- ··- ..- ··- ··· ··- ····· - ··- · - ..- ··· ··- ··- · - ··- · - ··- ··· ··- ··- · - ··- ····· - · - ··- ··- · - ··- ··- · - ·· -· - ··- · - ··- ··- · - ··- ··· ·· -····· - ··- · - ..- ··· ··- ·· -· - ··- · - ··- ··· ..- .._ · - ··- ····· - ··· ··- ..- · - ··- ··- · - ··- · - ··- · - ··- ..- · - ·· -····· - · - ··- ··- · - ..- ··- · - ·· -· - ··- · - ··- ··· ..- ··- · - ··- ····· - ··- · - ..- · - ·· -··- ·- ·· - ·- ·· - ··· ..- ·· - · - ·· -·- ··- ·····- ..- · - ··- ·· -· - ·· -·- ··- · " ICI DISTING l l l Columns Conditions Groups Group Condit ions I Column Alias Output Sort Type Sort Order • Right-click in the middle pane, and click “Add Table” © Copyright IBM Corporation 2013 186
    • Add Table • Select the table (segment) you wish to access, then click “OK” © Copyright IBM Corporation 2013 187
    • SQL_to_IMS_1.sql ______________________________= Ll _ -.1 ~ IMS Explo rer Task Launche!...._j 19) *SQL_to_IMS_l.sql ~;f......., SELECT * FROM DFSCATOO . DBD ··-··-·-··-·-··-··-··-··-·-··- ··-·- ·-··-··-··-··-·-··-·-··-··-··-··-·-··-··-·-·-··-··-·-··-··-··-··-·-··-·-··-··-··-··-·- ·- ··-··-·-··-··-··-··-·-··-·-··-··-··-··-·-··- ··-·-··-··-··-··-··-·-··-·-··-·-··-··-··-··-·-··-·-··-··-·-··-··-··-··-·-··-·-··-··-··-··-·-··! • I ··-··-··-··-··-··-··-·-··-·-··-··-··-··-·-··-·-··-·-··-··-·-··-··-·-··-·-··-·-··-··-··-··-·-··-·-··-··-··-··-··-··-··-·-··-·-··~ DBD i "' HEADER_RHDRSEQ ~ ..:..! i IDXNMlS -' I• ~ IDXNM16 • I r- RMRBN I "' RMNAME ! :.:___ SEQNUM "' ·.;..;..; '~ .;. ; ! "'..;....;~·.;.;_·.;. ·~- ~ ! ·; . 1·-··-·-··-·-"-··-·-··-··-·-·····-··-·-..-..-·-··-·-··-·-··-··-·-··-.....-.....-..-.-..-·-··-··-·-··-·-··-·-..-..-·-··-·..··-·"··-··-·-··-"-·-··-·-··-·-..-··-·-··-·-··-·..··-··-·-..-·-··-··-·-··-·-··-·""_ ,_ ,,.,,_ ,_ ,_ ,,_ ,,_ ,,_ ,_ ,_ .·"_ ,,_ ,.. .,_ ,,_ ,_ ,_ ,_ ,_ ,,_,_,,_,_,,_ ,_ ,_ ,,_,_,,_ ,_ ,_ ,_ ,,,,_ ,_ ,_ ,_ ,_,,_ ,_ ,_ .. ,,_ ,_ ,_ ,_ ,,_ ,,_ ,,_ ,,_ ,_ ,,_,,_ ,,_ ,_ ,,_ ,,_, ,,_,_,, _,_,_,,_,~,-··-·-··-·" IO DISTING l l l Columns Conditions Groups Group Condit ions I Column Alias Output Sort Type Sort Order • The selected table is shown in the middle pane, and the SQL generated to access it is shown in the top pane. © Copyright IBM Corporation 2013 188
    • SQL_to_IMS_1.sql ~ IMS Explorer Task Launche!....J ~ •SQL_to_IMS_l.sql .&l.'-.. ""Ll .... ~ELECT * FROM DFSCATOO . DBD Cut Copy Paste Content Assist Ctri+Space Content Tip Ctri+Shift+Space ~ ~ ~ Revert to Last Correct Source Clear to Template DBD • • • . : Change Statement Type... HEADER_RHDRSEQ ~ :] IDXNM15 IDXNM16 RMRBN RMNAME SEQNUM ·~"~· ·~ Omit Current Schema... Run SQL .:.1 . ICJ DISTINCT l l l Columns Conditions Groups Group Conditions I Column Alias Output Sort Type Sort Order • Right-click in the top pane, and select “Run SQL”. © Copyright IBM Corporation 2013 189
    • SQL Results • Results from the SQL are shown in the SQL Results pane © Copyright IBM Corporation 2013 190
    • SQL Results • The status tab shows the SQL executed, and the time taken. © Copyright IBM Corporation 2013 191
    • RDz – Data perspective ' ~ 11e J [~ ~ ~ ~e ~ q. - ' - .dM Kabona Uevekl rtin I l:dlt N av1 e Searct" ProJect gat # ~ il' Uata SQL 1:un '{ ~ ; 1 ~ ·· tor zt ~~1m" ------------- ~ Cl _____ -X - U earCase J M= b.plorer Wmdcw Help ·- - I& _ _ _ _ _ _ _ _.==o___:e___ -lfr~;;S;;;;l,;;;""';;;;;!o;k;; ";;;";;;;;~d.::__:.:::ec:e:.:::::.::_:::::.·:~ 11:_:1' -""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,!.I ~ 0 1. liru"' ~.... ·--. ~ R~rn:lh·! S)•-.lt-!m!.] E 'q. v -_r- ~ IM ; F.pI<;;;;· T";;; l;;;"' ;; l "' 1l: "Ql ' "-iM <;-1:..:~ :_: .l -_' -" tl) Acc- ss IMS with SQL (My IMS jdbc:ims..//9.30.132.~82 GGGG/CFSC e ~ t;- C:C'l' ... ~ SELECT Statem ent SQL to IMS _,sql >QL >mpts fROii D fSC.~T ·)O , DBD c= ~ ~QUoJMS_:..;ql C XML I ~HFAflFR_R~ lDXNM ~S " '::J"'' '·.,-.:J rl DISTINCT ~~;;;;;;;;;;~•~~;;;;;;;;;;L~~~~~==;~·J ~ n - ~~=~ ~-~~~=~~=~~~=~~ ~ ~~ - (_-+ 1=1 t~ ~ 1rn1 ~ 1~.uA l iB """ Column t.or d 1 tl.:ms ( UrJUps [lireu p Co nj 1 ons[ b ~~==~=~=====~---------------------------------,"1 Alias 0 Lt put Scrtl'jipe Sort Order n ::-:'lh :"J;r. lc. r nr.c.tinn~, Q Q RT OFJ ;~i-:- M r.rl ~l ~ S.'lmplr. 0 :;.-,l h:"Jir. RT Dcrb•1 Samp le Ccr ncctio n ~ My lMS 123 ODA Data Sotlrces ~.· Cl a ssi c Mod els in: . Samp le G3- n at rile D~ t~ Sot.r·:::e ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~==============~~~~~~=-=~~ ;= Prop~rti~ ~SQL Result. ~...Vl Remote Errcr lis.t] ~ . x ~ I ~;J ~ I ::.- . ~t:1 Databa ~e I Ty·p.e Q J ~~· expre s~ic n here Status Res lti u I 10 We b Serv1 c.es l)at a Sct.rce "Status ~ ~t.Llt!t!:J t!:J AC cess OSACC ~117?. HflA... ~073 I IDA.. DSAM I ICADCR RIIDRSCQ CTL SC QNUM CATVCI'C.S DODSC TSVI:RS RL Q VL ORr. AOF H") llP DOD ~ 'lill.f lO:. ~ ~ 'lO:O;:i I'M PA VSAM COnnecti::m Profile Operat ion Dat e St:LI:·:..-:1 " .. My lM~ COCDDD on 0 fD@I l .. ?0" ' .. lOl l -.. U~ IJ 10 JCBC Data Sct.rce UHOO/V IJH (I L H~cc. . 201~ - ::lU.'3 HJUI.. V~N'II flRr. OP.007fi f)P, G [ P.@r~... ?01, .. ~07?. Hlfll>... VSAM 10 XM L IJata Source ~ (P.@'~-- .. @ DOD on 0 r o:~ 6: .. IIJDA.. /SAM IJH [)P, ~· G .. lOl l -.. 201~ -.. ~073 UHOO/&S::: OP.007fit;:: l ~WH ::lU/3 p [P.@oR.. 7017 .. ~07~ L NUioX iNflFX V~N'II nRr. VSAM p DOD n~- 000076 u~~· DD0076SJ on 0 ID S4.. © lOl l -.. ~073 !NDDC VSAf..4 p . "' T c.;:al 98 recordi sh.o wn "' Cisphr jied 1 o~ 2 r.~~ults 1 sJ::ceeded, 0 fa il~d, 0 term im~te::J, 0 warninq. 0 critical erro r © Copyright IBM Corporation 2013 192