0% found this document useful (0 votes)
76 views

Secondary Indexing

This document contains information about an indexed database and a secondary index database in IMS. The indexed database is named ASTDPPM and contains a segment called PPERSON with fields like SURNAME and PERSONNEL_NUMBER. A secondary index is built on the SURNAME field to allow searching by that field. The secondary index database is named ASTD1PM and contains an index pointer segment called NAMEIND that points back to the PPERSON segment in the indexed database. It uses the XSURNAME index field to search the SURNAME field in PPERSON.

Uploaded by

Elizabeth Owen
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views

Secondary Indexing

This document contains information about an indexed database and a secondary index database in IMS. The indexed database is named ASTDPPM and contains a segment called PPERSON with fields like SURNAME and PERSONNEL_NUMBER. A secondary index is built on the SURNAME field to allow searching by that field. The secondary index database is named ASTD1PM and contains an index pointer segment called NAMEIND that points back to the PPERSON segment in the indexed database. It uses the XSURNAME index field to search the SURNAME field in PPERSON.

Uploaded by

Elizabeth Owen
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Indexed databse

-------------------

DBD NAME=ASTDPPM,ACCESS=HDAM,RMNAME=(DFSHDC40,2,600)
DATASET DD1=ASTVSPM,DEVICE=3380

SEGM NAME=PPERSON,PARENT=0,BYTES=652,RULES=(PLV)
PROTECT=YES
FIELD NAME=(PERSKEY,SEQ,U),BYTES=9,START=1
SYNONYM=PERS_KEY
FIELD NAME=PWORKCTY,BYTES=3,START=1,TYPE=C
LOG=YES,SYNONYM=WORK_COUNTRY
FIELD NAME=PNUMBER,BYTES=6,START=4,TYPE=C
LOG=YES,SYNONYM=PERSONNEL_NUMBER

LCHILD NAME=(NAMEIND,ASTD1PM),PTR=INDX

XDFLD NAME=XSURNAME,SRCH=PSURNAME,SUBSEQ=(XPFIRNAM,/SX1)
SYNONYM=INDEX_SURNAME

FIELD NAME=PSURNAME,BYTES=30,START=12,TYPE=C
LOG=YES,SYNONYM=SURNAME
FIELD NAME=XPFIRNAM,BYTES=10,START=72,TYPE=C
SYNONYM=XPFIRNAM_OVERLAY

Coding of LCHILD immediately after SEGM, FIELD denotes that secondary indexing is
built on that particular segment to search based on a field other than sequence key
(i.e. PERSKEY)

LCHILD NAME=(Index pointer segment, name of secondary index database)

XDFLD Specifies the name of Index field (i.e. XSURNAME) and name of the search
field(PSURNAME) upon which secondary indexing is built. This search field is a field
In the PPERSON segment .

Secondary index database


------------------------------

DBD NAME=ASTD1PM,ACCESS=INDEX
DATASET DD1=ASTV1PM,DEVICE=3380
SEGM NAME=NAMEIND,PARENT=0,BYTES=44 /* this is index pointer segment
/* only this segment will exist
/* in a secondary index database
FIELD NAME=(NAMEINDS,SEQ,U),BYTES=44,START=1,TYPE=C
LCHILD NAME=(PPERSON,ASTDPPM),INDEX=XSURNAME,PTR=SNGL
DBDGEN
FINISH
END

The LCHILD macro in secondary index database specifies the name of the
segment(PPERSON) In the indexed database(ASTDPPM) upon which INDEX
field(XSURNAME) is used for searching.

In case if SUBSEQ parameter is not coded in the XDFLD macro of indexed


database(ASTDPPM) then FIELD parameter in Index database(ASTD1PM)
Will be as follows

FIELD NAME=(PSURNAME,SEQ,U),BYTES=30,START=1,TYPE=C

But presence of SUBSEQ modifies the selected search field (PSURNAME)


As follows

NAMEINDS = PSURNAME(30 bytes) + XPFIRNAM(10 bytes) + /SX1( 4 bytes RBA)


44 bytes

What is reason behind providing IO-PCB as the first PCB in the list of PCB’s
provided to a message processing program?

Ans: The list of statements used for a PSB generation does not include a PCB for the input message source.

I/O PCBs exist within the IMS online control program nucleus for this purpose.

Upon entry to the application program used for message processing, a PCB pointer to the source of the
input message is provided as the first entry in a list of PCB address pointers.

The remainder of the PCB list has a direct relationship to the PCBs as defined within the associated PSB
and must be defined in the application program in the same order as defined during PSB generation.

An online program needs to be tested in Batch processing region. Do we need to recompile the
program for doing so? Is there any PSB consideration for this to avoid recompilation so that
program can be executed across the regions?

When CMPAT=YES is specified, IMS provides PCBs to the application (when ran in Batch processing
region) as if it were executing in a message processing region.
Using CMPAT eliminates the need to recompile the program between batch and online executions.

In the case of a batch program, no I/O PCB exists in the list unless you request it with the CMPAT option
on the PSBGEN statement. Therefore, if CMPAT=YES is not specified, the PCB list provided to the
program has a direct relationship to the PCBs within the PSB. No TP PCBs should be contained in a PSB
for batch processing in a batch processing region.

In a TM batch environment, CMPAT=YES is implied and cannot be overridden by PSBGEN. The PCB
list for application programs running in a DCCTL batch region always contains an I/O PCB.
What are Generated PSB’s?

If you require only an I/O PCB and a single, modifiable alternate PCB, you can use a generated PSB
(GPSB) to describe the resources required for your application program. GPSBs can be used in any online
environment, and are typically used in DCCTL application programs. You do not need to perform
PSBGEN for GPSBs.

You might also like