Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Defining KEYs in IMS DB(Data Base definitions)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
Thinnaluri

New User


Joined: 23 May 2009
Posts: 8
Location: Hyderabad

PostPosted: Wed Jul 01, 2009 11:27 pm    Post subject: Defining KEYs in IMS DB(Data Base definitions)
Reply with quote

Hi All,
I have new requirement from the client to add some new fields to the existing KEY in the IMS DB DBDs.

The database has only one segment(very simple one), but the segment length is 100. At present I have the first 20 length as the KEY to the DB.

Now the requirement is to add 2 fields(occupying 85 to 88 positions) in the KEY.

Could anyone please help me out??Solution in the form of code would help a lot rather than a theoretical one icon_smile.gif .

Thank you very much in anticipation!!. Do let me know in case you need any clarification.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Jul 01, 2009 11:42 pm    Post subject: Reply to: Defining KEYs in IMS DB(Data Base definitions)
Reply with quote

this is a help forum, not a do it for me one...
is there something You did not understand in the manuals...

as a refresh... here are the pointers to the relevant info on the subject

the whole shebang
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFSURSG4/CCONTENTS?SHELF=DFSSHCG3&DN=SC18-7834-03&DT=20071023011749

the dbd and psb related chapters
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFSURSG4/1.1?SHELF=DFSSHCG3&DT=20071023011749
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFSURSG4/1.2?SHELF=DFSSHCG3&DT=20071023011749
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jul 02, 2009 12:24 am    Post subject:
Reply with quote

Hello,

Quote:
Do let me know in case you need any clarification.
If there are questions or problems while you do this, post what you have at that point, and the describe question or problem. If it as an error/abend, post the diagnostic info including the message ids.

As Enrico mentioned, we won't do it for you, but we will help icon_smile.gif
Back to top
View user's profile Send private message
Thinnaluri

New User


Joined: 23 May 2009
Posts: 8
Location: Hyderabad

PostPosted: Thu Jul 02, 2009 1:20 am    Post subject:
Reply with quote

Hello Enrico,
Firstly my apologies for the question asked in a wrong way. Definitely I didn't meant to get work done for me.

Let me rephrase my question/doubt.

"Is there a possibility of having two KEY fields under a same Segment in IMS DB DBD??"

Let me give you an example:

SEG LENGHT = 10
FIELD = NAME, START = 1, BYTES = 3---let us consider this to be the key of length 3.

For the same above segment I need to modify the key in such a way that, First 3 characters and last 2(But no the middle fields) characters of the segment should constitute the KEY.

Is there any possibility of attaining above condition.

Thanks a lot!!. Sincere apologies once again. Let me know if my question/doubt is not clear.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Jul 02, 2009 2:10 am    Post subject: Reply to: Defining KEYs in IMS DB(Data Base definitions)
Reply with quote

in the dbd there can be only one field defined as
Code:
FIELD NAME=(.........,SEQ,U)

but i wonder why Your client is not aware of this icon_eek.gif

You will have to review the segment layout a bit
remember a type=C field might represent a combination of data types
if a part of it is a PACKED decimal number enforce the use of a consistent sign representation in order to ensure the proper sequence
( negatve numbers before fositive numbers )
yes the issue is a bit murky

meditate an read the POP ( principle of operations)
about the packed number representation and the sign bit configuration
hint...
the negative sign is a "D" the positive can be a "C" or an "F"
after a computation being done a positive sign becomes a "C"
so if You want a consisten collating sequence You must transform it into an "F"
good luck icon_biggrin.gif
Back to top
View user's profile Send private message
Thinnaluri

New User


Joined: 23 May 2009
Posts: 8
Location: Hyderabad

PostPosted: Thu Jul 02, 2009 11:58 am    Post subject:
Reply with quote

Hello Enrico,
Thank you for your suggestion.

As you said I felt like changing the layout of the SEGMENT a bit. But the problem is that the Database is active since long time and has a lot of data...now, changing the layout of the segment would corrupt the existing data If I am not wrong.

I have just looked for any other alternative to over come this situation icon_smile.gif .

Anyways I shall handle this. Thank you very much for your time. icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Jul 02, 2009 12:20 pm    Post subject: Reply to: Defining KEYs in IMS DB(Data Base definitions)
Reply with quote

adding / changing the key structure is usually a major application change
the analysis and the specs were not so accurate

should not be Your job to handle such a situation
has the client ever heard of impact analysis icon_confused.gif
it would be more useful to work with...
the project coordinators ( client' s and Your' s )
DBA support ( client' s and Your' s )
application specialists ( client' s and Your' s )

the issue is also that when changing keys all the GU should be hanged accordingly
and that' s anyhow not a small change

yes, You will have to unload reload the database and recompile all the programs
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us