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

How UPDATE is different then READ+REPL?


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

New User


Joined: 06 Feb 2007
Posts: 5
Location: Bangalore

PostPosted: Tue Feb 13, 2007 12:00 pm
Reply with quote

hi all,




can any body tell me the difference between the following:

for updating any of the record in the IMS data base we will use READ with HOLD and then REPL Calls but instead of that we can use just UPDATE which internally call two functions like GHU and REPL but before or after calling up i have pass the new values to the fields which are to be updated but row is not getting updated can any body explain how actually it works?


regards

Aseef,
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue Feb 13, 2007 1:32 pm
Reply with quote

You are correct in IMS to update a segment first we need to do GET segment with hold option and do a REPLace.

In IMS there is no UPDATE function, may be this is an interface program developed specifically at your site.

In IMS unit of I/O is always segments, not sure why you are referring as rows.

Please give more details like status code if failing to REPL?
Back to top
View user's profile Send private message
asifaddy
Warnings : 1

New User


Joined: 06 Feb 2007
Posts: 5
Location: Bangalore

PostPosted: Tue Feb 13, 2007 2:28 pm
Reply with quote

ya Devzee

sorry what you said is correct always segment not rows, sory for that



while compiling it gives maxcc=00,

but when i run the program it is abended with sdc s000 u3504

and produced ceedump here is a code of the update functions please have a look and reply

============================= ================
SEQ==> CWTS8I01
REC=> CWTS8I01 @DEFINE
0001 AUTOEXEC TRANSACT
============================= ================
PCB==> BQ2PM00 BQ2PM00
SEG=> SQ2RT @DEFINE CW-SUPP-ID
0001 UPDATE
================bottom of data=====================

the paragraph which is generated by the update function is below:



********************************* TOP OF DATA***************
* DEFAULT GENERATED USER I/O
* DEFAULT CALL: ** U-100-UPDATE-SQ2RT ****

* ** SSAS IN STORAGE


* ** ASSIGNMENT STATEMENT FOR KEY



CALL 'CBLTDLI' USING GHU-FUNC
BQ2PM00-PCB
UPDATE-AREA

CALL 'CBLTDLI' USING REPL-FUNC
BQ2PM00-PCB
Q2RT-SUPP-SAT-RT-SEG-GRP.

********************************* BOTTOM OF DATA************



regards
aseef


[/url]
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 13, 2007 4:49 pm
Reply with quote

The update-generator doesn't show the SSA of which segmenttype to get and hold. I would expect the following information in your call repesenting the SSA; segmenttype = SQ2RT with value passed for key CW-SUPP-ID.
Quote:
SEG=> SQ2RT @DEFINE CW-SUPP-ID


Funny though there's no status-code icon_neutral.gif
Back to top
View user's profile Send private message
asifaddy
Warnings : 1

New User


Joined: 06 Feb 2007
Posts: 5
Location: Bangalore

PostPosted: Tue Feb 13, 2007 5:36 pm
Reply with quote

hi George


with update instead of giving the key(CW-SUPP-ID)of file read
if we give the key of the database and also we have to move the
CW-SUPP-ID to the key field of the database(Q2RT-RA-SUPP-ID) then we will make it work other wise its giving the same abend code during run time
i got that by doing so if you have any other methods of doing it please kindly inform


here is the code

====== ======== ==============================
SEQ==> CWTS8I01
REC=> CWTS8I01 @DEFINE
0001 AUTOEXEC TRANSACT
============================== ================
PCB==> BQ2PM00 BQ2PM00
SEG=> SQ2RT @DEFINE Q2RT-RA-SUPPID
0001 UPDATE Q2RT-RA-SUPP-ID
****** ******** ************ BOTTOM OF DATA ***************

and in the proctran


MOVE CW-SUPP-ID TO Q2RT-RA-SUPP-ID
MOVE "UU" TO Q2RT-CCY-CDE
PERFORM U-100-UPDATE-SQ2RT.
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 13, 2007 5:52 pm
Reply with quote

I am a bit lost here icon_rolleyes.gif Do I understand correct that after you supplied the SSA-information it works, and when you don't it abends? Please clearify. And what do you mean with:
Quote:
i got that by doing so if you have any other methods of doing it please kindly inform
Back to top
View user's profile Send private message
asifaddy
Warnings : 1

New User


Joined: 06 Feb 2007
Posts: 5
Location: Bangalore

PostPosted: Tue Feb 13, 2007 6:00 pm
Reply with quote

hi


i mean if you have other way of doing the task post that.


according to me it has to work man i dont know y its not working.


i dont know y its not taking variables other than the key variable of the database i to confused ya let you know soon?
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 13, 2007 6:13 pm
Reply with quote

The stuff you are using looks like a generator to me. It generates the DLI-calls for a GHU and a REPL. The regular calls are:
Code:

GHU
PCB
IO-AREA <-- SEGMENT FOUND
SSA-QUALIFIED

REPL
PCB
IO-AREA-MODIFIED <-- NEW DATA (KEY CHANGE NOT ALLOWED)
SSA-UNQUALIFIED


I don't know this generator (looks like home-built) but if you want this thing to operate correctly it has to generate the above calls. Did you check any available documentation? Are there any other applications using this thing? Is it proven technology? If you can't get this generator working find the author for more information/correction and last but not least: you can also code the DLI-calls by yourself.
Back to top
View user's profile Send private message
asifaddy
Warnings : 1

New User


Joined: 06 Feb 2007
Posts: 5
Location: Bangalore

PostPosted: Wed Feb 14, 2007 9:10 am
Reply with quote

hi,

if we specify database key field while declaring in the data group it will generate the calls wat you have specified but if you dont and declaring the other variables it is not generating a ssa for GHU call that was the problem i dont know y its not working i only used for the first time i have given that to my senior team mates and presently they are using that and i dont have docs for that and yesterday i have given you the abended code right that was accured during replacing or updating i dnt get any info in dump master also if i get i will get back to u

[/quote]
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 to read log with rexx CLIST & REXX 11
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts ICETOOL to Read records SMF CEF it is... DFSORT/ICETOOL 4
No new posts Read a flat file and update DB2 table JCL & VSAM 2
Search our Forums:

Back to Top