Previous Topic: Sample DL/I PSB and DBDsNext Topic: Sample CA IDMS/DB Schema Module


Sample Load IPSB

GENERATE IPSB Statement

Assuming the DL/I PSB and DBD definitions in illustration 6-1 are assembled and are available to the syntax generator using a CDMSLIB JCL statement, the following GENERATE statement will produce the appropriate IPSB source code for use with the load process:

GENERATE LOAD IPSB FOR PSB ITEMPART USING SUBSCHEMA PRODSUBS.

This statement instructs the generator to produce an IPSB named ITEMPART and submit it to validity checking for use with the load process.

Figure 59 shows the IPSB source code as it might be produced by the syntax generator using the DL/I DBD and PSB definitions in Figure 58.

Considerations

Here are some points to note about the IPSB source code:

GENERATE IPSB Statement LOAD Parameter

The use of the LOAD parameter in the GENERATE statement ensures that the resulting IPSB includes all of the DL/I dependencies necessary for a successful load. If a PCB does not identify the physical segment that corresponds to a referenced logical parent, the syntax generator will return an error message and not create the IPSB source.

An example

For example, if the PARTDBDL PCB were not present in the assembled DL/I ITEMPART PSB, the syntax generator would return an error message stating that it could not find the DBD for the logical parent in any PCB. In this case, the missing DBD would be the physical DBD, as referenced by the logical DBDs, ITEMDBDL and PARTDBDL. Providing the PCB for the logical DBD PARTDBDL would satisfy the load process requirements and produce the correct IPSB source.

Generated IPSB source statements:

 DL/I ITEM DATABASE LOGICAL DBD EXAMPLE

 DBD      NAME=ITEMDBDL,ACCESS=LOGICAL
 DATASET  LOGICAL
 SEGM     NAME=ITEM,PARENT=0,SOURCE=((ITEM,,ITEMDBDP))
 SEGM     NAME=DETAIL,PARENT=ITEM,
                      SOURCE=((DETAIL,,ITEMDBD),(PART,,PARTDBDP))
 DBDGEN
 FINISH
 END


 DL/I PARTS DATABASE LOGICAL DBD EXAMPLE


 DBD      NAME=PARTDBDL,ACCESS=LOGICAL
 DATASET  LOGICAL
 SEGM     NAME=PART,PARENT=0,SOURCE=((PART,,PARTDBDP))
 SEGM     NAME=DETAIL,PARENT=PART,
                      SOURCE=((DETAIL,,ITEMDBDP),(ITEM,,ITEMDBDP))
 DBDGEN
 FINISH
 END


 DL/I PSB DESCRIBING ITEM AND PARTS LOGICAL DBDS


 PCB      TYPE=DB,DBDNAME=ITEMDBDL,PROCOPT=AP,KEYLEN=28,POS=S
 SENSEG   NAME=ITEM,PARENT=0
 SENSEG   NAME=DETAIL,PARENT=ITEM
 PCB      TYPE=DB,DBDNAME=PARTDBDL,PROCOPT=AP,
               KEYLEN=28,POS=S
 SENSEG   NAME=PART,PARENT=0
 SENSEG   NAME=DETAIL,PARENT=PART
 PSBGEN   LANG=ASM,PSBNAME=ITEMPART
 END


 IPSB SECTION.
          IPSB NAME IS ITEMPART
          OF SUBSCHEMA PRODSUBS
          LANGUAGE IS ASM.

Figure 59 (Part 1 of 4). Generated IPSB source statements

 AREA SECTION.

          AREA NAME IS ITEMDBDP-REGION
               USAGE-MODE IS EXCLUSIVE UPDATE.
          AREA NAME IS PARTDBDP-REGION
               USAGE-MODE IS EXCLUSIVE UPDATE.

 RECORD SECTION.

          RECORD NAME IS ITEM
               LENGTH IS  150.
          SEQUENCE
          FIELD NAME IS ITEMNO
               START POS  1
               LENGTH IS  7.

          RECORD NAME IS DETAIL
               LENGTH IS  157.
          SEQUENCE
          FIELD NAME IS ITMDTAIL
               START POS  26
               LENGTH IS  3.
          LOGICAL PARENT CONCAT KEY
          FIELD NAME IS DETALPCK
               START POS  1
               LENGTH IS  18.
          PHYSICAL PARENT CONCAT KEY
          FIELD NAME IS DETAPPCK
                START POS  19
                LENGTH IS  7.

          RECORD NAME IS PART
                LENGTH IS  150
          SEQUENCE
          FIELD NAME IS PARTNO
                START POS  1
                LENGTH IS  18.

          RECORD NAME IS ITEMNDX
                LENGTH IS  7.
          SEQUENCE
          FIELD NAME IS ITEMNO
                START POS  1
                LENGTH IS  7.

Figure 59 (Part 2 of 4). Generated IPSB source statements

          RECORD NAME IS PARTNDX
                LENGTH IS  18.
          SEQUENCE
          FIELD NAME IS PARTNO
                START POS  1
                LENGTH IS  18.

 INDEX SECTION

          INDEX NAME IS ITEMDBDT
                USING INDEXED-SET IX-ITEMNDX
                TARGET RECORD IS ITEM
                POINTER RECORD IS ITEMNDX
                      THRU SET ITEM-ITEMNDX
                SOURCE RECORD IS ITEM
                SEARCH FIELD (ITEMNO).

          INDEX NAME IS PARTDBDI
                USING INDEXED-SET IX-PARTNDX
                TARGET RECORD IS PART
                POINTER RECORD IS PARTNDX
                      THRU SET PART-PARTNDX
                SOURCE RECORD IS PART
                SEARCH FIELD (PARTNO).

 PCB SECTION.

          PCB ACCESS METHOD IS HIDAM
                DBDNAME IS ITEMDBDL
                PROCESSING OPTIONS LOAD
                PROC SEQ INDEX IS ITEMDBDI.

          SEGM NAME IS ITEM
          RECORD  NAME IS ITEM.

          SEGM NAME IS DETAIL
          RECORD  NAME IS DETAIL
                PARENT IS ITEM
                      THRU SET ITEM-DETAIL
                LOGICAL DEST PARENT IS PART
                      THRU SET PART-DETAIL
                INSERT RULES P,P,P
                REPLACE RULES V,V,V
                ACCESS METHOD IS HIDAM
                PROC SEQ INDEX IS PARTDBDI.

Figure 59 (Part 3 of 4). Generated IPSB source statements

          PCB ACCESS METHOD IS HIDAM
                DBDMANE IS PARTDBDL
                PROCESSING OPTIONS LOAD
                PROC SEQ INDEX IS PARTDBDI.

          SEGM NAME IS PART
          RECORD   NAME IS PART.

          SEGM NAME IS DETAIL
          RECORD   NAME IS DETAIL
               PARENT  IS PART
                     THRU SET PART-DETAIL
               PHYSICAL DEST PARENT IS ITEM
                     THRU SET ITEM-DETAIL
               INSERT RULES P,L,P
               REPLACE RULES V,L,V
               ACCESS METHOD IS HIDAM
               PROC SEQ INDEX IS ITEMDBDI
               SEQUENCE BY LOGICAL SEQ FIELD.

Figure 59 (Part 4 of 4). Generated IPSB source statements