ABend AC- need solution......



IBM's hierarchical database management system with a Database Manager (IMS DB) and a Transaction Manager(IMS DC)

Re: ABend AC- need solution......

Postby enrico-sorichetti » Sun Nov 13, 2011 9:16 pm

help people willing to help You...
if You had lurked a bit thru the forums You would have noticed how for source code we suggest the use of the code tags
to preserve the MF formatting and to make in thios way things more readable for the people willing to help

here is a snippet of Your posted code with the code tags

12345678901234567890123456789012345678901234567890123456789012345678901234567890
         DBD   NAME=IMMMBRDB,ACCESS=(HIDAM,OSAM)
         DATASET DD1=IMMMBRDB,SIZE=(4160),SCAN=5,FRSPC=(50,7)
         DATASET DD1=IMMMBRD2,SIZE=(4160),SCAN=5,FRSPC=(50,7)
         DATASET
         SEGM  NAME=MMCERT,BYTES=80,PTR=(TB),                          X
               PARENT=0,RULES=(PVV),COMPRTN=(DPIEXIT,DATA,INIT)
         FIELD NAME=(MMCERTNO,SEQ,U),BYTES=9,START=1,TYPE=C
         LCHILD NAME=(MMINDEX,IMMMBRNX),PTR=INDX
         SEGM  NAME=MMCONT,BYTES=320,PTR=(T,LTB),                      X
               PARENT=((MMCERT),(GSGROUP,P,IMMGPSDB)),                 X
               RULES=(VLV)
         FIELD NAME=(MMGRUPNO,SEQ,U),BYTES=6,START=1,TYPE=C
         FIELD NAME=MMSD65DT,BYTES=4,START=43,TYPE=C
         DATASET
         SEGM  NAME=MMMEMBR,BYTES=200,PTR=(T),                         X
               PARENT=MMCONT,RULES=(LLL),                              X
               COMPRTN=(DPIEXIT,DATA,INIT)
         FIELD NAME=(MMMEMBCD,SEQ,U),BYTES=2,START=1,TYPE=C
         FIELD NAME=MMNAME,BYTES=7,START=3,TYPE=C
         FIELD NAME=MMBIRDT,BYTES=5,START=16,TYPE=C
         FIELD NAME=MMMEFFDT,BYTES=4,START=21,TYPE=C
         FIELD NAME=MMHIBNBR,BYTES=12,START=103,TYPE=C
         SEGM  NAME=MMLTNAM,BYTES=16,PTR=(T),                          X
               PARENT=MMMEMBR,RULES=(LLL,LAST)
         FIELD NAME=MMLASTNA,BYTES=16,START=1,TYPE=C
         SEGM  NAME=MMCANCL,BYTES=16,PTR=(T),                          X
               PARENT=MMMEMBR,RULES=(LLL,LAST)
         FIELD NAME=MMCANEFF,BYTES=4,START=1,TYPE=C

skipped the rest because I got bored


why complain that You got the 'PROBLEM WHILE REACHING MMCERT SEGMENT' message...
Your cobol code issued that not IMS ... so we have nothing to suggest about it...
and about the AC code, what happened when You looked/searched/read about it in the IMS manuals

also asking people willing to answer to go thru more than 300 lines of code is a bit too much

a forum search might also give some insight on how to proceed...
but as i said the first source of info is always the manual
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: ABend AC- need solution......

Postby thirujmca » Mon Nov 14, 2011 1:32 am

Hi Enrico,

Thanks for the reply. i will follow steps in future.
I went through the manual to fond out the reason for AC. I got the below things.

1) DL/I could not find a segment in the DB PCB specified in the call that has the segment name given in the SSA. 2) The segment name is in the DB PCB, but the SSA specifying that segment name is not in its correct hierarchic sequence. 3) The call specifies two SSAs for the same hierarchic level.

My scenario is simple.I have 3 segments in hierarchical order. Say,

MMCERT - Key is CERT_NO
MMCONT - Key is CONTCD
MMMEMBR -Key is MEMBER_CD
MMLTNAM

I want to fecth each and every CERT_NO from MMCERT segment,CONTCD for each CERT,MEMBER_CD for each CONTCD and Last name for each MEMBER_CD.

So i used GN call with unqualified SSA in each segment. I was able to fetch first CERT_NO from MMCERT segment and i am continuing this process until end of MMCERT segment using one PERFORM.

Then i used another GN call with unqualified SSA under the MMCERT PERFORM to fetch the first CONTCD from the MMCONT segment for each CERT_NO. The first record was fetched successfully. i am continuing this process until end of MMCONT segment using one PERFORM.

Then i used another GN call with unqualified SSA under the MMCONT PERFORM to fetch the MEMBER_CD from MMMEMBR segment.first record was fetched successfully but i was not able to fetch the second record. but i have 2 records in MMMEMBR segment for the particulat CONT_CD.

The last segment SSA was automatically erased once done the first execution. Hence i am getting this AC return code. I was not aware why the SSA is automatically erased.I knew that erasing SSA is also one of the problem to get the return code AC. But my question is why it is erasing.. Am i doing anything wrong here? Can i go with this logic? Am i coding anything wrong in the coding part?

Do i need to add any more code here?

Please help me to resolve this issue. Please refer my coding which has been posted above already..

Thanks,
Thiru
thirujmca
 
Posts: 2
Joined: Thu Jun 25, 2009 4:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ABend AC- need solution......

Postby Ed Goodman » Wed May 30, 2012 2:42 pm

Nothing in IMS will intentionally erase the SSA.

I notice that your SSAs are defines in the COBOL program immediately after segment fields. My guess is that you are reading more data than the WS field can handle. You may be doing a path call, but specifying the single segment in the receiving field.

Make DOUBLE sure that your copybook lengths match up with the segment lengths. IMS will always return the amount of data specified in the DBD. So if you put a 100-byte copybook as the receiving field, but read a 200 byte segment, your COBOL working storage will get 100 bytes overlaid.

I've done this to myself a few times!
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: ABend AC- need solution......

Postby Ed Goodman » Thu May 31, 2012 2:09 am

So... you bumped this thread without adding anything to it???

Did you check the length of the copybooks against the segment lengths in the DBD? Specifically MMMEMBRC.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: ABend AC- need solution......

Postby Monitor » Thu May 31, 2012 9:51 am

What about a Display of your SSA before the call?
The Call Analyzer (A-part of the status-code) doesnt like your SSA.
Monitor
 
Posts: 98
Joined: Wed Jan 18, 2012 8:59 pm
Has thanked: 0 time
Been thanked: 7 times

Re: ABend AC- need solution......

Postby Ed Goodman » Mon Jun 18, 2012 7:41 pm

They did display it I think, they mentioned that it "got automatically erased."


Last bumped by thirujmca on Mon Jun 18, 2012 7:41 pm.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times


Return to IMS DB/DC

 


  • Related topics
    Replies
    Views
    Last post