422 IMS Connectivity in an On Demand Environment: A Practical Guide to IMS Connectivity
21.3.1 Example of using the DLIModel utility
In this section, we show an example of DLIModel utility execution. We create the metadata
class from the IMS IVP application (DFSIVP37) for later use of our RDS sample application.
Example 21-15 is the PSB source of DFSIVP37, and Example 21-16 is the DBD source of
IVPDB2, which is referenced by the DFSIVP37 application. Both of them are in the
IMS.SDFSISRC library. Note that the member name of IVPDB2 is DFSIVD2.
Example 21-15 DFSIVP37 PSB source
PHONEAP PCB TYPE=DB,DBDNAME=IVPDB2,PROCOPT=A,KEYLEN=10
SENSEG NAME=A1111111,PARENT=0,PROCOPT=AP
PSBGEN LANG=JAVA,PSBNAME=DFSIVP37
END
Example 21-16 IVPDB2 DBD source
DBD NAME=IVPDB2,ACCESS=HDAM,RMNAME=(DFSHDC40,40,100)
DATASET DD1=DFSIVD2,DEVICE=3380,SIZE=2048
SEGM NAME=A1111111,PARENT=0,BYTES=40,RULES=(LLL,LAST)
FIELD NAME=(A1111111,SEQ,U),BYTES=010,START=00001,TYPE=C
DBDGEN
FINISH
END
Table definition of IVPDB2
Figure 21-8 shows the table definition of the IVPDB2 database. We change its segment name
and field name into new Java aliases and add some fields that are not defined in the SEGM
statement.
Figure 21-8 Person table definition from IVPDB2 database
DLIModel utility execution
You can run the DLIModel utility in two ways:
Standard z/OS batch job (BPXBATCH)
Execution from command prompt of UNIX System Services environment
In this example, we execute the DLIModel utility in a UNIX System Services environment.
Table 21-3 on page 423 shows the directories and PDS locations of our execution.
ZipCode
(No DBD Definition)
Extension
(No DBD Definition)
FirstName
(No DBD Definition)
LastName
(Field Name in DBD :
A1111111)
D0n/R0n8-nnn-nnnn…FIRST n…LAST n…
D02/R028-222-2222FISRT2LAST2
D01/R018-111-1111FIRST1LAST1
Table Name : Person (Segment Name in DBD: A1111111)
Chapter 21. IMS Remote Database Services 423
Table 21-3 DLIModel utility execution environment
Example 21-17 shows our control statement for the DLIModel utility.
Example 21-17 Control statement for the DLIModel utility
OPTIONS PSBds=JOUKO2.SRCLIB.IMSRDS <1>
DBDds=JOUKO2.SRCLIB.IMSRDS
GenJavaSource <2>
OutPath=/u/jouko2/imsrds <3>
Package=redbookRds <4>
GenTrace <5>
PSB PSBName=DFSIVP37 JavaName=DFSIVP37DatabaseView <6>
PCB PCBName=PHONEAP JavaName=PhoneBook <7>
SEGM DBDName=IVPDB2 SegmentName=A1111111 JavaName=Person <8>
FIELD Name=A1111111 Start=1 Bytes=10 JavaName=LastName JavaType=CHAR <9>
FIELD Start=11 Bytes=10 JavaName=FirstName JavaType=CHAR <10>
FIELD Start=21 Bytes=10 JavaName=Extension JavaType=CHAR
FIELD Start=31 Bytes=7 JavaName=ZipCode JavaType=CHAR
Note the following points in this statement.
For the OPTION statement:
1. Specify the data set name of PSB/DBD source data set.
2. Specify to generate the metadata class Java source file.
3. Specify the HFS directory where the DLIModel utility writes the output files.
4. Specify the package name for which the IMS Java classes are generated.
5. Specify to generate a trace file named dlimodeltrace of the utility run.
6. For the PSB statement: Specify the name of the PSB that is used by the DLIModel utility
and its Java alias name.
7. For the PCB statement: Specify the name of the PCB and its Java alias name.
8. For the SEGM statement: Specify the name of the DBD (with segment name) and its Java
alias name.
9. For the FIELD statement: Specify the name of the FIELD in the SEGM statement and its
Java alias name/data type.
10.For the FIELD statement: Add the three fields that are not specified in the SEGM
statement.
Resource Location
PSB source JOUKO2.SRCLIB.IMSRDS(DFSIVP37)
DBD source JOUKO2.SRCLIB.IMSRDS(IVPDB2)
DLIModel utility control statement /u/jouko2/imsrds/@dlictl
DLIModel utility outputs /u/jouko2/imsrds/
DLIModel utility execution file /SC53/imsv9/imsjava91/dlimodel/go

Get IMS Connectivity in an On Demand Environment: A Practical Guide to IMS Connectivity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.