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
 
about multiple occurrences (twins)

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

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Thu Jul 07, 2005 3:18 am    Post subject: about multiple occurrences (twins)
Reply with quote

1)What does the statement "multiple occurrences of a particular child segment " mean with respect to wins.

2)What is the need to have the multiple occurrences.Do all the occurrences contain the same information.or do thay represent the different fields of a segment .

3)How do we access an nth occurrence of a segment.
We have functions to acess the first and the last occurrences but say there are 5 occurrences and we want to access the 2,3,4 one.How do we do that?

Please corect me if I am wrong abou any concept here.
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Jul 07, 2005 3:30 pm    Post subject: Re: about multiple occurrences (twins)
Reply with quote

Hi vijayamadhuri,

Quote:
1)What does the statement "multiple occurrences of a particular child segment " mean with respect to wins.

Multiple occurrences of a child segment means there are more than one value of child for a perticular parent.

Quote:
2)What is the need to have the multiple occurrences.

Assume a case where you have to make a database of student for different subjects. Student info will be in parent segment and courses covered should be in child segment. where a student having more than one course would be having more than one child segment.

Quote:
Do all the occurrences contain the same information.or do thay represent the different fields of a segment .

All the occurrences contain different info of same type.

Quote:
3)How do we access an nth occurrence of a segment.

Suppose u r giving a GNP call to child then u can put a counter in GNP call if CALL RETURN CODE is SPACES. then by comparing the counter u can access perticular occirrences.

Regards,

Priyesh.
Back to top
View user's profile Send private message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Fri Jul 08, 2005 11:33 am    Post subject:
Reply with quote

Hi,

Quote:
counter in GNP


May I know how?




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

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Fri Jul 08, 2005 11:52 am    Post subject: Re:
Reply with quote

Hi Madhu,

Hope you need to study once again the basic concepts.

Suppose consider one simple example as in book.

1st level - VENDOR
2nd level - ITEM
3rd level - LOCATION

In VENDOR segment you have diff fields describing VENDOR personnel details like his CODE, NAME etc.. similarly ITEM and LOC.
One VENDOR can sold diff ITEMs in diff LOCs. So, now if you wanna crate a HDBMS, you have to create a DBD with one ROOT segment and CHILD segments. In PCB you specify PARENT=....... for each SEGM field other than for ROOT segment.

Now for your question




Quote:
1)What does the statement "multiple occurrences of a particular child segment " mean with respect to wins.


One ITEM can sold in diff LOCATIONs. So, multiple occurences for LOCATION.
I hope you know about TWINs, two or more of segment occurences of same type, having same parent are TWINS. In the example you can say LOCATIONs are TWINs and as well as multiple occurrences of a particular child segment. Just think if ITEM has one more child segment at 3rd level namely PRICE. Then you can say all LOC occurences are TWINs, but multiple occurrences of a particular child segment are both LOCs and PRICEs.

A bit confusing, I think. Sorry,if it is so.

Quote:
Do all the occurrences contain the same information.or do thay represent the different fields of a segment .


Then why we need of diff SEGMENT occurences.

Quote:
3)How do we access an nth occurrence of a segment.


Priyesh, can you explain me how to set counter for GNP call. My thought was( may be its a turnaround method) use GU call to set position at that level, issue successive GN calls.

I also expecting effecient way than me.

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

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Fri Jul 08, 2005 2:59 pm    Post subject: Re: about multiple occurrences (twins)
Reply with quote

Hi Sudhaaa,

Quote:
Priyesh, can you explain me how to set counter for GNP call.


What I meant to say was...to give a GNP Call & if RETURN CODE = SPACES ..means first occurrences of child got found.......So there u can add 1 to any counter (initialized to zero earlier)......

And again perform the GNP Para for the same parent, again if RET CODE is SPACES....means u got next occurrence of child.....Here again the value of counter will be increamented......this process will continue till u get END OF DB....that is RET CODE "GE" or "GB".........

I hope I was clear.....If you have any doubt ...get back.....

Regards,

Priyesh.
Back to top
View user's profile Send private message
sudhaaa

New User


Joined: 24 Mar 2005
Posts: 51

PostPosted: Sun Jul 10, 2005 5:14 pm    Post subject: Re
Reply with quote

THANKS icon_biggrin.gif
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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 1 Wed Dec 06, 2017 1:50 am
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm
No new posts Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

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