[USflag] The American Programmer [USflag]


Home
Books on Mainframe Programming
Mainframe Manuals and Tutorials
System Abend codes, Sqlcodes, VSAM/QSAM codes
Everything about the IBM AS/400 Midrange Computer - iSeries
Everything about CICS
Everything about COBOL
Everything about DB2 and SQL
Everything about IMS
  Books on IMS
  Manuals on IMS - Hierarchical Database Management System
  IMS/DLI and other type Abend Codes
  IMS/DLI skeleton COBOL Example program
  IMS/DLI DBD PSB Example
  IMS/DLI COBOL Example program to delete segments
  IMS/DLI COBOL program delete all root segments
  IMS/DLI COBOL Example program to insert segments
  IMS/DLI COBOL Example program to update segments
Everything about Java and JavaScript
Everything about JCL and JES
Everything about REXX
Everything about zOS, VSAM, Tivoli, Assembler
Everything about TSO, ISPF, Spufi
Site Map and Site Search

           Home   > IMS   > IMS Example DBD and PSB

HOBBIES database DBD and PSB. Used in other sample program code on this site.

What does an IMS DBD look like? What is a PSB like?
DBD for the workshop database: the HOBBIES database

Note that the actual name of the database is not "HOBBIES," it is DBBSEAT

*     some things will need to be changed for your installation!
      DBD      NAME=DBBSEAT,ACCESS=HDAM,RMNAME=CLCCRAND
      DATASET  DD1=HOBBY,DEVICE=3380
*
      SEGM     NAME=TSROOT,PARENT=0,BYTES=102
      FIELD    NAME=(TSRSTAFF,SEQ,U),BYTES=4,           x 
               START=1,TYPE=C
      FIELD    NAME=TSRSNAME,BYTES=30,START=5,TYPE=C
      FIELD    NAME=TSRDOB,BYTES=6,START=75,TYPE=C
      FIELD    NAME=TSRSEX,BYTES=1,START=101,TYPE=C
      FIELD    NAME=TSRMARRY,BYTES=1,START=102,TYPE=C
*
      SEGM     NAME=TSADDR,PARENT=TSROOT,BYTES=99
      FIELD    NAME=TSAKEY,BYTES=2,START=1,TYPE=P
      FIELD    NAME=TSAPCODE,BYTES=5,START=95,TYPE=C
*      
      SEGM     NAME=TSHOBBY,PARENT=TSROOT,BYTES=49
      FIELD    NAME=TSHKEY,BYTES=2,START=1,TYPE=P


The length of the longest concatenated key is 6

Keep this for reference: the PSB that is used with your program. 

     PCB     TYPE=DB,DBDNAME=DBBSEAT,PROCOPT=A,KEYLEN=6
     SENSEG  NAME=TSROOT,PARENT=0
     SENSEG  NAME=TSADDR,PARENT=TSROOT
     SENSEG  NAME=TSHOBBY,PARENT=TSROOT
     PSBGEN  PSBNAME=LTS001,LANG=COBOL,CMPAT=YES
     END

[DBD Hierarchy Chart]
Learn how to use all the features of IMS: IMS/DLI Programming Books

[Books Computer]

Home Books for Computer Professionals Privacy Terms |
Site Map and Site Search Programming Manuals and Tutorials The REXX Files Top of Page |