The following three types of DDI statements specify your Program Specification Blocks (PSBs), Data Base Definitions (DBDs), and their COBOL record descriptions.
Statement Type | Description and Syntax |
---|---|
*DDI DBD | *DDI DBD specifies the DBD statement in the database. |
*DDI DBD NAME=dbdname |
|
*DDI REC | Specifies the SEGM statement/copybook |
*DDI REC NAME=copybookrec|[new-COBOL-recordname], *DDI SEG=segname, [COPY=membername|[new-copybookname]], *DDI [GEN01=Y|N] |
|
*DDI FLD | Specifies the FIELD and XDFLD statement/copybook field |
*DDI FLD NAME=copybookfldname, IMSNAME=fldname,*DDI [PIC=copybookpic] |
DDI Statement | Argument | Value | Len | Req | Default |
---|---|---|---|---|---|
*DDI DBD | NAME | dbname | 8 | yes | none |
*DDI REC | NAME | copybookrec | 30 | yes | DBD value of SEGM NAME= |
SEG | DBD value of SEG NAME= | 8 | yes | none | |
COPY | Membername | 8 | no | SEG NAME | |
GEN01 | Y or N | 1 | no | Y | |
*DDI FLD | NAME | copybookfieldname | 30 | yes | DBD value of FIELD NAME= or DBD value of XDFLD NAME= |
IMSNAME | DBD value of FIELD NAME= or DBD value of XDFLD NAME= | 8 | yes | none | |
PIC | copybookpic | 24 | no | x(n), where n = the value of the BYTES keyword in the DBD |
DBD statements:
DBD NAME=DBD1,ACCESS=(HDAM,VSAM), ... SEGM NAME=S1,BYTES=100,PTR=T, ... FIELD NAME=S1FLD,START=1,BYTES=3,TYPE=N, ... SEGM NAME=S2,BYTES=80, ... FIELD NAME=S2FLD,START=1,BYTES=30,TYPE=C, ...
copybook record (S1):
01 SALES-REC. 05 REGION-FLD PIC 9(03). .
copybook record (S2):
01 CUST-REC. 05 LOCATION-FLD PIC X(30). .
DDI Statements:
*DDI DBD NAME=DBD1 *DDI REC NAME=SALES-REC,SEG=S1,COPY=S1, *DDI GEN01=Y *DDI FLD NAME=REGION-FLD,IMSNAME=S1FLD,PIC=9(03) *DDI REC NAME=CUST-REC,SEG=S2,COPY=S2, *DDI GEN01=Y *DDI FLD NAME=LOCATION-FLD,IMSNAME=S2FLD,PIC=X(30)