Page 1 of 1

HANDLE CONDITION QIDERR (Abend AICA)

PostPosted: Tue Mar 26, 2013 10:21 pm
by nikki lauda
Hi everybody,

First of all excuse me for my english.

My problem is very simple to explain:
in my program PROGA i want to delete a TS queue before writing into it.

When i do like this:


...

EXEC CICS HANDLE CONDITION QIDERR(label1)           
          END-EXEC.                                 
                                                   
EXEC CICS DELETEQ TS QUEUE(TS-QUEUE) NOHANDLE     
          END-EXEC.   

EXEC CICS WRITEQ TS QUEUE(TS-QUEUE) FROM(TS3-ENR)     
          NOHANDLE AUXILIARY LENGTH(TS-LENGTH)         
          END-EXEC.                                         

labe1.                                             
    move 'err' to ws-erreur
    go to label2.                                 
F-labe1.                                           
    EXIT.         

...                                 


Everything is working perfectly and when i go to the CEBR screen i found my TS queue.
This work very well because in the deleteq statement i specify NOHANDLE so the program delete de
TS queue if it exists and if it doesn't exist it will genrerate an QIDERR which has no effect since we specify
that we don't want to handle an error from this statement (which key word NOHANDLE)

But...When i want to handle the fact that the TS queue doen't exit (with the qiderr) like this:

EXEC CICS HANDLE CONDITION QIDERR(label1)           
          END-EXEC.                                 

EXEC CICS DELETEQ TS QUEUE(TS-QUEUE)     
          END-EXEC.   


I remove the nohandle option from the DELETQ statement
My program doesn't go to the label1 and the program loop with the DELETEQ statement until the system bring an abend AICA.


My question is why the handle of the qiderr doesn't work and doesn't go to the label "label1" statement.


Thanks in advance...

Re: HANDLE CONDITION QIDERR (Abend AICA)

PostPosted: Tue Mar 26, 2013 11:08 pm
by Robert Sample
People are still coding without using RESP in their CICS programs?

Re: HANDLE CONDITION QIDERR (Abend AICA)

PostPosted: Wed Mar 27, 2013 12:53 am
by nikki lauda
Robert Sample wrote:People are still coding without using RESP in their CICS programs?

Hello,

Excuse me Robert but i don't understand your response... can you explain please?

Thanks.

Re: HANDLE CONDITION QIDERR (Abend AICA)

PostPosted: Wed Mar 27, 2013 1:13 am
by Robert Sample
HANDLE CONDITION / IGNORE CONDITION / HANDLE ABEND are all extremely old CICS commands; use of the RESP option has been recommended by IBM for many years. The old commands perform implied GO TO statements within the language being used while RESP conditions can be checked immediately after the CICS command execution so no GO TO logic is used. There have been some APARs issued for problems between Language Environment and HANDLE CONDITION (etc) commands; since modern compilers are all LE-compliant, that provides another reason to stay away from HANDLE CONDITION and the others.

My recommendation would be to convert your code to use RESP if at all possible. CICS commands using RESP disable HANDLE CONDITION / IGNORE CONDITION / HANBLE ABEND so they won't be in effect if RESP is used - which gives you a clue as to which IBM thinks you should use.

In particular, an AICA generally means a loop in the code. Using HANDLE CONDITION forces a GO TO which raises the chances of a loop; RESP can be handled with EVALUATE or IF in COBOL -- no GO TO needed.

Re: HANDLE CONDITION QIDERR (Abend AICA)

PostPosted: Wed Mar 27, 2013 3:57 pm
by nikki lauda
Thank you very much for your answer Roberts...

Using the RESP option works perfectly.

Re: HANDLE CONDITION QIDERR (Abend AICA)

PostPosted: Wed Mar 27, 2013 4:11 pm
by Robert Sample
Glad to hear that! Thanks for letting us know.