Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

IMS DB Last segment call under a root segment

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

New User


Joined: 18 Dec 2006
Posts: 1
Location: Kolkata, India

PostPosted: Mon Dec 18, 2006 5:21 pm    Post subject: IMS DB Last segment call under a root segment
Reply with quote

Hi,

I need to call the last occurance of the child segment under a parent root segment. Example Root segment is 'A' under which there are 5 child segments 'B'.

Through one IMS call (not with GN call till i get the last call) the last segment is to be retrieved.
Back to top
View user's profile Send private message

guptae

Moderator


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

PostPosted: Mon Dec 18, 2006 5:46 pm    Post subject:
Reply with quote

Hi There,

U can give two ssa

Code:
02 SSA-ASEG-QUALIFIED.                               
   03 SSA-SEGMENT-NAME              PIC X(8) VALUE 'A'.     
   03 SSA-COMMAND-CODE            PIC X(4) VALUE SPACES.       
   03 SSA-BEGIN-QS                      PIC X     VALUE '('.           
   03 SSA-KEY-NAME                      PIC X(8) VALUE 'KEYNAME'.       
   03 SSA-R-O                               PIC XX   VALUE 'EQ'.         
   03 SSA-KEY-VALE                      PIC X(11)VALUE 'specify the value of 
                                                   that rool key value'                                     
   03 SSA-END-QS                        PIC X    VALUE ')'.


Code:
02 SSA-BSEG.                                               
    03 FILLER                        PIC X(8)  VALUE 'B'.
    03 SSA-COMMAND-CODE              PIC X(4)  VALUE '*L--'.     


Code:
CALL 'CBLTDLI' USING  GU-FUNC                 
                                   PCB-MASK               
                                   B-SEGMENT   
                                   SSA-ASEG-QUALIFIED 
                                   SSA-BSEG.


Hope it will helpful
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Tue Dec 19, 2006 3:23 pm    Post subject:
Reply with quote

Correct Ekta. In addition my 2 cents. It's depending on where your gained position in the database. If you already did the GU on the root a simple GNP on the child with command code *L may do. Another option; if you didn't read the root yet and you want it too you may use a pathcall using command code *D and an appropriate IO-area.

So.....it always depends on the actions you did before your required next move. Please provide us with that information next time.
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 Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
No new posts PCOMM macro to call another PCOMM macro boyti ko All Other Mainframe Topics 4 Tue Jul 12, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us