Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to insert into lower level segment of db

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: how to insert into lower level segment of db
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    Post subject: Reply
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    Post subject:
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    Post subject:
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    Post subject: Re: how to insert into lower level segment of db
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    Post subject:
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    Post subject: Re: how to insert into lower level segment of db
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    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 How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts How do I right justify a string in an... rakesh17684 DB2 1 Wed Jun 08, 2016 8:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us