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 - Is GHU call needed for ISRT action
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Tue Aug 17, 2010 6:24 pm    Post subject: IMS DB - Is GHU call needed for ISRT action
Reply with quote

Hi,

I have a parent segment Called LTPOROOT and its child segment is LTPOPOLH. Root contains the policy information while the LTPOPOLH contains the transaction history of the policy. A single policy ll usually have multiple transaction and hence this ll have multiple segment occurences.

I have to now change the status in root segment field and then insert the information regarding this update in the LTPOPOLH.

on LTPOROOT I am using GHU call and then REPL call to make the required update and this is happening successfully.

Now on LTPOPOLH I am using ISRT call to make a new entery for the transaction.

Now my query is GHU call needed before ISRT. If yes on which segment should i give GHU call as this is new insertion.

and ISRT call should to be qualified or unqualified.

and i am getting following error code when I used a qualified ISRT call.

TNG3VIND: STACHN RUN TERMINATED. * ABORT CODE: ACDF *
**************************
MESSAGE: INVALID DL/I STATUS CODE
SECTION: SECTION TRACE NOT IN USE
DATABASE: DTPOLDA
ACTION: ISRT
STATUS: AJ
SSA: TPOROOT (TPORKEY =IB078005004)
: EDDDDDE44EDDDDCE447CCFFFFFFFFF5
: 37696630D376925800E92078005004D
SSA: TPOPOLH (TPOPKEY = .......<)
: EDDDDDC44EDDDDCE474034853745
: 37676380D37672580E0132C756CD
TEXT: INVALID SEGMENT QUALIFICATION
Back to top
View user's profile Send private message

Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Aug 17, 2010 6:26 pm    Post subject:
Reply with quote

Please post both of your calls.
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Tue Aug 17, 2010 6:37 pm    Post subject:
Reply with quote

Sandy Zimmer wrote:
Please post both of your calls.


PERFORM S3-GNP-TPOPOLH-U UNTIL W1-DATABASE-FINISHED.

Im moving the key fields here.

PERFORM S15-ISRT-TPOPOLH-Q
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Aug 17, 2010 6:39 pm    Post subject:
Reply with quote

I want to see your SSAs and your IMS calls.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Aug 17, 2010 6:41 pm    Post subject:
Reply with quote

Quote:
PERFORM S3-GNP-TPOPOLH-U UNTIL W1-DATABASE-FINISHED.


This perform tells me that you are not POSITIONED where you think you are.
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Tue Aug 17, 2010 6:46 pm    Post subject:
Reply with quote

Sandy Zimmer wrote:
Quote:
PERFORM S3-GNP-TPOPOLH-U UNTIL W1-DATABASE-FINISHED.


This perform tells me that you are not POSITIONED where you think you are.


ya im slight confused here regarding where to POSITION myself before inserting.

Do i need to perform insert after the first read or after erading the last record
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Aug 17, 2010 6:58 pm    Post subject:
Reply with quote

PLEASE post your SSAs - then post the moves to the SSAs. Then post your calls.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Tue Aug 17, 2010 10:49 pm    Post subject:
Reply with quote

It's a little after noon on Tues here in the states - it's the middle of the nite in India. So, I am not expecting a reply until morning here in the states.

In the interim, please read about what is needed for a CHILD segment insert. And, where is your input coming from? Do you have a flat file that tells you the policy and transaction information? Does it have a routine for the most recent transaction date? What is the key of both the root and child segments? And, remember that a HOLD call is not needed for an insert.
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Wed Aug 18, 2010 7:33 pm    Post subject:
Reply with quote

Sandy Zimmer wrote:
It's a little after noon on Tues here in the states - it's the middle of the nite in India. So, I am not expecting a reply until morning here in the states.

In the interim, please read about what is needed for a CHILD segment insert. And, where is your input coming from? Do you have a flat file that tells you the policy and transaction information? Does it have a routine for the most recent transaction date? What is the key of both the root and child segments? And, remember that a HOLD call is not needed for an insert.


Hi Sandy,

Now I am facing a different kind of problem...

Can u pls tell me how to position myself at the last record of the particular segment before inserting into LTPOPOLH which has many transaction for single policy.

I am doing the following things.

1. Read the policy number from input file.

2. GU call on LTPOROOT.

3. REPL on LTPOROOT to replace a field

3. GNP Call on LTPOPOLH.

without using the insert statement the job is ending fine with REPL getting executed successfully. But I am getting follpwing abend on online screen

* * * * * * * * * * * * * * * * * * * * * * * * *
* O L A S O N L I N E A B E N D *
* * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Abend..... AGD9 Program.. PTAG00 *
* *
* Terminal.. G5AA User..... NGOVIND *
* *
* Date...... 18-Aug-10 Time..... 14:56 *
* *
* * * * * * * * * * * * * * * * * * * * * * * * *
* O L A S O N L I N E A B E N D *
* * * * * * * * * * * * * * * * * * * * * * * * *

can u pls tell me the reason for the abend even without inserting
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Aug 18, 2010 7:39 pm    Post subject:
Reply with quote

Why do you think you need to be at the last child segment to do your insert? I am assuming that your database is either HDAM or HIDAM - it is keyed.

Once again, I will ask you to please post your code for your calls. You also need to do a GHU not a GU - you cannot perform any updates to an existing segment without a HOLD call.
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Wed Aug 18, 2010 7:50 pm    Post subject:
Reply with quote

Sorry i forgot to mention that... i am using a GHU call before replace...

I am using the following calls in the order mentioned.

PERFORM S1-GU-TPOROOT-Q.
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-GU
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-ROOT-Q.

PERFORM S30-GHU-TPOROOT-Q.
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-FUNC
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-ROOT-Q.

PERFORM S29-REPL-TPOROOT-U.
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-REPL
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-ROOT-U.

PERFORM S3-GNP-TPOPOLH-U
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-GNP
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-HIST-U.

Any idea on the reason for the online abend I mentioned in my previous post.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Aug 18, 2010 8:03 pm    Post subject:
Reply with quote

I have absolutely no idea what that error message indicates - it must be something in your particular environment. Where are you checking for status codes after you calls? What's in the paragraphs for the perform statements.

Why are you issuing this call? It is not needed - get rid of it.
PERFORM S1-GU-TPOROOT-Q.
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-GU
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-ROOT-Q.

Leave this call.PERFORM S30-GHU-TPOROOT-Q.
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-FUNC
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-ROOT-Q.

Where are you moving - updating your root information before the replace?PERFORM S29-REPL-TPOROOT-U.
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-REPL
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-ROOT-U.

Get rid of this - no reason for it.
PERFORM S3-GNP-TPOPOLH-U
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-GNP
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-HIST-U.

You can put your insert after your replace of the root AND after you check your return status call for the replace. You will be using 2 SSAs - ATPOSSA-ROOT-Q and unqualified for the child segment. I do need to see the key field.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 18, 2010 8:15 pm    Post subject:
Reply with quote

Quote:
Where are you checking for status codes after you calls?


This seems to be an attribute of most that post here.
if they would check their status codes (cobol, db2, rexx, anything.....)
there would be less traffic on this board.
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Wed Aug 18, 2010 8:32 pm    Post subject:
Reply with quote

hi my insert looks like below

S15-ISRT-TPOPOLH-U
CALL 'HAZM00' USING CAZMAREA
WAZ0SERV-DLI-FUNC
TPOL-DA-PCB1-MASK
WAZ0SERV-IO-AREA
ATPOSSA-ROOT-Q
ATPOSSA-HIST-U.

01 ATPOSSA-ROOT-Q.
05 FILLER PIC X(08) VALUE 'TPOROOT'.
05 FILLER PIC X VALUE '('.
05 FILLER PIC X(08) VALUE 'TPORKEY'.
05 ATPOSSA-ROOT-ROP PIC XX VALUE '='.
05 ATPOSSA-ROOT-KEY PIC X(11) VALUE SPACES.
05 FILLER PIC X VALUE ')'.

I am passing the key to this segment and ATPOSSA-HIST-U is an unqualified call. But i am getting the following abend that it already exists.

MESSAGE: INVALID DL/I STATUS CODE
SECTION: SECTION TRACE NOT IN USE
DATABASE: DTPOLDA
ACTION: ISRT
STATUS: II
SSA: TPOROOT (TPORKEY =IB099828649)
: EDDDDDE44EDDDDCE447CCFFFFFFFFF5
: 37696630D376925800E92099828649D
SSA: TPOPOLH
: EDDDDDC4
: 37676380
TEXT: SEGMENT TO BE INSERTED ALREADY EXISTS
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Aug 18, 2010 8:41 pm    Post subject:
Reply with quote

OK - we are making some progress. How do you build the NEW key for the child segment before you insert it? I will assume that it is some kind of date/time stamp.

Some things to think about - what if - when you try to get the root segment and you get a "GE" - not found - are you putting out an error report and going on to the next?

What are you going to do if the child segment already exists? You need to include coded routines for all unexpected status codes.
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Wed Aug 18, 2010 8:58 pm    Post subject:
Reply with quote

Sandy Zimmer wrote:
OK - we are making some progress. How do you build the NEW key for the child segment before you insert it? I will assume that it is some kind of date/time stamp.

Some things to think about - what if - when you try to get the root segment and you get a "GE" - not found - are you putting out an error report and going on to the next?

What are you going to do if the child segment already exists? You need to include coded routines for all unexpected status codes.


For ur first question if get GE as return code the program writes to error report and it terminates.

Since ISRT contains Qualified call for root segment and unqualified call for the child one its obvious that the other child segments too have same root key. What is the method now to insert it?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Wed Aug 18, 2010 9:06 pm    Post subject:
Reply with quote

Quote:
Since ISRT contains Qualified call for root segment and unqualified call for the child one its obvious that the other child segments too have same root key. What is the method now to insert it?


A child segment WILL NOT have the same key as the parent. I'm going to ask you to post the DBD. And, your SSAs have nothing to do with updating or inserting key fields - they are "segment search arguments".
The qualified SSA for the root tells IMS that you are positioning yourself at that root. The unqualified SSA for the child tells IMS that you are inserting that type of child segment. I won't confuse you by telling you that a parent can have many types of child segments.

You need to build the segment for the child - including the key. So, post your DBD (database definition) and the logic to build that segment.
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Thu Aug 19, 2010 7:53 pm    Post subject:
Reply with quote

Hi Sandy,

Thank u soo much... the program is working fine now... got many doubts clarified from ur posts... Thanks for the help...

Sandy is there any means to stop at the last record of the chind segment... how to find the last record while using a GNP call on child segment....

My requirement is I have a child segment with 10 occurences... I have to stop at the 10th occurence and copy the values...
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Aug 19, 2010 10:15 pm    Post subject:
Reply with quote

As I've said many times here - much to the dismay of others - I learned NOT to use GNP. I much prefer qualified SSAs all the way down to an unqualified SSA for the segment you are trying to read using GN. You know, of course, that there can be many different types of child segments on the same level for the same parent - right?

Let me understand this - you want the 10th child segment? How do you know that there will be 10? Or, do you want the LAST child segment?
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Fri Aug 20, 2010 3:18 pm    Post subject:
Reply with quote

Sandy Zimmer wrote:
As I've said many times here - much to the dismay of others - I learned NOT to use GNP. I much prefer qualified SSAs all the way down to an unqualified SSA for the segment you are trying to read using GN. You know, of course, that there can be many different types of child segments on the same level for the same parent - right?

Let me understand this - you want the 10th child segment? How do you know that there will be 10? Or, do you want the LAST child segment?


ok... ll try NOT to use GNP here on.... :-)

ya i want the last child segment....
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
Goto page 1, 2  Next
Page 1 of 2

 

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 Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am


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