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

I have 3 levels i want update 3rd level recorrds


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

New User


Joined: 01 Sep 2005
Posts: 10
Location: Bangalore

PostPosted: Tue Feb 14, 2006 5:51 pm
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
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Wed Feb 15, 2006 8:59 am
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: 121
Location: Tadepalligudem

PostPosted: Tue Feb 28, 2006 4:59 pm
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

CICS Moderator


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

PostPosted: Tue Feb 28, 2006 6:48 pm
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
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 How to load to DB2 with column level ... DB2 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Read a flat file and update DB2 table JCL & VSAM 2
No new posts how to update an ISR appl var from an... TSO/ISPF 8
No new posts JPM Reports for each DB2 V12 Function... DB2 0
Search our Forums:

Back to Top