In this section: |
The PATDB01 database has a primary index because it is a HIDAM database. It is also defined with three secondary indexes. Creating FOCUS Descriptions describes how to create a Master File to use secondary indexes.
This section illustrates the following:
In this section: |
Five DBDs are associated with PATDB01: the DBD for the database, the DBD for the primary index, and one DBD for each of the three secondary indexes.
PATDB01 DBD:
PRINT NOGEN DBD NAME=PATDB01,ACCESS=(HIDAM,VSAM) DATASET DD1=PATDB01,DEVICE=3380,BLOCK=4096,SCAN=5 * SEGM NAME=PATINFO,PTR=H,PARENT=0,BYTES=233 FIELD NAME=(SSN,SEQ,U),BYTES=9,START=26,TYPE=C LCHILD NAME=(SEGIX,PATDBIX),PTR=INDX FIELD NAME=SEQFIELD,BYTES=6,START=1,TYPE=C FIELD NAME=REVSEQ,BYTES=6,START=7,TYPE=C FIELD NAME=SSNALPHA,BYTES=9,START=35,TYPE=C FIELD NAME=EMPID,BYTES=12,START=44,TYPE=C FIELD NAME=LNAME,BYTES=12,START=56,TYPE=C FIELD NAME=FNAME,BYTES=12,START=68,TYPE=C FIELD NAME=ADMDATE,BYTES=8,START=89,TYPE=C FIELD NAME=PATID,BYTES=10,START=176,TYPE=C FIELD NAME=/SX1 * LCHILD NAME=(SEGIX1,PATDBIX1),PTR=INDX XDFLD NAME=IXNAME,SRCH=(LNAME,FNAME), X SUBSEQ=/SX1,NULLVAL=BLANK * LCHILD NAME=(SEGIX2,PATDBIX2),PTR=INDX XDFLD NAME=IXCOMP,SRCH=(SSNALPHA,EMPID,LNAME) * LCHILD NAME=(SEGIX3,PATDBIX3),PTR=INDX XDFLD NAME=IXADMD,SRCH=(ADMDATE), X SUBSEQ=/SX1,NULLVAL=BLANK *
DBDGEN FINISH END
PATDBIX DBD:
PRINT NOGEN DBD NAME=PATDBIX,ACCESS=INDEX DATASET DD1=PATDBIX,DEVICE=3380 * SEGM NAME=SEGIX,PARENT=0,BYTES=9 FIELD NAME=(SSNIX,SEQ,U),BYTES=9,START=1,TYPE=C LCHILD NAME=(PATINFO,PATDB01),INDEX=SSN DBDGEN FINISH END
PATDBIX1 DBD:
PRINT NOGEN DBD NAME=PATDBIX1,ACCESS=INDEX DATASET DD1=PATDBIX1,DEVICE=3380 * SEGM NAME=SEGIX1,PARENT=0,BYTES=28 FIELD NAME=(IXNAMEIX,SEQ,U),BYTES=28,START=1 LCHILD NAME=(PATINFO,PATDB01),INDEX=IXNAME,PTR=SNGL DBDGEN FINISH END
PATDBIX2 DBD:
PRINT NOGEN DBD NAME=PATDBIX2,ACCESS=INDEX DATASET DD1=PATDBIX2,DEVICE=3380 * SEGM NAME=SEGIX2,PARENT=0,BYTES=33 FIELD NAME=(IXCOMPIX,SEQ,U),BYTES=33,START=1 LCHILD NAME=(PATINFO,PATDB01),INDEX=IXCOMP,PTR=SNGL DBDGEN FINISH END
PATDBIX3 DBD:
PRINT NOGEN DBD NAME=PATDBIX3,ACCESS=INDEX DATASET DD1=PATDBIX3,DEVICE=3380 * SEGM NAME=SEGIX3,PARENT=0,BYTES=12 FIELD NAME=(IXADMDIX,SEQ,U),BYTES=12,START=1 LCHILD NAME=(PATINFO,PATDB01),INDEX=IXADMD,PTR=SNGL DBDGEN FINISH END
This PSB is member TSTPSB01 in the PSB data set because PSBNAME=TSTPSB01.
PCB TYPE=TP,MODIFY=YES,EXPRESS=YES PCB TYPE=TP,EXPRESS=NO,MODIFY=YES,SAMETRM=YES * PCB TYPE=DB,DBDNAME=PATDB01,PROCOPT=GO,KEYLEN=9 SENSEG NAME=PATINFO,PARENT=0 * PCB TYPE=DB,DBDNAME=PATDB01,PROCOPT=GO,KEYLEN=28,PROCSEQ=PATDBIX1 SENSEG NAME=PATINFO,PARENT=0 * PCB TYPE=DB,DBDNAME=PATDB01,PROCOPT=GO,KEYLEN=33,PROCSEQ=PATDBIX2 SENSEG NAME=PATINFO,PARENT=0 * PCB TYPE=DB,DBDNAME=PATDB01,PROCOPT=GO,KEYLEN=12,PROCSEQ=PATDBIX3 SENSEG NAME=PATINFO,PARENT=0 * PSBGEN LANG=COBOL,PSBNAME=TSTPSB01,CMPAT=YES END
In this section: |
FOCPSB=EXTENDED,$ PCBNAME= , PCBTYPE=TERM,$ PCBNAME= , PCBTYPE=TERM,$ PCBNAME= , PCBTYPE=TERM,$ PCBNAME=PATINFO, PCBTYPE=DB,$ PCBNAME=IXNAME , PCBTYPE=DB,$ PCBNAME=IXCOMP , PCBTYPE=DB,$ PCBNAME=IXADMD , PCBTYPE=DB,$
This FOCPSB is member TSTPSB01 in the FOCPSB data set because it must have the same member name as its corresponding PSB. It has four database PCB entries. The first is for the normal entry point into the database and identifies the name of the Master File. Each of the other entries identifies one of the three secondary indexes.
FILE=PATDB01,SUFFIX=IMS,$ SEGNAME=PATINFO,PARENT=,SEGTYPE=S1,$ FIELD=SEQFIELD ,ALIAS=SEQFIELD.IMS ,USAGE=A06 ,ACTUAL=A06,$ FIELD=REVSEQ ,ALIAS=REVSEQ.IMS ,USAGE=A06 ,ACTUAL=A06,$ FIELD=SALARY ,ALIAS= ,USAGE=A08 ,ACTUAL=A08,$ FIELD=OT_HR_PAY ,ALIAS= ,USAGE=A05 ,ACTUAL=A05,$ FIELD=SSN ,ALIAS=SSN.KEY ,USAGE=A09 ,ACTUAL=A09,$ FIELD=SSNALPHA ,ALIAS=SSNALPHA.IMS ,USAGE=A09 ,ACTUAL=A09,$ FIELD=EMPLOYEEID ,ALIAS=EMPID.IMS ,USAGE=A12 ,ACTUAL=A12,$ FIELD=LAST_NAME ,ALIAS=LNAME.IMS ,USAGE=A12 ,ACTUAL=A12,$ FIELD=FIRST_NAME ,ALIAS=FNAME.IMS ,USAGE=A12 ,ACTUAL=A12,$ FIELD=DATE_OF_BIRTH ,ALIAS= ,USAGE=A08 ,ACTUAL=A08,$ FIELD=RACE ,ALIAS= ,USAGE=A01 ,ACTUAL=A01,$ FIELD=ADMIT_DATE ,ALIAS=ADMDATE.IMS ,USAGE=A08 ,ACTUAL=A08,$ FIELD=ADMIT_TYPE ,ALIAS= ,USAGE=A01 ,ACTUAL=A01,$ FIELD=DISPOSITION ,ALIAS= ,USAGE=A02 ,ACTUAL=A02,$ FIELD=TRANSFER_DATE ,ALIAS= ,USAGE=A08 ,ACTUAL=A08,$ FIELD=ALLERGY1 ,ALIAS= ,USAGE=A15 ,ACTUAL=A15,$ FIELD=ALLERGY2 ,ALIAS= ,USAGE=A15 ,ACTUAL=A15,$ FIELD=ALLERGY3 ,ALIAS= ,USAGE=A15 ,ACTUAL=A15,$ FIELD=ALLERGY4 ,ALIAS= ,USAGE=A15 ,ACTUAL=A15,$ FIELD=HOUSING ,ALIAS= ,USAGE=A03 ,ACTUAL=A03,$ FIELD=RPR ,ALIAS= ,USAGE=A01 ,ACTUAL=A01,$ FIELD=URIN ,ALIAS= ,USAGE=A01 ,ACTUAL=A01,$ FIELD=PRACTITIONAR ,ALIAS= ,USAGE=A02 ,ACTUAL=A02,$ FIELD=SHIFT ,ALIAS= ,USAGE=A01 ,ACTUAL=A01,$ FIELD=PATINET_ID ,ALIAS=PATID.IMS ,USAGE=A12 ,ACTUAL=A12,$ FIELD=WHO_ADDED ,ALIAS= ,USAGE=A10 ,ACTUAL=A10,$ FIELD=DATE_ADDED ,ALIAS= ,USAGE=A08 ,ACTUAL=A08,$ FIELD=WHO_EDITED ,ALIAS= ,USAGE=A10 ,ACTUAL=A10,$ FIELD=DATE_EDITED ,ALIAS= ,USAGE=A08 ,ACTUAL=A08,$ FIELD=STATION_ID ,ALIAS= ,USAGE=A12 ,ACTUAL=A12,$ FIELD=DIABETIC ,ALIAS= ,USAGE=A01 ,ACTUAL=A01,$ FIELD=DIALYSIS ,ALIAS= ,USAGE=A01 ,ACTUAL=A01,$ GROUP=NAMEIX ,ALIAS=IXNAME.SKY, ,USAGE=A24, ,ACTUAL=A24,$ FIELD=NAMEL ,ALIAS=LAST_NAME ,USAGE=A12 ,ACTUAL=A12,$ FIELD=NAMEF ,ALIAS=FIRST_NAME ,USAGE=A12 ,ACTUAL=A12,$
GROUP=COMPIX ,ALIAS=IXCOMP.SKY ,USAGE=A33 ,ACTUAL=A33,$ FIELD=SSN_ALPHA ,ALIAS=SSNALPHA ,USAGE=A09 ,ACTUAL=A09,$ FIELD=EMPLOYEE_ID ,ALIAS=EMPLOYEEID ,USAGE=A12 ,ACTUAL=A12,$ FIELD=LASTNAME ,ALIAS=LAST_NAME ,USAGE=A12 ,ACTUAL=A12,$
GROUP=ADMDIX ,ALIAS=IXADMD.SKY ,USAGE=A08 ,ACTUAL=A08,$ FIELD=SSN_ALPHA ,ALIAS=SSNALPHA ,USAGE=A08 ,ACTUAL=A08,$
This Master File is member PATINFO in the Master File data set because the first database PCB in the TSTPSB01 FOCPSB specifies PCBNAME=PATINFO.
Information Builders |