Explain with sample records about GU,GN,GNP call



IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

Explain with sample records about GU,GN,GNP call

Postby whale » Tue Jan 29, 2008 7:19 pm

Can anyone explain with sample records about GU,GN,GNP calls ?
i have known theoretically but i want this info with sample records.
Regards ,
whale
_______________________________________
Self-confidence, hard work can ensure success
whale
 
Posts: 8
Joined: Mon Dec 17, 2007 8:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Explain with sample records about GU,GN,GNP call

Postby whale » Wed Jan 30, 2008 5:26 pm

I learnt myself,here are the explanation.

GU - It is dynamic fetching a record from IMS DataBase.Once the call over if you try to give one more GU call , the search will start from ROOT segment . This is the drawback of more then one GU call in one program.

GN-It is sequential fetching . If you give first time GN call fetch will start from root otherwise it will start from where the database pointer positioned previously.Fetching is done till the last record for both quallified as well as unqualified ssa.

GNP-After assign the parentage (by using GU or GN ) the GNP calls will fetch the all dependent segment occurance of the
parent segment.Status code never be GA .
Regards ,
whale
_______________________________________
Self-confidence, hard work can ensure success
whale
 
Posts: 8
Joined: Mon Dec 17, 2007 8:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Explain with sample records about GU,GN,GNP call

Postby whale » Wed Jan 30, 2008 5:39 pm

After understanding the theroy here is the Example.
             A
        B          F
 
C      D     E


GU
SSA_A = SEGMENT A KEY VALUE
SSA_B = SEGMENT B KEY VALUE
SSA_C = SEGMENT D KEY VALUE
PLITDLI(FOUR,GU,DB_PNT,IO_AREA,SSA_A,SSA_B,SSA_C);
Above call retrives segment D occurence

GN
UNQUL_SSA_B = B
PLITDLI(FOUR,GN,DB_PNT,IO_AREA,UNQUL_SSA_B);
Above call retrives all segment b ocuurence

GNP
PLITDLI(FOUR,GNP,DB_PNT,IO_AREA);
Above call retrives all dependent segment occurence of
C D E .
Regards ,
whale
_______________________________________
Self-confidence, hard work can ensure success
whale
 
Posts: 8
Joined: Mon Dec 17, 2007 8:19 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IMS DB/DC

 


  • Related topics
    Replies
    Views
    Last post