IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Defining KEYs in IMS DB(Data Base definitions)


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jul 01, 2009 11:42 pm
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
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
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFSURSG4/1.1?SHELF=DFSSHCG3&DT=20071023011749
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

Moderator Emeritus


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

PostPosted: Thu Jul 02, 2009 12:24 am
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jul 02, 2009 2:10 am
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jul 02, 2009 12:20 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top