accessing ims databases with ims explorer - ims ug singapore 8-2013
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
© Copyright IBM Corporation 2013 138
u~,~ t:.xplore· - I ask ~~ , . - -= IJl - x-~rle t dr': N:rvrga":e ::,earct" ProJect Ht..n IM) t xa:lc rer Wrr d.)A' HeiJ;
a\ IRF ~~~lc :tn I ihrmy [jdk)
9 ir r ;uc1t:Jilr C'\rrogr.~ l""" Fil"" 1 ).:'o\ rDt :.r.• ~p ... _ "\) om ~ rse
Ta~k Overview
G~ing Stnrted TMk!.
Get $-t<lrtcd with It..tS E:~o:p lorcr (im j:o rt rcs.: u rcc·s., .:::c r ncct tc z./OS populate the IMS (atalo;;,~).
DBD 11nd PSB Tl'l$k!
Work w ith y·oJr DBD .:md PSB rcs..oJrcc s..
Learn more
(l) IMS lnformlltion CentiN
Vi~w t t'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 !:implifiRo; TMI\ ..;ppl i: ,.; it HI
dC'v'Cic pn .:-r,;;
IMS Explorer ~b page
I f-!:i rn met ~ ,.;h :Htl Tt.AS F~pl : tt t-!1' c -tp:i hililif-!', oi nd ocs:·.- p m d u< I ir-:::-~~tion.
Changr:s to IMS hplorr:r by version
'..t>t> a < wnul -t liv~ li•.l of c h:iiiJ I-!L. IH IMt:; F:<pll:ti-!t, t ~l ,.; ~ : 1
ir :>tJIIc1t ion infcrm~ti')n, cr d known i:;$JL·> c1n:l v.•orkcroun:l~.
~;;;;;;;;;;~;;;;;;;;;;;~J· I "'l Properties '·' '· ••• .,.'!')"--! I ['--'-"-rrorr-""-" loq-=I!Z=-~ P'---'-"rob'-'-"-'lerr·:s-'--] ___________________________________ _____,l!L==LI'-='---~· ---= " :1=---~t::l--1
·~ Llal< ~cc~e• I:>:IJior•r ~; '· ••• '&'. Navt~alor · = n Pr.opert'l Value
G s ~ IDJ ·o> i e.u l ll'l ~ e U:;tab::~~e <.crnecbon~. """
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.'"'-"·
n"
B- C.l - 1.~,j , M<:ti. ·l~ lu: Sample 0 -tl·tbrJ,c
Jd Flm Fil~ r:mn ~r.1.rc~
Jd 1r:P.r. r:<1M Sr.t.rrr. ~ Web Serv ices Dc1to Set. r.::e .-. v • • ~-·- r .
Data Source Explorer
• In the Data Source Explorer panel, right-click on Database Connections
© Copyright IBM Corporation 2013 139
New Connection
• In Select a database manager, scroll down and select IMS
© Copyright IBM Corporation 2013 140
~ 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 f:l DB2 for Linux, UNIX. and Windo1LJ DB2 for z/OS Derby Generic JDBC
HSOLDB,_----,::-:------, ( c Ill
I Test Connection I
JDBC driver: \ooudscape- Cloudscape Embedded JDBC .... I
Properties
Database location: C:\ CioudscapeDatabases\ MyDB
URL: jdbcdb2j :C:\ CioudscapeDatabases \ MyDB;create=true
171 Create the database if reauired
Browse ... I ""
<Back ~--N_e_~ __ > __ ~l ! ~----Fi_n_is_h __ ~] !~ ___ c_a_n_ce_l __ ~
New Connection
• 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
C."lnn:'\"1iti O i rt~r-i fir . .:-i:~n
P" L se detault nam_on_cg_o_o_n,_·e_r -_.lo_n ____________________________ ,
f !.!rll"r' r l ic u Nm m :: -'M-'''--'-1~._..1S'---------------------------------_j
CloJd~cape
0 8 2 fer i :::,'OS
DB2 f<..:1 l inw;, UNIX. i.1nd WiwJ;Jw~ r>R? fc:r 7/ 0 S
Derby G~nenc. JLJIK
H~l llR
HS fnformix Ma:<V~
MySQI Oracle S(.,!l. :::er~o~er
Syba>e W-~h·;r. l" r.rr-
[ 1ert Cor r ecttc-n ]
(?~
lf)P.C: rlri\o'H [1M::. \'1::: l ln ii:Pr.'=il JI)RC.:Ori-.:Pr f).., faull ,\
l'ropertiES
t:eneral TrM in!J lorrinn:'lll
*Connection r ame; My 11-AS
*H<..:~t 9.~0 H :l.Hi d
•rort numhr.r: 6666 User name: - CJ-Cc-.·--·n ____________ _
Passwo rd:
1r 1 Save password
D~fuJit 5chcm~:
Metadata 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;
~--·~B~':_k ___ L __ ~No~~-'--~1 L~ --~£~in_i<_h __ ~l ~~ ___ C_J~----~
Connection Properties
© Copyright IBM Corporation 2013
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)
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
• We now have “My IMS” in the list of Database Connections © Copyright IBM Corporation 2013 144
IMS F)lplor~.. Wro
£ilr. £r1ii t:!:'J'~·i ~)i1it: ~}ret' eroj r.N El.n ™~ F:<r lr:r:-:r ~irr1 :')'J.' t l.r·lr
'ID Projec: D<J: Ior~r >..:.< · • • }: Package [xplorer l ,...., Ef (~';, JMS Cxplorer Task Laun: t'er 1'-1 Wel:o11~ t 'J z/ 0:1 Proj~:-":5 >..:.~ ·
ii; CM66Pr<iect
~ lM:::. Univcr>al Cri·~·ers Metadat a
a\ JR[ :;:,.-stem library [jdkl
c !!- 1-:i- v
g iruudt.jar • C\P'"Ogrcr · File5' •:X8G:\ IBf...t\SDP\Iit
L':) LJW
~ P~l::!
Ill
HI C<:~to Snrce Explorer ~ ~ .. N~wi~<:~tor .... t:l.
r=~ ·~ \ill []) -.<I ~ .:.1 I§ v
.... "~ o ::.-:'Jh :'J; r. lc.rnr.rtion~,
W BIRT O<:~;si ::: Mc d:-ls Sample D::::;::::~b :::~ ;e
tf Dert:•t Sample Cc r nection
• .ill MyiMSI 1.- 0 My iMS
• 10 ODA Date Scurces
10 Class1c Mc dels Inc. ~ample U ataba>e
10 1-lat tile L:ct c ~ct..r<:e
e Jt;I::!C t;at .s ~ct..rce
Welcome to z/OS Projects
The Z/OS Proj ects perspective offers an integrated development environment th!!t lets you develop !!nd mllintllin !lssembler, COBOL, PL./I, and C/ C+ + applicat ions targeted to run on CICS or Ir·1S.
If you 11re new to R11tionl!l Developer for System z, )'OU can get started by we~tching demo5 or viewing Quick Tasks to learn how to use some of the features in the procuct.
For the more experienced users, follow one of the Global Auto Mart samples ( New > Example ••• > Workstation Global Auto Mart Samples) to get familiarized with the tools.
To modernize, tr~~nsform, Md Web service eMble your CI CS and Ir•1S applications, you will be interested in using the Enterprise Service Tools (Window > Open Perspective > Other ••• > Enterprise Service Tools).
~ lfl Re moteS ...
,...., Ef :;.-: OJdin~ ;..:.~ · .....
1\r o t..: hr e 1$ n:;.t .l\'3ll.sble.
e 'N~lJ ~1\'1 :.~~ LJ.:tld ~t: l.. IL~
t=> XML D .:tld SuuJl~ =:l folrcp~rbes ~~ - -... ~ t.rrvr Log._'.:.:ff_c. ,_Pro= b,le::.:rr_:_sL_ _____________________________________________________ ·_~c_~_-_:D=-j
1');-t l:·d : .. ,.p <
:..urrent us::r
:.::Unr1~l1 :.11 1
rl:'Jrl:':
0 .-:'ltJ .. NJm C
::onnec:i'Jn UKL
geottr
M1• IMS
. F:-tct'ir q child ren c f GE:JFFN.A.PPL.CBD•
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
• By default, tracing is disabled © Copyright IBM Corporation 2013 147
Pru!J.,rli"' for My IMS
IMH15§11 Common
Default Schema Filter
Default Stored Proce<
Default Table Filter
Driver Properties
Version
~ I Ill
Driver Proper lies
Drivers: IMS V12 Universal JDBC Driver Defaclt
Properties
Direc\•)ry
Fi I e nam€: [ IMS_JDOC_t rKe.tx1
0 Apper d
Trace le~el>
D Dll .A.Pl c: DRDA
0Ja~a : E C JDBC
I SPIPrt All[ F1Pft!.!l]
I Test Connect ion J
~---o_K __ ~J [L __ l_a_nc_el __ ~
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
END Connect for SQL Access
© 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
• Click on “Window” > “Open Perspective” > “Other” © Copyright IBM Corporation 2013 154
• • ~~ ----=-=' Cl - x--~11e t dlt N:rv1ga-.:e Searc.t" ProJect Ht..n lM) t xt:lc rer \1\'lr d.:r ... · Helt:
'10 ~' "je< f<FI" '"' i~'-., 11l l>~cb9e F.f~"~'-1'!;, I ::;,: : ®>~•I~"'"' h,lfaw~l-eo ~, """'------------------------------------------"..,1!~ :L~~:;~; i~n~t a- ,-,a-ile- b- le--.---------- "-1.
ti>' CM66Ptcjet-l
a\ IRF ~,.·..,lc 'ln l ihr.uy [jdl::)
9 ir r ;uc1t:j.1r ( \"1~ogr,-:r FIIC'" •:1(~1\'JP.M\C)fl'.. li t:
I'\) om q rse
'" '9.1 t.:al,; S~.; L.H.~ hjJiur~r :t~ ... ~- Na\'I ~O:llUI . = n
E:J ~ 'Jr i[!J '"" l ~u l l!il. -IC U3nb::r~e <..crnecbon~
ii OlKI Ud.~~r :.. Mt.; ll~l !. ~mple Ui f..:ll.J:be
li Dt:'rly Sd1nple (~,; r·netliun :IJ MyiM!'.
~ onA n .Jioi ~cln1 (~,
n''
H: n-..~ir Mc.rlr·ls in:-. ~"1mplr O:W1h.11r
H Flm FiiC' r:mn ~.c. r.r.;C' 8 JC:E!C C:.nJ SCLrCe
k:.· .. Web Servi~es Data Sc L rce
~ .. )(M L Data Source
"'
;-- 9\l<!~ew 1 ~I I : I .. Ta~k Overview
G~ing Stt1rted TMk!.
Get started 'Nith It.AS Expl:~rcr (im j:o rt res.:~Jrccs., .::c rrect tc z/ OS populate the IMS catalo;~).
DBD 11nd PSB Tl!l$k!
W ork w ith 'y'OJr C:E!D .:md PSB res:urc: ·s...
.;;g' 5QL ond pur<Quory Tosk• 4l4t{ Work wilh 1\QI oiml pur~.l i-!1 )' :1 qu~y iM I\ :1-tl:i fr u 11 h;.> l/0~
;y$t:C·r1.
·~ Prcp~rties ~£'··~~ error Loq' I!: Problerrs]
VaiJ~
• -. Learn more
(I) IMS lnform!'ltion CentiN
\li~·,~,~ t l"c lMS Explorer do~L.rrcntuti :~n
Wti<Jt I~ IMS h plorcr nf.ml( :l · •.h.~ l ..._ .. h: I.A.' iM S. FxpiCllt-1 !.implifi..._ .. i M I\ ..;flpli: ,.; it Ill ::l~·v·ctcpM~rt
IMS Explorer ~t» page
I f-!:irn lliC:I i'! ,.;h :n ll Tt..AS F~pl : 11 t-!f c -lfMhililif-!', oind oc:!l.·.- p n uh J< I
irt:O~I<)tion.
Chang~s to IMS hplor~r t»y version
:::.,., :i CllllltJI -t liv.- li•.l o r ch;mJI-!L. It I iM I\ F:<FIC:Ii-!l , l i-!lri i-!:l
ir s.tJIIJtion infcrr'l~ti ':'ln. cr d kn01Nn i :>sJc·s. ~n:l v.·orkJr'Jun:l~.
Open Perspective
• Select the “Data” perspective, then click “OK”
© Copyright IBM Corporation 2013 155
RDz – Data perspective
© Copyright IBM Corporation 2013 156
~11e l:dr': N av1ga-.:e ::,earc.t" ProJect Uata l-!.1 .. r :.learCa~.e IM) b:J;Iorer W1r d.Jv.· H ell=
r~ .... n ,,; .:=. ~ .... # .... ~~ ~!- .... h .... " · ...... ....
".t- r..-tl ... P111_1 t-1 I Fxplo rH ~ ________ .:=Eo___:'qe_' _v_ - _r---l l,$ 1tJ!S Fxplm +-'r T..t.,k I ;-tun: I·H ~ ... · ...•• .._""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"-" r'1...i.l ~ 0 1. li11+-> ~ .... ·--- ~ R~m:llt-! Sy-.11-!lll!-; • ::;:.:-.,__---..
.... (_-+ 11!1n h :"J;r. lc.rncrtinn~,
Q RTRT (];y;si,; Mr.rl~ls ~1mplr. l1!1-1h1i r.
[J Dcrt:•1 Sample Cc r ncction
~ MilMSj
.... 123 ODA Data Scurces
~-· Classic Mc dels In: . Sample Databa~e
G3- rlat rile Data ~cL.r·:::e
fO JCBC Cata ScL.rce 10 Web ::ierv~ees l)ata ::,C1..rce 10 XM L l)ata ::iource
Ill
n~- liD My IMS (Cis: o rmected;
I GeHing Started Tasks I DBD and PSB Tasks I SQL and pure Query Tasks Pro~r<n<=
Ta~k Overview
Getting Stl\rted 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:;,
'il ' SQl ond pur.,quory Toslcs ~~ Wc:rk wilh SQI ;-tnd p tll t-!Qlli-!1)' lo qul-!fy I~AS d:-tl:-t h u 11 I hi-!
z/OS S\'S.tcm.
~ rrop~rti~ ~ SQL Rc-sul~ ~~ '··~ ill Remote Errc r List
Ty·pe q J.ery txprts~icn here
:itatus Operat ion Dat e Connecti ::m Pro file
Learn more
IMS l nfonnntion Cerrt~r View th~ IMS E;<plcr-~r documentation.
iO Wh<lt Is 11'1.'15 Explore-r Oi-!l'l:m-.11 o~ l i-! ·. ho w tMS F"r:l1111-!1 •.il1"flli ' iH· n~t~ :-tpplico~ l ion
dcv~lopment.
IMS Explorrr w~b p<lge
I i-!~ lt 1 H I : lf l-! ;-thouiJMS. Fxplclf~r 1 ;.tp;-thililit-_., o~ 111 l prc dJ: t in c,qrotion.
Ctlange~ t o IJI.1S Explorc:r by VB~Ion
St-!t-! .rt .; Ul111lliilivl-! li-.111- .; 1·.-tnut-'-.. In ru~ h p b rt-!1, rt-!liih·!d inst ollot ion ir "':.rrno:~ticn, ~n:l kf1.o·,,on is :;ue~ and workaround~ .
5tatusl
An out line is not availab le.
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
• 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
f Properties for My IMS __ ____..,_~~ ~ ~----
[type filter text _j Driver Properties .... .... ....
Common
Default Schema Filter
Default Stored Proce<
Default Table Filter
Driver Properties
Version
~ I
Drivers: J IMS V12 Universal JDBC Driver Default
Properties
•connection name: My IMS
•Host:
•Port number.
User name:
Password:
D Save password
Default schema:
9.30.132.182
6666
myuseridj
••••••••
Metadata source: I.._IM_ s_c_a_t_al_o..:.g ____________________ __, .... J
PSB: DFSCP001
URL: jdbc:ims://9.30.132.182:6666/DFSCP001:dpsbOnCommit=true;fetchSize=0;
I Test Connection J
L_ ___ o_K __ _JJ IL ___ c_an_ce_l __ ~
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
© Copyright IBM Corporation 2013 163
~11e t dr': Nav1ge-.:e ::>earct" ProJect Uata 1-!.t.r :.learCa~.e IMS b q::lorer W1rd~v.· Hell=
' '•k r..'tl ... P111_1 t-1 I FxplorH ~ ·· .. __________ .:=Eo___:'qe_' _v_ - _r---l l,$ 1t.<!S Fxplmt-!r T..t-.k I :i un: I H ~--.... __
·~:g:-:---.:..:..._ - - --
C..-t o ::-:"Jh :"J;r. lc.rnc.r.tinn~,
{j RTRT (];r ;sic Mr:rl~ls S.1mplc. 0 :;-,l h :"J;c.
Q Dcrt•1 Sample Cc r ncction
,ID M)'IMS
U r.tv ltAS
~ Authorizatic n lOs
::_ Catalogs
0 OF5CPC( •l
::J S·ct"erras
~n tJt-SCA 100 liJt{0<..0-'1 - A.,J
0 Deperderc•e~.
Ill
8 :::ilurt ll 1-'H.J;.tllr..r i::!~
Gl ToiJI•> "'1 f,RFA ( ->[)Rfl]
"' ARFARMK [ >ARFA]
"' CAPXOP.rl ( >[)P[)]
~ CAPX~FC:M ( > "G'A) ~ r.t..c::«= r -. t .. tt:. r: '
1 GeHing S
Ta~k Overview
G~tting Strlrt~d Tluk!
Get started with IMS E>:p lorcr Omp'Jrt rc~rc:~s., .::orrc·ct tc z/0"5, pcp ... la::e t he £MS cataiC'g)
DBD ond PSB To<k! W c rk w ith ~y·oJr CBD .:md rse rcs.oure;,
.t:llj' SQl ond pur<Quory To<ks ~ · Wc:rk wilh SQI <<tnd pt~rE-!QLJ~I )' lo q uf-!fy I~AS d;i l;i hc111 I h~
z/ OS S\'S-tcm.
T~y·pe QJ~ry· expres>ic n here
:;tatus
-/' ::: t.Lli:!i:!:Ji:!:J
Operat ion Dat e
:::'lill.r.zo:.~ ..!19:2~ I'M
Connecti ::>n Pro f ile
My tM:::
: n:- Displa·jfed 1 o "' 2 r.~:;ults- 1 s.J ::ceeded, 0 fail~d, 0 termim~tej, 0 warninq, 0 critical erro r
Learn more
(l) IMS l nf onnmion Cent~r
View th~ [MS E;<plcr~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.
JMS Explorrr w~b p<~ge
I ~ ~ 1 11 rr r:lf f-! :iboul lt.<!S Fxplort-r 1 <<tp<<tbilili t-_., -md prc d.1:1 ir -.:c,qrotion.
Chan~e~ t o lll.15 ExplarN by ver~lan
St-!t-! ~ .; Ul lilll<ilivt-! li<,l 11- ' lo..tnUt-'-" lo TlvtS h pbrt-!1', rt-!l,...h-!d instJIIJt ion ir "''JrmJticn, Jn j krown is;ucs and w::>rkaround~.
Status Resulti
I ICADCR RIIOR>CQ en ;CQNUM
OR[) A[)P [) [)P
DOC CDCDOO on DI:H.: VI:~OO/~ IJH
~ ORr. OP.007ft [)P,
ODD 0 00076 DO
L\~~ UHOO/~S::: IJH
oRr. OP.007ft~ :: [)P,
DOD 000076;) DQ
Ill
T o: al SO reco rdi sh.a wn
= r-, · ~ Or. lirrt-> ~..._ ··._ l ll R~rn: llt-! S)•-.l t-!111!.
An c-ut llne is r.ot available.
CATVCP.S DODSCQ TSVCRS RLVL ACCCSS
1 1<0000 .. ?0" ' .. ~117?. HilA .. OxOOOO. l Ol l -.. ~073 I lOA..
u JxUOOU .. 201~-.. ::lU.'3 Hll!l\ ..
G :l'liOOOO. ?01, .. ~117?. HlOA .. ) OxOOOO .. 2012-.. ~073 I ODA..
J J• UOOU .. 2012-.. ::lU/3 lNL'cX
G 1>'0000. ?01;- .. ~07~ TNilFX
OxOOOO. lOl l · .. ~073 !NDCX
OSACC
V~AM
DSAM
\I~N-A
VSAM
VSt..r.A
V~-f\1-A
VSAM
VStJ.A
p
p
p .
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
• Open the Data perspective by selecting Window > Open Perspective… > Other © Copyright IBM Corporation 2013 167
• • ~~ ----=-=' Cl - x--~11e t dlt N:rv1ga-.:e Searc.t" ProJect Ht..n lM) t xt:lc rer \1\'lr d.:r ... · Helt:
'10 ~' "je< f<FI" '"' i~'-., 11l l>~cb9e F.f~"~'-1'!;, I ::;,: : ®>~•I~"'"' h,lfaw~l-eo ~, """'------------------------------------------"..,1!~ :L~~:;~; i~n~t a- ,-,a-ile- b- le--.---------- "-1.
ti>' CM66Ptcjet-l
a\ IRF ~,.·..,lc 'ln l ihr.uy [jdl::)
9 ir r ;uc1t:j.1r ( \"1~ogr,-:r FIIC'" •:1(~1\'JP.M\C)fl'.. li t:
I'\) om q rse
'" '9.1 t.:al,; S~.; L.H.~ hjJiur~r :t~ ... ~- Na\'I ~O:llUI . = n
E:J ~ 'Jr i[!J '"" l ~u l l!il. -IC U3nb::r~e <..crnecbon~
ii OlKI Ud.~~r :.. Mt.; ll~l !. ~mple Ui f..:ll.J:be
li Dt:'rly Sd1nple (~,; r·netliun :IJ MyiM!'.
~ onA n .Jioi ~cln1 (~,
n''
H: n-..~ir Mc.rlr·ls in:-. ~"1mplr O:W1h.11r
H Flm FiiC' r:mn ~.c. r.r.;C' 8 JC:E!C C:.nJ SCLrCe
k:.· .. Web Servi~es Data Sc L rce
~ .. )(M L Data Source
"'
;-- 9\l<!~ew 1 ~I I : I .. Ta~k Overview
G~ing Stt1rted TMk!.
Get started 'Nith It.AS Expl:~rcr (im j:o rt res.:~Jrccs., .::c rrect tc z/ OS populate the IMS catalo;~).
DBD 11nd PSB Tl!l$k!
W ork w ith 'y'OJr C:E!D .:md PSB res:urc: ·s...
.;;g' 5QL ond pur<Quory Tosk• 4l4t{ Work wilh 1\QI oiml pur~.l i-!1 )' :1 qu~y iM I\ :1-tl:i fr u 11 h;.> l/0~
;y$t:C·r1.
·~ Prcp~rties ~£'··~~ error Loq' I!: Problerrs]
VaiJ~
• -. Learn more
(I) IMS lnform!'ltion CentiN
\li~·,~,~ t l"c lMS Explorer do~L.rrcntuti :~n
Wti<Jt I~ IMS h plorcr nf.ml( :l · •.h.~ l ..._ .. h: I.A.' iM S. FxpiCllt-1 !.implifi..._ .. i M I\ ..;flpli: ,.; it Ill ::l~·v·ctcpM~rt
IMS Explorer ~t» page
I f-!:irn lliC:I i'! ,.;h :n ll Tt..AS F~pl : 11 t-!f c -lfMhililif-!', oind oc:!l.·.- p n uh J< I
irt:O~I<)tion.
Chang~s to IMS hplor~r t»y version
:::.,., :i CllllltJI -t liv.- li•.l o r ch;mJI-!L. It I iM I\ F:<FIC:Ii-!l , l i-!lri i-!:l
ir s.tJIIJtion infcrr'l~ti ':'ln. cr d kn01Nn i :>sJc·s. ~n:l v.·orkJr'Jun:l~.
Open Perspective
• (Enable Show all if needed) • Select the Data perspective, and click OK
© Copyright IBM Corporation 2013 168
RDz – Data Perspective
© Copyright IBM Corporation 2013 169
~11e l:dr': N av1ga-.:e ::,earc.t" ProJect Uata l-!.1 .. r :.learCa~.e IM) b:J;Iorer W1r d.Jv.· H ell=
r~ .... n ,,; .:=. ~ .... # .... ~~ ~!- .... h .... " · ...... ....
".t- r..-tl ... P111_1 t-1 I Fxplo rH ~ ________ .:=Eo___:'qe_' _v_ - _r---l l,$ 1tJ!S Fxplm +-'r T..t.,k I ;-tun: I·H ~ ... · ...•• .._""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'""'"-" r'1...i.l ~ 0 1. li11+-> ~ .... ·--- ~ R~m:llt-! Sy-.11-!lll!-; • ::;:.:-.,__---..
.... (_-+ 11!1n h :"J;r. lc.rncrtinn~,
Q RTRT (];y;si,; Mr.rl~ls ~1mplr. l1!1-1h1i r.
[J Dcrt:•1 Sample Cc r ncction
~ MilMSj
.... 123 ODA Data Scurces
~-· Classic Mc dels In: . Sample Databa~e
G3- rlat rile Data ~cL.r·:::e
fO JCBC Cata ScL.rce 10 Web ::ierv~ees l)ata ::,C1..rce 10 XM L l)ata ::iource
Ill
n~- liD My IMS (Cis: o rmected;
I GeHing Started Tasks I DBD and PSB Tasks I SQL and pure Query Tasks Pro~r<n<=
Ta~k Overview
Getting Stl\rted 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:;,
'il ' SQl ond pur.,quory Toslcs ~~ Wc:rk wilh SQI ;-tnd p tll t-!Qlli-!1)' lo qul-!fy I~AS d:-tl:-t h u 11 I hi-!
z/OS S\'S.tcm.
~ rrop~rti~ ~ SQL Rc-sul~ ~~ '··~ ill Remote Errc r List
Ty·pe q J.ery txprts~icn here
:itatus Operat ion Dat e Connecti ::m Pro file
Learn more
IMS l nfonnntion Cerrt~r View th~ IMS E;<plcr-~r documentation.
iO Wh<lt Is 11'1.'15 Explore-r Oi-!l'l:m-.11 o~ l i-! ·. ho w tMS F"r:l1111-!1 •.il1"flli ' iH· n~t~ :-tpplico~ l ion
dcv~lopment.
IMS Explorrr w~b p<lge
I i-!~ lt 1 H I : lf l-! ;-thouiJMS. Fxplclf~r 1 ;.tp;-thililit-_., o~ 111 l prc dJ: t in c,qrotion.
Ctlange~ t o IJI.1S Explorc:r by VB~Ion
St-!t-! .rt .; Ul111lliilivl-! li-.111- .; 1·.-tnut-'-.. In ru~ h p b rt-!1, rt-!liih·!d inst ollot ion ir "':.rrno:~ticn, ~n:l kf1.o·,,on is :;ue~ and workaround~ .
5tatusl
An out line is not availab le.
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
• Enter the parameters needed, and click OK
© Copyright IBM Corporation 2013 171
f Properties for My IMS __ ____..,_~~ ~ ~----
[type filter text _j Driver Properties .... .... ....
Common
Default Schema Filter
Default Stored Proce<
Default Table Filter
Driver Properties
Version
~ I
Drivers: J IMS V12 Universal JDBC Driver Default
Properties
•connection name: My IMS
•Host:
•Port number.
User name:
Password:
D Save password
Default schema:
9.30.132.182
6666
myuseridj
••••••••
Metadata source: I.._IM_ s_c_a_t_al_o..:.g ____________________ __, .... J
PSB: DFSCP001
URL: jdbc:ims://9.30.132.182:6666/DFSCP001:dpsbOnCommit=true;fetchSize=0;
I Test Connection J
L_ ___ o_K __ _JJ IL ___ c_an_ce_l __ ~
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
• Starting with the Data perspective © Copyright IBM Corporation 2013 174
'1:·~ ------------ - ----- -="' IJI ~j ~11e l:dlt Nav1gat e 5earct" ProJect Uata 1-!J .. r :JearCa~.e IMS b:plorer 'v\'lr dvv.· Hell=
r~ ...- ~~ \F ..- ;1 T ~ ·-.- T - T
f-"o.;.;;;;;;;.;=-..;.;..;.;;= ;.;.;...;.;."""'--------E:::- ;...'.;:q;..., _v _ -_ r-_, I;$ 1~S Fxplm t-!r Tit-.k I ;m n : l t>r ~--,,_ ·~:g:-:---- - .,
C'~ O:t.n h :"J;r. lc.rnc.r.tinn~,
{I RTRT O rr ;!ii-:- Mr.rl~ls ~"1mplr. O :t.·,1h1; r.
U Dcrt•1 ~mplc Cc r ncction
,ID M)' IMS
J.!3. ODA Data So: urces ~-- Classic Models (n:. Sample Databa~e
~ rlat rile Data ~cL.r-:::e
ro JCS.C Data Sc1..rce 10 Web ::ieiVIces l)ata Sc1..rce
10 XM L IJata Source
Ill
n.::.- 0 it~ms s.~lected
I GeHing S
Ta~k Overview
G~tting Strlrted TIUk!
Get $-trlrtcd with IMS E>:plorcr Omp'Jrt rcs-3Urc::os., corre-ct tc z/0~. pcp ... lace t he IMS cataiC'g)
DBD ond PSB Tosk• Wcrk w ith o,·oJr CBD and rse rcsoure ;.
:o<r.' SQl ond pur<Quory Tosks ~"'- Wc:rk wilh SQI ;-md ptllt~Qui-!1 )' lo qu~y I~AS d :-t l:i h e m :hi-!
z/ OS S\rstcm .
~ Prop~rtic~ ~ SQL Re-sult. ~~ '·-~~ Remote Errc r Li~t
Ty·pe QJ~ry· expres>icn here
:;t atus Operat ion Dat e COnnecti ::m Profile
Learn more
IMS l nfonnntion Cftrt~r
View th~ IMS E;<plcr.~r .::Jocumcnrotion.
Wh ;,t Is IMS EYplarc-r
O ""rTt:m .. lr o~ [ ""·· ho w tM~ F• r:lrrr l-! r ~.i 1r · r• l i "iH·. Tl..i~ :o~pplic-o~ l ion
dcv~lopmcnt.
IMS Explorrr w~b p<~ge
I ""~ rt • rrr:lf l-! :·ilJCJUI IMS. Fxplor~r • o-tpo-tbili l i~ ... o~ud
prc dJ::t in c·qrotion.
Change~ to lll.1S ExplorN by ver~lon
~1-!t-! .j .; Ulrtrdalivl-! li.-...1 r , - ' l·a rrul-'_., I1J Tl~1~ h j•l-:nt-!1', rt-!lah-!d inst ollot ion ir "'')rm<:~ticn, o:~n:J krown i~ :>l.IC~ and workarounds-.
:;tatusl
= r-, · ~ Or. ' l ir r+-> ~ .... ·-•• ~ R~rn: llt-!S)• -. 1 1-!n~.
An c-ut l i ne is not available.
RDz - Data perspective
• “File” > “New” > “Data Development Project” © Copyright IBM Corporation 2013 175
Uata- I ask lor z . ----------- -=" IJI· - X J ~11e l:dlt N av1ga;:e ::>earct" ProJect Uata 1-!J .. r :JearCa~-e IM S b:j:-lo rer 'v\'lr dvv.· H ell=
N ew
Op~n Filr. ..
S-r .. r·
~.::h~ t.~ ..
:,av·eAII
t'-.. evert
Mov:-- ..
nename ..
Refresh
Convert line IJehmrters 1·::>
1-'11nL.
Sw i ' h VJr ~rhp;-u;~
n.es:art
~ l mporr.. ..
d D:po rt ..
Properties
1 521J:DBD.d~u (CM66~rujecliDBDI
2 S~U:PSB.p;b 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 Data Scurces
~-· Classic Mc dels (n: . Sample Databa~e
C rlat rile Cat a Scr..r·:::e ro JCSC Dat a Scr..rce 10 Web ~erv~e-es l)ata Scr..rce
10 XM L IJata ::>ource
Ill
n.::.- 0 it~m~ s~lected
Ctri+W
Clli+Shi "l +W
:""hii C
A lt+Cmer
'8 Data Oe:;ign Proj ect
JJ Dat a Oe·~·elopm~nt Project
r? r rojoC" ..
fii l"loy:,ir ill n .• •I M:xld
= r-, · ~ Or. liru- ~ .... ·--- ~ R~rn: llt-! S)•-.11-!IH!.
An c ut I i ne is no t available .
~ 11 :~r~I <.; IIH:Iti:Jn Wnhyurdt iUII
! U ~tored Procedure
rasks I DBD and PSB Tasks I SQL and pure Query Tasks .,...~,."~
~ User-D.e:"'in=d runction
? WcbSphcrc M Q U~:-r O~fin~::l FLr.ctic r.
r?" F~~.1mplr._
r? Oli n ... f lrl r N p:.n rc~:>Urcs. correct tc ',--,,-,---~~~~TIM~~
DBD • nd PSB T•sks W c rk w ith 'y"OJr L.BD .:md rse rC$DUrc ;.
:r;r_' 5Ql ond puroQuory Toslcs
~ Wc ok wilh S~l "" d f"" eQ<' " ')' :o ' I" " 'Y JMS d;,l;, hun I he z/ OS S\'S.tcm .
Learn more
IMS l nfonnntion Cent~r
View th~ (MS E;<plcr~r -::locumcnmtion.
Wh;,t Is 01.'15 E-xplorer
O""r· t:ln -.lr -l ""·· how (MS F• r:lt rrl-!r •.il1' fl l i "iH· IM~ :.~pplic-l l ion
dcv~lopmcnt.
IMS Explorrr w~b P<l9e
I ""-u rr rrr:l f l-! :-tbou l l t.AS. F:r:plor~r r rtpo-tbili l i~ ., -w rl
prc dJ:-t ir --.:c·orotion.
Ctli:U19e~ to 01.15 EYPIOrN by VB~Ion
St-!1-! -l .; IJIHIIIa liYI-! li<,l r t . ' 1".-JilUI-'-" Ill rus h pbrt·!f, rt-!lrth·d
in$1JIIJt ion ir "':.rrn~ticn, ~n::l krown i$;r.lc~ ~nd
w:>rkaround~.
- Proportie< = SQL Rc·sull$ ~' ···-s~~P.';;'m;;' ";;';;c;;Er;;r;;cr;;L;;i';;'"==~~~~~~~~~~~~~~~~~=;-----------------------=il'--'-X'---'~"-'-I'=I::i"--'=l"-'-l-=1-'--··_·._· -~-----lt:l ' T~y·pe QJ~ry· expres:;icn here :;ratusl
:it atus Operat ion Dat e Connecti :>n Profile
Data Development Project
• Enter the name for the new data development project, then click “Next”
© Copyright IBM Corporation 2013 176
Data Development Project ~
Specify a basic defini tion for the new project. Use the project to store a set of objects that can be deployed. L_/
£roject name: Access_IMS_with_SQL
L < f!ack ~L'--=N=.e_xt_> _ _J L finish~ L-l __ c_a_n_ce_l_----'
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
• Select “My IMS” in the “Connections” panel
© Copyright IBM Corporation 2013 178
Choose to use a new connection or select an existing connection.
Connections
U BIRT Classic Models Sample Database
Derby Sample Connection
liD My IMS
'--
• Properties
Property Value
I New ...
l Ed1t...
[ Delete
~---<~~~a_c_k __ ~IL[ __ -=N~e-~ __ > __ ~] L[ ____ E_in_i_sh ____ ~' Ll ____ c_a_nc_e_l __ ~
Select Connection
• Click “Finish”
© Copyright IBM Corporation 2013 179
Choose to use a new connection or select an existing connection.
Connections
6 BlRT Classic Models Sample Dat abase
lJ Derby Sample Connection
I~ MyiMSI
• Properties
Property
Name
Description
Category
Database
JDBC Driver Class
Class location
Value
My iMS
Database Connections
MyiMS
com.ibm.ims.jdbc.IMSDriver
C:\Program Files (x86)\IBM\SDP\Ii ...
I New ... I I Edit ... I I Delete I
L_ ___ <_~_a_c_k __ ~IL[ ____ N_e_x_t_> __ ~l L[ ____ E_in_i_sh ____ ~l IL ____ c_a_nc_e_l __ ~
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
• Showing SQL Builder (tab SQL_to_IMS_1.sql) © Copyright IBM Corporation 2013 184
·'»- -, 1 r~.. , - .dM Kallollil l.leYelo r tor zt '-1J~ ------------ _ -~ Cl'" - x-~11e l:dr': Nav1ga-.:e Searct" ProJect Uata SQL 1\:un U earCase JM:: txplorer Wmdcw Help
r~ ~ n ,; ~ q. - ,;> ~ ii' \' ~ ;',J ~ •eo ·o:= - =: ~ lj.
________ .==Eo...:'qe_ __ v_ - _r--1 1$ J~S F:a:plm t-!r Ta!-.k I :.fun: I t>r
tl) Acc-e.ss U¥1S with S-QL (My IMSjdbc.;ims.//9.30.132.182 GGGG/CFSC ~t;_=:t: 'l' :~~~
illi SQI _I, _H.tS_h I !:&\, = r-, · ~Or. l lir rt-> ~""····-.• ~ R~rn: llt-!S)• ·. I t-!11 1!.]
()o SELECT Statem ent SQL to IMS l.sql
~ >C!L )wpts f'\Oii
~ ~QUoJM>.J..;ql
~ XML
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[ ~~~~~~~--=~~=~~~-~=~~~~~ ~~==~=~=====~---------------------------------,11
~ '~ ;;; 1 @I <ql! 1 ~.u.d I IQ. ~ Column Alias Output Scrt Type Sort Order
C'~ 0 :'1n h :"J>r. l c.r nN'Jinn",
Q RfRT (],, ;sj.; Mr:fl.rls S.1mplr. 0 :1i,lh:"J;r.
Cl Dcrt•1 Sample Cc r ncction
~ MyiMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~============~~~~~~~=-=~~ 16 ODA Data Scurces "' Pro portio,; p= SQL R~sul" ~' ··.,VI Remote Errc r Li'ti iOl lt iflll:::i ;'] I 1'·· ·.· ~ t:l ' !£?.· Classic Mo dels Inc. Sample Databa~e
0 rlat rile Dat a ScL.rce Type QJ~ry expres>icn here Status I 10 JDBC Dat .:: Sc 1..rce ~tatus Operat ion Dat e COnnection Profile
10 Web SeN1ces lJata ~1..rce
10 XM L IJata Source
Ill
SQL_to_IMS_1.sql
• Detail of the SQL_to_IMS_1.sql panel
© Copyright IBM Corporation 2013 185
@; IMS Explorer Task Launcher
~ELECT * FROM
19:1 SQL_to_IMS_l.sql ,&3,
To add a table, right-click in this pane and use the pop-up menu.
[J DISTING
Columns l Conditions i Groups 1 Group Conditions I
Column Alias Output Sort Type
=LJ
Sort Order
SQL_to_IMS_1.sql
• Right-click in the middle pane, and click “Add Table”
© Copyright IBM Corporation 2013 186
@; IMS Explorer Task Launcher
SELECT * FROM
12) SQL_to_IMS_l.sql ~
iTo add a table, right-click in this pane and use the pop-up menu. i !
Add Table ...
""Ll
1 •• ~.~··~·~-·~·~··-··-·-··-··-·-·····-··-·-.. - ··- · - ··- · - ··- · - ··- ··- .. - ··- ··· ··- ····· - ··- · - .. - ··· ··- ··- · - ··- · - ··- ··· ··- ··- · - ··- ····· - · - ··- ··- · - ··- ··- · - ··-·- ··- · - ··- ··- · - ··- ··· ··-····· - ··- · - .. - ··· ··- ··-·- ··- · - ··- ··· .. - .. _ · - ··- ····· - ··· ··- .. - · - ··- ··- · - ··- · - ··- · - ··- .. - · - ··-····· - · - ··- ··- · - .. - ··- · - ··-·- ··- · - ··- ··· .. - ··- · - ··- ····· - ··- · - .. - · - ··-··- ·-··- ·-··- ··· .. - · · - · - ··-·-··-·····- .. - · - ··- ··-·- ··-·-··-·" . ICI DISTING
Columns l Conditions l Groups l Group Condit ions I
Column Alias Output Sort Type Sort Order
Add Table
• Select the table (segment) you wish to access, then click “OK”
© Copyright IBM Corporation 2013 187
SQL_to_IMS_1.sql
• 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
~ IMS Explorer Task Launche!...._j 19) *SQL_to_IMS_l.sql ~;f\......., ______________________________ =_ Ll-.1
SELECT * FROM DFSCATOO . DBD
··-··-·-··-·-··-··-··-··-·-··- ··-·- ·-··-··-··-··-·-··-·-··-··-··-··-·-··-··-·-·-··-··-·-··-··-··-··-·-··-·-··-··-··-··-·- ·- ··-··-·-··-··-··-··-·-··-·-··-··-··-··-·-··- ··-·-··-··-··-··-··-·-··-·-··-·-··-··-··-··-·-··-·-··-··-·-··-··-··-··-·-··-·-··-··-··-··-·-··- ··-··-··-··-··-··-··-·-··-·-··-··-··-··-·-··-·-··-·-··-··-·-··-··-·-··-·-··-·-··-··-··-··-·-··-·-··-··-··-··-··-··-··-·-··-·-··~
! •
I DBD
i "' HEADER_RHDRSEQ ~ ..:..! i IDXNMlS -' I • ~ IDXNM16 • I r- RMRBN I "' RMNAME
! "' SEQNUM ! :.:___"'..;....;·.;..;..;~·.;.;_'~ ·.;...;..;·~- ~ ! · -; 1.·-·-··-·-··-·-"-··-·-··-··-·-·····-··-·-.. -.. -·-··-·-··-·-··-··-·-··-..... -..... -.. -.-.. -·-··-··-·-··-·-··-·-.. -.. -·-··-· .. ··-·"··-··-·-··-"-·-··-·-··-·-.. -··-·-··-·-··-· .. ··-··-·-.. -·-··-··-·-··-·-··-·""_"_,_,,_,,.,,_, .. ,_.,_,_,,_,,_,_,,_,_,,_,_,_,_,_,,_,_,,_,_,,_,,_,_,_,_,_,,_,_,,_,_,_,,_,_,,_,_,,_,,,,_,,_,_,_,_,,_,,_,_,,_,_,,_,_,_,,_,_,,_, .. ,,_,_,,_,_,_,,_,~,-··-·-··-·" . IO DISTING
Columns l Conditions l Groups l Group Condit ions I
Column Alias Output Sort Type Sort Order
SQL_to_IMS_1.sql
• Right-click in the top pane, and select “Run SQL”.
© Copyright IBM Corporation 2013 189
~ 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
DBD Clear to Template
• HEADER_RHDRSEQ ~ :] Change Statement Type ...
• IDXNM15 Omit Current Schema ...
• IDXNM16 Run SQL RMRBN
: RMNAME SEQNUM
.:.1 . ·~"~· ·~
. ICJ DISTINCT
Columns l Conditions l Groups l Group Conditions I
Column Alias Output Sort Type Sort Order
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
© Copyright IBM Corporation 2013 192
' J I rtin ' - .dM Kabona Uevekl tor zt ~~1m" ------------- _____ ~ Cl - X-~11e l:dlt Nav1gat e Searct" ProJect Uata SQL 1\:un U earCase JM= b.plorer Wmdcw Help
[~ ~ ~ ~e ~ q. - # ~ il' '{ ~ ;1 ~ ·· ·- - I&
________ .==Eo___:'qe_. _v_-_r--lfr~~IM;;S;;;;F.;l,p;;;I<;;"";;·';;T;;;";;;!o;k;;l;;;";;"';;;";;;l ;;"'~d 1 . .: lll::__:."\:::Qecl :e' :.::"-:::iM.::_::<;-:::1 :..:. ·:~~11:_:1':_:-_' -""~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-~",!.I ~ 0 1. liru"' ~ .... ·--. ~ R~rn: lh·! S)•-.lt-!m!.] tl) Acc-ess IMS with SQL (My IMSjdbc:ims..//9.30.132.~82 GGGG/CFSC ~t;-C:C'l' ... ~ SELECT Statem ent SQL to IMS _,sql
c= >QL >mpts fROii DfSC.~T·)O , DBD
~ ~QUoJMS_:..;ql
C XML
I~HFAflFR_R~
lDXNM~S
" '::J"'' '·. ,-.:J
rl DISTINCT
~~;;;;;;;;;;~•~n~;;;;;;;;;;L~~~~~==;~·J ~ t.or d1tl.:ms ( UrJUps [lire up Conj 1bons[
- 1=1 t~ ~ 1rn1 ~ 1 ~.uA l iB """ Column Alias 0 Lt put Scrtl'jipe Sort Order
(_-+ n ::-:'lh :"J;r. lc.rnr.c.tinn~,
Q RTRT OFJ;~i-:- Mr.rl~l~ S.'lmplr. 0 :;.-,lh:"Ji r.
Q Dcrb•1 Sample Ccr ncction
-~~=~~-~~~=~~=~~~=~~~~ ~ ~~==~=~=====~---------------------------------,"1
~ My lMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~==============~~~~~~=-=~~ 123 ODA Data Sotlrces ;=~ Prop~rti~~SQL Result. ~\...Vl Remote Errcr lis.t] x ~ I ~;J ~ I ::.- . ~t:1 . ~.· Classic Models in: . Sample Databa~e
G3- n at rile D~t~ Sot.r·:::e Ty·p.e QJ~~· expres~icn here Status I Resu lti I 10 JCBC Data Sct.rce "Status Operat ion Dat e COnnecti::m Profile
10 Web Serv1c.es l)ata Sct.rce ~ ~t.Llt!t!:J t!:J St:LI:·:..-:1 " .. ~'lill.flO:.~ ~ 'lO:O;:i I'M My lM~
I ICADCR RIIDRSCQ CTL SCQNUM CATVCI'C.S DODSCQ TSVI:RS RLVL ACcess OSACC PA ORr. AOFH") llP (P.@'~-- ?0" ' .. ~117?. HflA. .. VSAM @
10 XM L IJata Source DOD COCDDD on 0 fD@I l .. lOl l -.. ~073 I IDA .. DSAM
U~IJ UHOO/V IJH (I LH~cc. . 201~-.. ::lU.'3 HJUI\ .. V~N'II
~ flRr. OP.007fi f)P, G [ P.@r~ ... ?01, .. ~07?. Hlfll>. .. VSAM
DOD 000076 on 0 r o:~6: .. lOl l -.. ~073 I IJDA .. \/SAM
u~~· UHOO/&S::: IJH ~· l~WH .. 201~-.. ::lU/3 LNUioX V~N'II p
nRr. OP.007fit;:: [)P, G [P.@oR .. 7017 .. ~07~ iNflFX VSAM p
DOD DD0076SJ on 0 ID© S4 .. lOl l -.. ~073 !NDDC VSAf..4 p .
"' "' T c.;:al 98 recordi sh.own
n~- Cisphr jied 1 o~ 2 r.~~ults 1 sJ::ceeded, 0 fa i l~d, 0 termim~te::J, 0 warninq. 0 critical erro r