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

how to insert into lower level segment of db


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
d_ezhil

New User


Joined: 28 Apr 2005
Posts: 11
Location: chennai

PostPosted: Thu Jun 09, 2005 2:53 pm
Reply with quote

hi all,

i have a problem in inserting data into lower(level 3) segment .
The lower segment doesn't have any unique key.
I inserted values in that segment with unique in level 2 segment's unique key value (ie in ssa) but, the values are inserting under 1st record in level 2 irrespective of any key value given.

Could any one suggest me how to insert into the lower segment with respect to key value in 1st and 2nd level or only 2nd level

Thanks & Regards
Arasan.
Back to top
View user's profile Send private message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Thu Jun 09, 2005 5:03 pm
Reply with quote

Hi,

The problem is DLI functions you are using. Can you clearly explain me which DLI calls you issued before ISRT function.

Because when you issue ISRT function, the data can be stored with respect to POSITION establised in the privious call. Based on this position only you can use appropriate SSAs in ISRT call. Otherwise it will through some problems.

Regards,
Sudhaaa
Back to top
View user's profile Send private message
d_ezhil

New User


Joined: 28 Apr 2005
Posts: 11
Location: chennai

PostPosted: Thu Jun 09, 2005 5:18 pm
Reply with quote

Hi Sudhaa,
Thank you for your reply.
I didn't use any DL/I calls before issuing ISRT function.
I have written separate program to insert in the lower segment only.
I am giving qualified ssa for level1 & 2 segments , the new segment is not being inserted in the specified position.
Do i need to fix the position before ISRT function? If yes how to do it?.

here is a single DL/I call which i am using.

CALL 'CBLTDLI' USING DLI-ISRT
DB-PCB-MASK
SEG-IO-AREA
CUST-QSSA
SALES-QSSA

Could u please help me out?

Thanks
Arasan.
SOT-UQSSA.
Back to top
View user's profile Send private message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Thu Jun 09, 2005 5:37 pm
Reply with quote

Hi,

which means the position in the database is not at before Root segment. So, you have to issue one GU call before this ISRT function. I think its MANDATORY. Refer rules for using ISRT call.

You can easily achieve the result.

Regards,
Sudhaaa.
Back to top
View user's profile Send private message
sridhard

New User


Joined: 02 Jun 2005
Posts: 8
Location: Chennai

PostPosted: Thu Jun 09, 2005 8:04 pm
Reply with quote

Hi Arasan,

If you want to insert into low level segment, you have to provide qualifeid SSA for the higher level segments and the unqualifies SSA for the segment you want insert.

The segment you want insert has no unique key, you have to provide the position where it should be inserted.
The position will be specified while generating DBDGEN. You can override that by providing L(last) or F(first) in the command code of SSA.

Ex:

CALL 'CBLTDLI' USING FN-ISRT
PCB-MASK
I/O AREA
SEG-SSA1
SEG-SSA2
SEG-SSA3.

SSA1 and SSA2 should be qualified and SSA3 should be unqualified.
If you want to insert in higher level as well as lower level, Use the command code 'D'.
Suppose if you use the command code 'D' for the SSA2, so record will be inserted into SEG2 and SEG3. So you SSA1 should be Qualified and the SSA2 and SSA3 are unqualified.

Thanks
Sridhar.
Back to top
View user's profile Send private message
d_ezhil

New User


Joined: 28 Apr 2005
Posts: 11
Location: chennai

PostPosted: Thu Jun 09, 2005 8:15 pm
Reply with quote

Hi sridhard,

Thank you for your suggestion.

I can able to understand how to use the command code 'D'?.
But i coudn't get the point of overiding with 'F' or 'L' command code in ssa.

Could you(or anyone) explain in detail, how to use 'F' and 'L' command code and in which segment ?.

Thanks,
Arasan.
Back to top
View user's profile Send private message
sridhard

New User


Joined: 02 Jun 2005
Posts: 8
Location: Chennai

PostPosted: Thu Jun 09, 2005 8:50 pm
Reply with quote

Hi,

You have to use F or L in the command code of SSA for the segment your inserting record.

If you have non unique key for the segment, you have to tell where the record should be inserted. you may be having the so many rows in the segment with the same non unique key. if you give L in the command code, it will be inserted after the last occurence of non unique key.
Like for F it will be inserted before the first occurence of non unique key.

Thanks
Sridhar.
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 JPM Reports for each DB2 V12 Function... DB2 0
No new posts Insert combined with select-max-where DB2 4
No new posts Program level statistics CICS 6
No new posts IMS SEGMENT READ ISSUE IMS DB/DC 0
No new posts Inserting records into the empty segm... IMS DB/DC 1
Search our Forums:

Back to Top