Vous êtes sur la page 1sur 19

IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

Examples of the PSBGEN utility


These examples show how to use the PSBGEN utility to generate PSBs.

PSB generation examples


This following example shows a PSB generation for a message processing program to process the
hierarchic data structure. The data structure contains segments: PARTMAST, CPWS, POLN, OPERTON,
INVSTAT, and OPERSGMT.

Figure 1. Sample hierarchic data structure

Example 1

This example shows output messages that are to be transmitted to logical terminals OUTPUT1 and
OUTPUT2 as well as the terminal representing the source of input.

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=TP,NAME=OUTPUT1,PCBNAME=OUTPCB1
PCB TYPE=TP,NAME=OUTPUT2,PCBNAME=OUTPCB2
PCB TYPE=DB,DBDNAME=PARTMSTR,PROCOPT=A,KEYLEN=100
SENSEG NAME=PARTMAST,PARENT=0,PROCOPT=A
SENSEG NAME=CPWS,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=POLN,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=OPERTON,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=INVSTAT,PARENT=OPERTON,PROCOPT=A
SENSEG NAME=OPERSGMT,PARENT=OPERTON
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Example 2

1 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

This example shows these statements being used for a batch program, where programs using this PSB
do not reference the telecommunications PCBs in the batch environment.

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM2
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=PARTMSTR,PROCOPT=A,KEYLEN=100
SENSEG NAME=PARTMAST,PARENT=0,PROCOPT=A
SENSEG NAME=CPWS,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=POLN,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=OPERTON,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=INVSTAT,PARENT=OPERTON,PROCOPT=A
SENSEG NAME=OPERSGMT,PARENT=OPERTON
PSBGEN LANG=COBOL,PSBNAME=APPLPGM2
END
/*

Example 3

This example shows that a PSB generation is being performed for a batch message processing program.
The GSAM PCB is used by the application program to generate a report file.

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM3
//C.SYSIN DD *

PCB TYPE=TP,NAME=OUTPUT1
PCB TYPE=TP,NAME=OUTPUT2
PCB TYPE=DB,DBDNAME=PARTMSTR,PROCOPT=A,KEYLEN=100
SENSEG NAME=PARTMAST,PARENT=0,PROCOPT=A
SENSEG NAME=CPWS,PARENT=PARTMAST,PROCOPT=A
PCB TYPE=GSAM,DBDNAME=REPORT,PROCOPT=LS
PSBGEN LANG=COBOL,PSBNAME=APPLPGM3
END
/*

Example 4

This example shows that a PSB generation is being performed for a batch program. The PCB has been
named (PRTMASTR). The PCB name is used on DLI calls that use the AIBTDLI interface.

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM4
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=PARTMSTR,PROCOPT=A,KEYLEN=100,PCBNAME=PARTMSTR
SENSEG NAME=PARTMAST,PARENT=0,PROCOPT=A
SENSEG NAME=CPWS,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=POLN,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=OPERTON,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=INVSTAT,PARENT=OPERTON,PROCOPT=A
SENSEG NAME=OPERSGMT,PARENT=OPERTON
PSBGEN LANG=COBOL,PSBNAME=APPLPGM4

2 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

END
/*

Example 5

This example shows that a PSB generation is being performed for a batch program. A label (PARTROOT)
is being used to indicate the only root segment in the PCB. The PCB's address will be excluded from the
PCB list that is passed to the application at entry.

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM5
//C.SYSIN DD *

PARTROOT PCB TYPE=DB,DBDNAME=PARTMSTR,PROCOPT=A,LIST=NO


SENSEG NAME=PARTMAST,PARENT=0,PROCOPT=A
PSBGEN LANG=COBOL,PSBNAME=APPLPGM5
END
/*

Field level sensitivity PSB generation example


The following figure shows a PCB for a batch program using field level sensitivity. The illustration shows
the hierarchic order of the segments. The employee segment is at the first level. The office and employee
project segments are at the second level. Outside of the hierarchic structure, but on the second level, the
segment project is connected to the employee project segment.

Figure 2. Sample field level sensitivity PSB generation

SEGMENT NAME FIELD NAME START LOCATION LENGTH

EMPLOYEE EMPSSN 1 9
EMPLNAME 10 10
EMPFNAME 20 9
EMPMI 29 1
EMPADDR 30 30

OFFICE OFNUMBER 1 5
OFPHONE 6 7

3 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

EMPLPROJ EPFUNCTN 1 20
EPTIMEST 21 5
EPTIMCUR 26 5

PROJECT PROJNUM 1 8
PROJTTLE 9 20
PROJSTRT 29 8
PROJEND 37 8
PROJSTAT 45 1

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,NAME=FISDBD1,PROCOPT=GRP,KEYLEN=20
SENSEG NAME=EMPLOYEE,PARENT=0
SENFLD NAME=EMPLNAME,START=13,REPL=NO
SENFLD NAME=EMPFNAME,START=1,REPL=NO
SENFLD NAME=EMPMI,START=11
SENSEG NAME=OFFICE,PARENT=EMPLOYEE
SENSEG NAME=EMPLPROJ,PARENT=EMPLOYEE
SENFLD NAME=PROJNUM,START=1
SENFLD NAME=PROJTITLE,START=10
SENFLD NAME=EPFUNCTN,START=35
SENFLD NAME=EPTIMEST,START=60
SENFLD NAME=EPTIMCUR,START =70
PSBGEN LANG=ASSEM,PSBNAME=APPLPGM1
END
/*

Fast Path PSB generation examples


The following two examples show sample Fast Path PSB Generations.

Example 1

This example shows the statements for an MSDB PSB containing eight PCBs.

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=MSDBLM01,PROCOPT=R, NONTERMINAL-RELATED X


KEYLEN=4 END OF PCB STATEMENT
SENSEG NAME=LDM,PARENT=0 (DEFAULT)
PCB TYPE=DB,DBDNAME=MSDBLM02,PROCOPT=R, NONTERMINAL-RELATED X
KEYLEN=1
SENSEG NAME=LDM,PARENT=0
PCB TYPE=DB,DBDNAME=MSDBLM03,PROCOPT=R, NONTERMINAL-RELATED X
KEYLEN=2
SENSEG NAME=LDM,PARENT=0
PCB TYPE=DB,DBDNAME=MSDBLM04,PROCOPT=R, NONTERMINAL-RELATED X
KEYLEN=8 TERM KEYS

4 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

SENSEG NAME=LDM,PARENT=0
PCB TYPE=DB,DBDNAME=MSDBLM05,PROCOPT=R, FIXED RELATED X
KEYLEN=8
SENSEG NAME=LDM,PARENT=0
PCB TYPE=DB,DBDNAME=MSDBLM06,PROCOPT=A, DYNAMIC RELATED X
KEYLEN=8
SENSEG NAME=LDM,PARENT=0
PCB TYPE=DB,DBDNAME=MSDBLM06,PROCOPT=R, DYNAMIC RELATED X
KEYLEN=8
SENSEG NAME=LDM,PARENT=0
PCB TYPE=DB,DBDNAME=MSDBLM06,PROCOPT=G, DYNAMIC RELATED X
KEYLEN=8
SENSEG NAME=LDM,PARENT=0
PSBGEN LANG=ASSEM,PSBNAME=APPLPGM1 END OF PSBGEN MACRO
END END OF PSB GEN
/*

Example 2

This example shows the statements for DEDB subset pointers.

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=MSDBLM01,PROCOPT=R, NONTERMINAL-RELATED X


PCB TYPE=DB,DBDNAME=X,PROCOPT=A,KEYLEN=100
SENSEG NAME=A,PARENT=C
SENSEG NAME=B,PARENT=A,SSPTR=((1,R),(2,U),(5))
SENSEG NAME=C,PARENT=B
SENSEG NAME=D,PARENT=A,SSPTR=((2,R))
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Note:
1. SSPTR=((n,r))
n
Subset pointer number in this SENSEG
r
Sensitivity for the pointer (R: read, U: update)
2. If n and r are not specified, the pointer has no sensitivity.
3. If n is specified but r is not specified, the default is R (read sensitive).

Additional PSB generation examples


Example 1

The following figure shows a PSB generation that is being performed for a batch program. The illustration
shows the hierarchic order of the segments. The Skill segment is at the first level. The Name segment
(which is divided into payroll and skill) is at the second level. Address, Payroll, Expr, and Educ are on the
third level.

5 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

Figure 3. A PSBGEN statement used to define a DL/I database statement (example 1)

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=LOGIC1;PROCOPT=G,KEYLEN=151,POS=M
SENSEG NAME=SKILL,PARENT=0,PROCOPT=A
SENSEG NAME=NAME,PARENT=SKILL,PROCOPT=A
SENSEG NAME=ADDRESS,PARENT=NAME,PROCOPT=A
SENSEG NAME=PAYROLL,PARENT=NAME,PROCOPT=A
SENSEG NAME=EXPR,PARENT=NAME,PROCOPT=A
SENSEG NAME=EDUC,PARENT=NAME,PROCOPT=A
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Example 2:

The following figure shows a PSB generation that is being performed for a batch program. The illustration
shows the hierarchic order of the segments. The NAME segment is at the first level. The NAMESK,
ADDRESS, and PAYROLL segments are at the second level. The Expr and Educ segments are on the
third level, connected to the NAMESK segment. Although the illustration separates the NAMESK segment
into NAMESKIL and SKILL, the SENSEG statements do not define these as separate segments.

Figure 4. A PSBGEN PCB statement used to define a DL/I database PCB statement (example 2)

6 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=LOGICDB,PROCOPT=A,KEYLEN=241,POS=M
SENSEG NAME=NAME,PARENT=0,PROCOPT=G
SENSEG NAME=NAMESK,PARENT=NAME,PROCOPT=G
SENSEG NAME=EXPR,PARENT=NAMESK,PROCOPT=G
SENSEG NAME=EDUC,PARENT=NAMESK,PROCOPT=G
SENSEG NAME=ADDRESS,PARENT=NAME,PROCOPT=G
SENSEG NAME=PAYROLL,PARENT=NAME,PROCOPT=G
PSBGEN LANG=PL/I,PSBNAME=APPLPGM1
END
/*

Example 3:

The following figure shows a PSB that defines a logical relationship between segments in a DL/I
database. The illustration shows the hierarchic order of the segments PARTMAST (the parent segment),
CPWS, POLN, INVSTAT, and OPERSGMT (which are all first-level child segments of PARTMAST). The
alternate statement sends output to logical terminal "OUTPUT". The PSBGEN statement saves this JCL
as APPLPGM1 in the IMS™.PSBLIB library.

Figure 5. A PSBGEN PCB statement used to define a DL/I database PCB statement (example 3)

7 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=TP,LTERM=OUTPUT
PCB TYPE=DB,DBDNAME=PARTMSTR,PROCOPT=GIDR,KEYLEN=100
SENSEG NAME=PARTMAST,PARENT=O,PROCOPT=A
SENSEG NAME=CPWS,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=POLN,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=INVSTAT,PARENT=PARTMAST,PROCOPT=A
SENSEG NAME=OPERSGMT,PARENT=PARTMAST
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Example 4:

The following figure shows the JCL used to define the relationship between the POMSTR and POLNITEM
segments from the DL/I database PODB. The alternate statements send output to applications with the
transaction-code name "out1" and "out2".

Figure 6. A PSBGEN PCB statement used to define a logical relationship and produce output

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=TP,NAME=OUT1

8 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

PCB TYPE=TP,NAME=OUT2
PCB TYPE=DB,DBDNAME=PODB,PROCOPT=GID,KEYLEN=200
SENSEG NAME=POMSTR
SENSEG NAME=POLNITEM,PARENT=POMSTR
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Examples of a sample problem with an application database


Examples five through ten use DBDNAME=DI21PART as a basis for the logical databases created with
each example's JCL. The database contains segments PARTROOT, STANINFO, STOKSTAT,
CYCCOUNT, and BACKORDR. PARTROOT is the parent segment. STANINFO and STOKSTAT are child
segments of PARTROOT. CYCCOUNT and BACKORDR are child segments of STOKSTAT.

Example 1:

The following figure shows either a message switching or conversational message program. The JCL is
saved as load module DFSSAM01 in the IMS.PSBLIB library.

Figure 7. The data structure and JCL for a message switching or conversational message program

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

SENSEG NAME=BACKORDR,PARENT=STOKSTAT
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Example 2:

9 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

The JCL shown in the following figure defines a logical relationship between the PARTROOT and
STANINFO segments (shown in the illustration with shading). The JCL is saved as load module
DFSSAM02 in the IMS.PSBLIB library.

Figure 8. The data structure and JCL for a logical relationship in database DI21PART

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=DI21PART,PROCOPT=G,KEYLEN=19
SENSEG NAME=PARTROOT
SENSEG NAME=STANINFO,PARENT=PARTROOT
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Example 3:

The following figure defines the entire logical structure from the DL/I database DI21PART. The JCL is
saved as load module DFSSAM03 in the IMS.PSBLIB library.

Figure 9. The data structure and JCL for a logical database defined from DL/I database DI21PART

10 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=DI21PART,PROCOPT=G,KEYLEN=43
SENSEG NAME=PARTROOT
SENSEG NAME=STANINFO,PARENT=PARTROOT
SENSEG NAME=STOKSTAT,PARENT=PARTROOT
SENSEG NAME=CYCCOUNT,PARENT=STOKSTAT
SENSEG NAME=BACKORDR,PARENT=STOKSTAT
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Example 4:

The following figure defines the logical relationship between the PARTROOT and STOKSTAT segments
(shown in the illustration with shading). The JCL also outputs to the logical terminal HOWARD and saves
the JCL as load module DFSSAM03 in the IMS.PSBLIB library.

Figure 10. The data structure and JCL for a logical relationship in database DI21PART that produces
output (part 1)

11 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

//PSBGEN JOB MSGLEVEL=1


// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=TP,LTERM=HOWARD
PCB TYPE=DB,DBDNAME=DI21PART,PROCOPT=A,KEYLEN=33
SENSEG NAME=PARTROOT
SENSEG NAME=STOKSTAT,PARENT=PARTROOT
PSBGEN LANG=COBOL,PSBNAME=DFSSAM05
END
/*

Example 5:

The following figure is identical to example 8, except this JCL is saved as load module DFSSAM06 in the
IMS.PSBLIB library.

Figure 11. The data structure and JCL for a logical relationship in database DI21PART that produces
output (part 2)

12 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=TP,LTERM=HOWARD
PCB TYPE=DB,DBDNAME=DI21PART,PROCOPT=A,KEYLEN=33
SENSEG NAME=PARTROOT
SENSEG NAME=STOKSTAT,PARENT=PARTROOT
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Example 6:

The following figure defines the entire logical structure from the DL/I database DI21PART. The JCL is
saved as load module DFSSAM07 in the IMS.PSBLIB library.

Figure 12. The data structure and JCL for a logical database defined from DL/I database DI21PART

13 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=DI21PART,PROCOPT=G,KEYLEN=43
SENSEG NAME=PARTROOT
SENSEG NAME=STANINFO,PARENT=PARTROOT
SENSEG NAME=STOKSTAT,PARENT=PARTROOT
SENSEG NAME=CYCCOUNT,PARENT=STOKSTAT
SENSEG NAME=BACKORDR,PARENT=STOKSTAT
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Example of a shared secondary index


The following figure shows the database structure for this example. It shows a database, DTA3, that is
indexed by three secondary indexes (X4, X5, and X6) in a shared secondary index database, X4. Each
secondary index uses a different segment as both its index target segment and index source segment.
Secondary index X4 uses DTA3 segment DA as its target/source segment. Secondary index X5 uses
DTA3 segment DC as its target/source segment. Secondary index X6 uses DTA3 segment DE as its
target/source segment.

Figure 13. Database indexed by three secondary indexes in a shared secondary index database

14 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

The following figure shows the database structure for index through DA. It contains segments DA, DB,
DC, DD, and DE.

Figure 14. The data structure and JCL for index through segment DA

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=DTA3,PROCOPT=A,KEYLEN=15,PROCSEQ=X4
SENSEG NAME=DA,PARENT=0
SENSEG NAME=DB,PARENT=DA
SENSEG NAME=DC,PARENT=DA,INDICES=X5
SENSEG NAME=DD,PARENT=DC
SENSEG NAME=DE,PARENT=DC,INDICES=X6
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1

15 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

END
/*

The following figure shows the database structure for index through DC. It shows segment DC, DA, DD,
and DE.

Figure 15. The data structure and JCL for index through segment DC

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=DTA3,PROCOPT=A,KEYLEN=15,PROCSEQ=X5
SENSEG NAME=DC,PARENT=0
SENSEG NAME=DA,PARENT=DC,INDICES=X4
SENSEG NAME=DD,PARENT=DC
SENSEG NAME=DE,PARENT=DC,INDICES=X6
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

This database structure can also include, as a substructure, the database structure for index through DA.

The following figure shows the database structure for index through DE. It shows segments DE, DC, and
DA.

Figure 16. The data structure and JCL for index through segment DE

16 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=DTA3,PROCOPT=A,KEYLEN=15,PROCSEQ=X6
SENSEG NAME=DE,PARENT=0
SENSEG NAME=DC,PARENT=DE,INDICES=X5
SENSEG NAME=DA,PARENT=DC,INDICES=X4
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

This database structure can also include, as substructures, the database structures for indexes through
DA and DC.

The PCB for INDEX database is shown as follows:

//PSBGEN JOB
// EXEC PSBGEN,MBR=APPLPGM1
//C.SYSIN DD *

PCB TYPE=DB,DBDNAME=X4,PROCOPT=A,KEYLEN=5
SENSEG NAME=X4A,PARENT=0
PCB TYPE=DB,DBDNAME=X5,PROCOPT=A,KEYLEN=5
SENSEG NAME=X5A,PARENT=0
PCB TYPE=DB,DBDNAME=X6,PROCOPT=A,KEYLEN=5
SENSEG NAME=X6A,PARENT=0
PSBGEN LANG=COBOL,PSBNAME=APPLPGM1
END
/*

Examples of Fast Path secondary indexes


The following example shows a Fast Path secondary index PCB in PSB using the PROCSEQD=
parameter with the target segment is a root segment.

17 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

When PCB PCB2NDX is selected, the primary DEDB database, EDUCDB, is accessed using its Fast
Path secondary index database, NAMESXDB. The PROCSEQD parameter specifies the name of the
Fast Path secondary index database, NAMESXDB, to use to access the primary DEDB database,
EDUCDB.

The target segment, COURSE segment, is a root segment. All segments under the root segment are
accessible in the entire physical structure of the primary DEDB database using NAMESXDB secondary
index.

PCB2NDX
PCB TYPE=DB,DBDNAME=EDUCDB,PROCOPT=A,KEYLEN=100,PROCSEQD=NAMESXDB
SENSEG NAME=COURSE,PARENT=0,PROCOPT=GR
SENSEG NAME=CLASS,PARENT=COURSE
SENSEG NAME=INSTRUCT,PARENT=CLASS <<-- target segment
SENSEG NAME=STUDENT,PARENT=CLASS
PSBGEN PSBNAME=NAMEXPSB,LANG=COBOL
END

The following example shows a Fast Path secondary index PCB in PSB using the PROCSEQD=
parameter with the target segment is not a root segment.

When PCB PCB3NDX is selected, the primary DEDB database, EDUCDB, is accessed using its Fast
Path secondary index database, INSTSXDB. The PROCSEQD parameter specifies the name of the Fast
Path secondary index database, INSTSXDB, to use to access the primary DEDB database, EDUCDB.

The target segment, INSTRUCT segment, is not a root segment. Only the segments that are the direct
parents of the target segment along the physical path from the root segment, and all child segments of the
target segment are accessible in the physical structure of the primary DEDB database when the primary
DEDB database is accessed using INSTSXDB secondary index.

Note: The STUDENT segment is not accessible because it is neither a direct parent segment nor a child
segment of the target segment, INSTRUCT segment.

PCB3NDX
PCB TYPE=DB,DBDNAME=EDUCDB,PROCOPT=GR,KEYLEN=100,PROCSEQD=INSTSXDB
SENSEG NAME=COURSE,PARENT=0
SENSEG NAME=CLASS,PARENT=COURSE
SENSEG NAME=INSTRUCT,PARENT=CLASS <<-- target segment
PSBGEN PSBNAME=NAMEXPSB,LANG=COBOL
END

The following example shows a Fast Path secondary index PCB in PSB using the PROCSEQD=
parameter with the target segment is not a root segment.

When PCB PCB4NDX is selected, the primary DEDB database, EDUCDB, is accessed using its Fast
Path secondary index database, CLASSXDB. The PROCSEQD parameter specifies the name of the Fast
Path secondary index database, CLASSXDB, to use to access the primary DEDB database, EDUCDB.

The target segment, CLASS segment, is not a root segment. Only the segments that are the direct
parents of the target segment along the physical path from the root segment, and all child segments of the
target segment are accessible in the physical structure of the primary DEDB database when the primary
DEDB database is accessed using the CLASSXDB secondary index database. The STUDENT segment
is accessible because it is a child segment of the target segment, CLASS segment.

PCB4NDX

18 of 19 11/04/2015 01:13 PM
IMS V13 - System utilities - Examples of the PS... https://www-01.ibm.com/support/knowledgecente...

PCB TYPE=DB,DBDNAME=EDUCDB,PROCOPT=GR,KEYLEN=100,PROCSEQD=CLASSXDB
SENSEG NAME=COURSE,PARENT=0
SENSEG NAME=CLASS,PARENT=COURSE
SENSEG NAME=INSTRUCT,PARENT=CLASS
SENSEG NAME=STUDENT,PARENT=CLASS
PSBGEN PSBNAME=NAMEXPSB,LANG=COBOL
END

The following example shows a Fast Path secondary index as a database.

PCB2XDB
PCB TYPE=DB,DBDNAME=NAMESXDB,PROCOPT=GR,KEYLEN=10
SENSEG NAME=NAMEXSEG,PARENT=0
PSBGEN PSBNAME=DB2DXPSB,LANG=COBOL
END

Parent topic: Program Specification Block (PSB) Generation utility

19 of 19 11/04/2015 01:13 PM

Vous aimerez peut-être aussi