link in batch works, 2nd link fails both, parallel problem



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

link in batch works, 2nd link fails both, parallel problem

Postby Josh Stan » Tue Oct 19, 2010 1:09 am

Hello.

I am assigned a project that converts a COBOL batch job to CICS. I know that this is usually a bad idea, but the choice isn't mine. Our users don't want to wait until the next day to get their data.

I have a cics program that updates VSAM files, based on what is in a database for 'process-num' when it is called (process-num is a parameter in FUPLAN-COMMAREA and BARORDER-COMMAREA). The program works fine when it is called to update a plan file and when it is called to update an order file. The problem happens when it is called twice to update both plan and order files.

Batch program FUPLAN contains this code:
EXEC CICS LINK PROGRAM ('FUBAR1')                       
               TRANSID ('EXCI')                             
               COMMAREA(FUPLAN-COMMAREA)                     
               LENGTH  (LENGTH OF FUPLAN-COMMAREA)           
               RETCODE(EXCI-EXEC-RETURN-CODE)               
               SYNCONRETURN                                 
END-EXEC.                                                   
                                                           
IF EXEC-RESP NOT = 0                                       
   SET ABEND-ERROR          TO TRUE                         
   DISPLAY 'EXEC-RESP = 'EXEC-RESP' EXEC-RESP2 = 'EXEC-RESP2
   SET ADDRESS OF WS-ERROR-MSG                             
                            TO EXEC-MSG-PTR                 
   DISPLAY WS-ERROR-MSG                                     
END-IF                                                     


Batch program BARORDER has the same code. The difference between FUPLAN and BARORDER is the data they put in the DB.

The error I get varries somewhat, but the following is an example.
2010-10-18 11:37 05.74  FUBAR1 STARTING EXECUTION                             
    DATE 2010-10-18PROCESS # 05469     PROCESS STAT(    )                       
2010-10-18 11:37 05.81  FUBAR1  STARTING EXECUTION                             
    DATE 2010-10-18PROCESS # 05470     PROCESS STAT(    )                       
FUBAR1   EIBRESP = 00000022  EIBRESP2 =     00000014  ERROR WRITING FILE PLNFILE1   
FUBAR1    PLNFILE1 FETCHED          6  RECS          5  WROTE TO      PLNFILE1 
FUBAR1    2010-10-18 11:37 06.01  W  PLNFILE1 ERROR WRITING PLNFILE1             
                        FUBAR1  ABNORMAL EXECUTION                             
2010-10-18 11:37 06.03  FUBAR1  FINISHED EXECUTION                             
DFHAC2236 10/18/2010 11:37:06 LRTEST3 Transaction EXCI abend USER in program PLN
           resources will be backed out.                                       
FUBAR1   EIBRESP = 00000014  EIBRESP2 =     00000150  ERROR WRITING FILE ORDFILE1   
FUBAR1    ORDFILE1 FETCHED          6  RECS          1  WROTE TO      ORDFILE1 
FUBAR1    2010-10-18 11:37 06.13  W  ORDFILE1 ERROR WRITING FILE ORDFILE1         
                        FUBAR1  ABNORMAL EXECUTION                             
2010-10-18 11:37 06.16  FUBAR1  FINISHED EXECUTION                             
DFHAC2236 10/18/2010 11:37:06 LRTEST3 Transaction EXCI abend USER in program AIM
           resources will be backed out.                                       


Any pointers to the right direction will be greatly appreciated.
Josh Stan
 
Posts: 2
Joined: Tue Oct 19, 2010 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: link in batch works, 2nd link fails both, parallel problem

Postby Josh Stan » Tue Oct 19, 2010 3:00 am

Update: I didn't realize that temp storage queues are global. That was my first problem. FUPLAN would kick off an instance of FUBAR1 and write to the tsq then BARORDER would start an instance of FUBAR1 that would write to it. They then read from the queue and since the data got jumbled in the same queue, unpredictable errors occurred.

I now have a length error that seems to only occur when they are run together, but it is more isolated. I will dig into it some more before posting(only posting if I can't find the answer).

If you got this far, thanks for reading.
Josh Stan
 
Posts: 2
Joined: Tue Oct 19, 2010 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: link in batch works, 2nd link fails both, parallel problem

Postby dick scherrer » Tue Oct 19, 2010 3:18 am

Hello and welcome to the forum,

Thanks for the update - good luck with the rest :)

Someone will be here if there are "opportunities".

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post