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

Explain me about the GNP call with the unqualified SSA


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

New User


Joined: 01 Jul 2005
Posts: 26
Location: Chennai

PostPosted: Thu Jun 29, 2006 4:47 pm
Reply with quote

Hi,

Could anyone explain me about the GNP call with the unqualified SSA?

Regards,

Suthagar.S
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Jun 29, 2006 5:02 pm
Reply with quote

Gnp: Get next with in parent

Suppose my structure is

Policy basic segment is root & it have child like Policy detail segment & Policy occassional segment .

Now your pointer is on policy basic segment (pbtseg) whose key means policy number = rat1000 you want to access all the child policy detail segment(pdtlseg) of this one.

In working storage

01 ssa-pdtlseg-unqualified.
03 ssa-segment-name pic x(8) value 'pdtlseg'.
03 ssa-command-code pic x(4) value spaces.
03 filler pic x(1) value ' '.
You can make a call

Call 'CBLTDLI' function-GNP,
PCB-MASK,
IO-AREA,
ssa-pdtlseg-unqualified.
Back to top
View user's profile Send private message
Suthagar

New User


Joined: 01 Jul 2005
Posts: 26
Location: Chennai

PostPosted: Thu Jun 29, 2006 6:01 pm
Reply with quote

Thanks for your immediate response Gupta.

I would like to know more abot GNP call actually.

For the base segment I had gone with the GN call and for the first child segment if I go with the GNP call with the unqualified SSA means how it will retrieve the data.

Anyone can help me out in this regard.

Regards,
Suthagar. S
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Sun Jul 16, 2006 12:05 pm
Reply with quote

Suthagar wrote:
Thanks for your immediate response Gupta.

I would like to know more abot GNP call actually.

For the base segment I had gone with the GN call and for the first child segment if I go with the GNP call with the unqualified SSA means how it will retrieve the data.

Anyone can help me out in this regard.

Regards,
Suthagar. S



Hi suthagar,

IMS basically travels in TOP - DOWN and LEFT - RIGHT format. Hence, IMS will fetch all the occurence of the child Policy detail segment and fetches all the occurences of Policy detail segment.

Hope this clarifies the query.


Corrections welcomed....

Gowtham
Back to top
View user's profile Send private message
subramaniabharathi

New User


Joined: 09 Mar 2006
Posts: 9

PostPosted: Sun Jul 16, 2006 2:26 pm
Reply with quote

I would like to add what suthagar said
IMS basically travels in TOP - DOWN and LEFT - RIGHT format. Hence, IMS will fetch all the occurence of the child Policy detail segment and fetches all the occurences of Policy detail segment.
If you fetch the root and then give an GNP it will traverse in the above order.
But If you dont like to traverse to other immediate parent segments and you want to retreive the segements directly which is the next parent level to the root.
You could give a GNP with the required segment in the unqualified segment this will fetch the segment directly without traversing.
Remember one thing Using unqualified root you cannot specify or get the correct occurance.You will get all the occurance.As there is no such keying facility in unqualified ssa


correct me if i am wrong

Thanks
subramaniabharathi
Back to top
View user's profile Send private message
komalnik

New User


Joined: 28 May 2005
Posts: 7

PostPosted: Thu Aug 24, 2006 12:13 pm
Reply with quote

Hi,

The acronym for GNP is Get next within Parent. This is usually issued with an unqualified ssa. The main reason being before issuing this we will set the Parentage by issuing either a "GN" or else an "GU" Call. Then after setting the Parentage We will issue GNP with Unqualified so that it will fetch all occurences within that Parent Only.

Now let me take a Scenario

The root being a Policy Segment and am setting the Parentage on a Particular Occurence and then I will issue a GNP Saying get me all the Occurences under this.
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 Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
No new posts DB2 Statistics - Using EXPLAIN and qu... DB2 1
No new posts Batch call online program, EXCI task ... CICS 3
No new posts CSQBGET - Call giving completion code... COBOL Programming 3
Search our Forums:

Back to Top