Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
I have 3 levels i want update 3rd level recorrds

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
Author Message
yadagiri.p

New User


Joined: 01 Sep 2005
Posts: 14
Location: Bangalore

PostPosted: Tue Feb 14, 2006 5:51 pm    Post subject: I have 3 levels i want update 3rd level recorrds
Reply with quote

Hi

i have 3 levels


Ex vendor,, item, location


i want update all update all the location how can i do this



bye

yadagiri
Back to top
View user's profile Send private message
References
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 116

PostPosted: Wed Feb 15, 2006 8:59 am    Post subject: Re: I have 3 levels i want update 3rd level recorrds
Reply with quote

yadagiri.p wrote:
Hi

i have 3 levels


Ex vendor,, item, location


i want update all update all the location how can i do this



bye

yadagiri


hi yadagiri,

is your requirement to update all the location segments. then you can establish a GHNP call from your ITEM segment, to establish the parentage. you can issue a replace call to update the LOCATION segment.


suggestions welcomed..

gowtham
Back to top
View user's profile Send private message
rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 130
Location: Tadepalligudem

PostPosted: Tue Feb 28, 2006 4:59 pm    Post subject:
Reply with quote

---------------
| vendour | --------> assume for it, ssa name is vendour-ssa
---------------
|
v
---------------
| item | --------> assume for it, ssa name is item-ssa
---------------
|
v
---------------
| Location | --------> assume for it, ssa name is location-ssa
---------------

Code:

Main-para.
          perform p1 until status-code='GB'
p1.
         CALL 'CBLTDLI' USING 'GN'
                        PCB-MASK
                        ITEM-IO-AREA
                        UNQUAL-VENDOUR-SSA
                        UNQUAL-ITEM-SSA

          PERFORM P2 UNTIL STATUS-CODE='GE'

p2.
        CALL 'CBLTDLI' USING 'GHNP'
                       PCB-MASK
                       LOCATION-IO-AREA

       
* MODIFY THE DATA IN THE LOCATION-IO-AREA AS PER THE REQ.DON'T  MODIFY KEY FIELDS

         CALL 'CBLTDLI' USING 'REPL'
                        PCB-MASK
                        LOCATION-IO-AREA




here p2 will read all the occurances with in the paraent of item segment occurance

corrections welcomed.............

Thanks,
Rajesh.
Back to top
View user's profile Send private message
Bitneuker

IMS Moderator


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

PostPosted: Tue Feb 28, 2006 6:48 pm    Post subject:
Reply with quote

Also for this item I'd like to point out the manual containing pathcalls (see link at different topic). A piece from the manual:

The N command code prevents you from replacing a segment on a path call. The N command code works with the D command code to allow the application program to process multiple segments using one call. While the D command code alone retrieves a path of segments in your I/O area, using the N command code with it allows you to distinguish which segments you want to replace. The following example only replaces the TREATMNT segment.




GHU PATIENT*D(PATNObbb=b06439)
ILLNESSb*D(ILLDATEb=19930301)
TREATMNT



REPL PATIENT*N(PATNObbb=b06439)
ILLNESSb*N(ILLDATEb=19930301)
TREATMNT


If you use D and N command codes together, IMS retrieves the segment but does not replace it.



The N command code applies only to REPL calls, and IMS ignores it if you include the code in any other call.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1