View previous topic :: View next topic
|
Author |
Message |
Prabha Warnings : 2 New User
Joined: 05 Dec 2005 Posts: 79
|
|
|
|
Hi,
I used F commancd ode to insert a segment int he beginning.
The inserted segement has no keys. Already i have one segment in database. If I insert again, its showing segment already exists(status coded II)
If the segment has no key means, is it possible to insert another segment?
Pls help. |
|
Back to top |
|
|
shabir46
New User
Joined: 24 Jan 2008 Posts: 6 Location: Kerala
|
|
|
|
Hi Prabha,
The F command code is used for accessing the first segment from any perticular level from the Segment hirarchy...
Not sure why u used F command code while loading the segments..
Thanks,
Shabir |
|
Back to top |
|
|
mkarthikeyan
New User
Joined: 07 Aug 2008 Posts: 34 Location: Bangalore
|
|
|
|
We can use F with segments that have either no key at all or a non unique key, and that have HERE specified on the RULES operand of the SEGM statement in the DBD. If you specify HERE in the DBD, the F command code overrides this, and IMS inserts the new segment occurrence as the first occurrence of that segment type. Using the F command code to override the RULES specification. |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
In all my years of IMS, I limited my use of command codes. There were some that I thought would solve a specific problem, but not so. Try to understand what IMS is doing behind the scenes. For instance, when you use a pathcall command code, IMS is resolving all of the things that would you would be doing if you just coded it with the qualified SSA's. Try to think of your access methods - whether HDAM or HIDAM - the most commonly used. Always - always remember that IMS is POSITIONAL. Also, remember that everything you want to know is in your PCB. You can go after all child segments in a database with an unqualifed SSA specified for that child without knowing it's parent - then find the parent key by looking at the concatenated key in the key feedback area of the SSA. IMS is driven by POINTERS - it knows where it is and who belongs to whom. Twin forward and backward pointers in your DBD definition help resolve - and quickly - issues such as these. |
|
Back to top |
|
|
|