Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Issues after online called from Batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Thu Jul 28, 2011 3:04 pm    Post subject: Issues after online called from Batch
Reply with quote

Hi,
The requirement is: An online program has to perform web service calls to get some data from external system. This is achieved by manually triggering the transaction in the online region. The requirement is to automate the process such as code a batch program to call online program with some parameters and schedule the batch program. To achieve this, a new batch and online programs have been developed. The call to online program is successful (the online program is triggered and able to debug through intertest). But the issue I am facing is, the COMMAREA which is passed from batch is not captured in online and EIBCALEN is 0 (which means no data received).
I am not sure what could be the issue? Please guide me.

The call to online from batch is as follows
Code:

LINKAGE SECTION.                                 
 01  DFHCOMMAREA.                                 
     05 WS-REG-NAME                 PIC X(2).     
     05 WS-MTH-END-DATE             PIC 9(6).     
     05 WS-RET-CODE                 PIC 9(2).     
     05  FILLER            PIC X(110).             

Procedure division.
EXEC CICS LINK PROGRAM(WS-PGM-NAME)           
               APPLID(WS-APPLID)               
               TRANSID(WS-TRANID)             
               COMMAREA(DFHCOMMAREA)           
               LENGTH(WS-COMMAREA-LTH)         
               RETCODE(EXCI-EXEC-RETURN-CODE) 
               SYNCONRETURN                   
END-EXEC.     


Online program linkage section:
Code:

 LINKAGE SECTION.                                             
/                                                             
 01  DFHCOMMAREA.                                               
     05  WS-REG-NAME           PIC X(02).                     
     05  WS-MNTH-END-DATE      PIC 9(06).                     
     05  WS-RET-CODE           PIC 9(02).                     
     05  FILLER                PIC X(110).                   
     EJECT                                                   
/                                                             
 01 SOAP-RESPONSE-BODY.                                       
    02 FILLER               PIC X OCCURS 1 TO 100000         
                                DEPENDING ON DOCUMENT-SIZE.   
                                                             
 01 AUI-RESPONSE-BODY.                                       
    02 FILLER               PIC X OCCURS 1 TO 100000         
                                DEPENDING ON AUI-DOC-SIZE.   


Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 28, 2011 4:12 pm    Post subject: Reply to: Issues after online called from Batch
Reply with quote

Have your CICS Sysprog or Tech Support personnel ensure that whatever the value of WS-TRANID is defined, that it points to program DFHMIRS in the PCT entry. Ensure this PCT entry uses transid CPMI as a template.

Just as a precaution, there's also a DATALENGTH keyword for EXCI/DPL and it must be the same value as the commarea-length.

To trace it, issue a CEDX "Your Transid Name" on the CICS (server side), then invoke the Batch JOB. A CEDX session will then be started.

HTH....

Bill
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Thu Jul 28, 2011 5:19 pm    Post subject:
Reply with quote

Thank you Bill.
I will check if the tranid is pointing to the transaction I am using and get back to you.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Jul 30, 2011 12:57 am    Post subject:
Reply with quote

http://cicswiki.org/cicswiki1/index.php?title=How_do_I_interact_with_a_transaction_from_a_batch_program%3F
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Jul 30, 2011 1:00 am    Post subject:
Reply with quote

how is WS-COMMAREA-LTH field defined in your batch program AND
did you move a value to it before the batch link is performed ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8196
Location: East Dubuque, Illinois, USA

PostPosted: Sat Jul 30, 2011 1:34 am    Post subject:
Reply with quote

If this is truly your batch program call to the online module, it is very wrong:
Code:
LINKAGE SECTION.                                 
 01  DFHCOMMAREA.                                 
     05 WS-REG-NAME                 PIC X(2).     
     05 WS-MTH-END-DATE             PIC 9(6).     
     05 WS-RET-CODE                 PIC 9(2).     
     05  FILLER            PIC X(110).             

Procedure division.
EXEC CICS LINK PROGRAM(WS-PGM-NAME)           
               APPLID(WS-APPLID)               
               TRANSID(WS-TRANID)             
               COMMAREA(DFHCOMMAREA)           
               LENGTH(WS-COMMAREA-LTH)         
               RETCODE(EXCI-EXEC-RETURN-CODE)
               SYNCONRETURN                   
END-EXEC.
1. You pass DFHCOMMAREA, yet you reference the length of WS-COMMAREA-LTH. There is no way to ensure that these values are synchronized.

2. DFHCOMMAREA is in the LINKAGE SECTION. You did not show us, nor indicate anywhere, how the lLINKAGE SECTION items in the batch program are given addressability. Remember, LINKAGE SECTION is used for variables that are defined (hence the storage for them is located) in another program. Unless another program is calling your batch program and your batch program has PROCEDURE DIVISION USING DFHCOMMAREA coded -- or you acquire storage (e.g., through LE) and set a pointer variable to address DFHCOMMAREA -- your code is guaranteed to fail.

3. The interface routines such as FEPI and EXCI are there for a purpose. In not using them, you vastly raise the chances that your programs will fail -- possibly spectacularly -- by a great deal.
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Fri Aug 26, 2011 12:11 pm    Post subject:
Reply with quote

@Bill,
It took sometime to check this and get back to you. After my program is made to point to DFHMRIS it started working fine and even I could debug the program with the help of CICS Support person.

Thank you.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CA Intertest Batch 555shanth CA Products 0 Tue Nov 28, 2017 11:10 am
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Format issues using XMITIP MSGDD ssdjp1 CLIST & REXX 5 Mon Oct 23, 2017 8:47 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us