View previous topic :: View next topic
|
Author |
Message |
anandsabapathi
New User
Joined: 19 Nov 2021 Posts: 1 Location: USA
|
|
|
|
Im trying to start a transaction that invokes Application Program to receive information from Commarea and process the data.
I use below command on TERM (CLEAR).
Code: |
CECI START TRAN(YD**) FROM('TEST DATA ') LENGTH(10)
|
Command becomes successful. But when I see the output (I use display statements to see what happens) it goes into EIBCALEN=0 part.
Code: |
LINKAGE SECTION.
*01 DFHCOMMAREA PIC X(16).
01 DFHCOMMAREA.
05 CA-MQ-AREA PIC X(16).
05 CA-BATCH-AREA REDEFINES CA-MQ-AREA.
10 CAB-HEADER PIC X(05) VALUE 'BATCH'.
88 CA-BATCH VALUE 'BATCH'.
10 CAB-TIMESTAMP PIC X(26).
10 CAB-MASTER PIC X(10).
10 CAB-MSG-TY PIC X(10).
PROCEDURE DIVISION USING DFHCOMMAREA.
MAIN-PARA.
PERFORM 0000-INITIAL-TASKS
THRU 0000-EXIT
...
...
0000-INITIAL-TASKS.
SET NOT-ENQUED
,SW-SUCCESS
,SW-MORE-JCL
,SW-RUN
,SW-NEXT-MSG
,SW-PROCEED TO TRUE
MOVE SPACES TO WS-LEAVE-PARM-VALUE
* VALIDATE INVOKE METHOD
IF EIBCALEN = ZERO
MOVE 'DFHCOMMAREA MISSING, CONTACT SYSTEMS'
TO WS-ERROR-MESSAGE
DISPLAY WS-ERROR-MESSAGE
ELSE
DISPLAY THIS-PROGRAM ' RECEIVED MESSAGE IN COMMAREA'
|
OUTPUT:
Code: |
YD** 20211118110855 DFHCOMMAREA MISSING, CONTACT SYSTEMS |
I want my application program to go into the ELSE Part to receive the commarea info and process it. Please advise if Im missing something here.
Note: Same Application program is tied up to other transaction which always LINKs this program using Comm Area. it gets triggered from MQ. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The code is behaving correctly; it is your understanding that is incorrect. If you want to see your data, you will need to do
to retrieve the terminal data. If you want to use COMMAREA, you have to use a START with COMMAREA specified -- which your code does not do. Your 'TEST DATA' is NOT part of any COMMAREA. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Or you can do the right way by putting a message in mq and let it run systemstically. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
I don't know how CECI would handle this, but you could code
Code: |
CECI RETURN TRANSID('YD**') COMMAREA('TEST COMM ') LENGTH(10) |
if you wanted to test your COMMAREA processing. Note that START will not allow you to put a COMMAREA on it. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
I tested CECI and discovered that the RETURN TRANSID .... generates an INVREQ error with RESP2 value of 2
Quote: |
2
A RETURN command with the CHANNEL, COMMAREA, or IMMEDIATE option is issued by a program that is not at the highest logical level. |
so you cannot pass a COMMAREA using CECI. |
|
Back to top |
|
|
|