View previous topic :: View next topic
|
Author |
Message |
picus_mf Warnings : 1 New User
Joined: 09 Jun 2006 Posts: 52
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
picus_mf Warnings : 1 New User
Joined: 09 Jun 2006 Posts: 52
|
|
|
|
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 |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
picus_mf Warnings : 1 New User
Joined: 09 Jun 2006 Posts: 52
|
|
|
|
@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 |
|
|
|