Secondary Indexing
Secondary Indexing
-------------------
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)
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 .
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.
FIELD NAME=(PSURNAME,SEQ,U),BYTES=30,START=1,TYPE=C
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.