creating a table in IMS



IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

creating a table in IMS

Postby karthickrajamani » Fri Jan 02, 2009 5:19 pm

Hi,

I need to create an IMS table with 2 child segments. I have the tables in relational form. Can anyone help me out with the DDL for the same? I am new to IMS and have no clue how to proceed. PFB the table structures.

Parent table
VEH

VIN VARCHAR (17)
MODEL_ID DECIMAL (2, 0)
VEH_MODEL_YR DECIMAL (4, 0)
ADD_TIMESTAMP TIMESTAMP
UPD_TIMESTAMP TIMESTAMP

Child Segment 1
MFG

VIN VARCHAR (17)
MFG_DATE DATE
MFG_PLANT_ID VARCHAR (01)
ADD_TIMESTAMP TIMESTAMP
UPD_TIMESTAMP TIMESTAMP

Child Segment 2
ACCESSORY

VIN VARCHAR (17)
ACC_CODE VARCHAR (02)
ACC_DESC VARCHAR (50)
ADD_TIMESTAMP TIMESTAMP
UPD_TIMESTAMP TIMESTAMP

Please let me know if anyone can help me with the same

Cheers,
Karthick
karthickrajamani
 
Posts: 3
Joined: Tue Aug 19, 2008 3:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: creating a table in IMS

Postby dick scherrer » Sat Jan 03, 2009 7:08 am

Hello,

Suggest you talk with your dba - there are probably similar tables already defined in your system and you could use them as examples to create yours.

Did you look in the IMS Manual? Probably not, so here is the Table of Contents:
http://publibz.boulder.ibm.com/cgi-bin/ ... 1/CONTENTS?

If you find something that is not clear, post what you found and your question about. Someone should be able to help clarify.

People here will help but not actually do your work. Often, when inapproriate solutions are posted, they are deleted. The goal is to help people learn, not become more dependent on others to provide "code".
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: creating a table in IMS

Postby prakash.subramaniam » Thu Jan 15, 2009 3:20 pm

Hi,
This is the hirarichal model for the above mentioned table in IMS.

DBD NAME=VEH,ACCESS=(HDAM,OSAM),RMNAME=(DFSHDC40,3,71)
DATASET DD1=WIREDD,DEVICE=3380, BLOCK=2400
FIELD NAME=VIN,BYTES=17,START=1,TYPE=C
FIELD NAME=MODEL_ID,BYTES=2,START,18,TYPE=D
FIELD NAME=VEH_MODEL,YR,BYTES=4,START=20,TYPE=D
FIELD NAME=ADD_TIMESTAMP,BYTES=4,START=25,TYPE=C
FIELD NAME=UPD_TIMESTAMP,BYTES=4,START=30,TYPE=C

SEGM NAME=MFG,PARENT=VEH,BYTES=100
FIELD NAME=VIN,BYTES=17,START=35,YPE=C
FIELD NAME=MFG_DATE,BYTES=8,START=52,TYPE=C
FIELD NAME=ADD_TIMESTAMP,BYTES=4,START=53,TYPE=C
FIELD NAME=UPD_TIMESTAMP,BYTES=4,START=58,TYPE=C
DBDGEN
Thanks and Regards,
Prakash Subramaniam.
9840187992.
prakash.subramaniam
 
Posts: 9
Joined: Thu Jan 15, 2009 2:45 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IMS DB/DC

 


  • Related topics
    Replies
    Views
    Last post