Page 1 of 1

Pesudo conversation logic

PostPosted: Thu Aug 02, 2012 10:20 am
by kandrepavan
Hi all,

PLease can any one say what is the error in this code.
When the Transcation is initiated the Map is thrown on to the screen and then later it is always entering to
Return TRansid() commarea( ) command.
The Code is:

01 WS-COMMAREA.
05 WS-I-CH PIC 9(1).
88 C01-CH-PENQ VALUE 1.
88 C02-CH-POAPPLY VALUE 2.
88 C03-CH-PEDIT VALUE 3.
88 C04-CH-PCANCEL VALUE 4.

LINKAGE SECTION.
01 DFHCOMMAREA.
05 LS-CHOICE PIC 9(1).

***************************************************************
* PSEDUO CONVERSATION LOGIC.
PROCEDURE DIVISION.
*
0000-MAIN-PARA.

EVALUATE TRUE

WHEN EIBCALEN = 00
MOVE LOW-VALUES TO PHOMEMPO
MOVE -1 TO HACTL
SET WS-A-HOME-C TO TRUE ----------------- in the mapsend-para i ma evaluating which map need to be send
PERFORM 2000-MAPSEND-PARA
THRU 2000-MAPSEND-PARA-EXIT
MOVE 1 TO WS-I-CH

WHEN WS-COMMAREA= 1
PERFORM 3000-RECEIVE-PARA
THRU 3000-RECEIVE-PARA-EXIT

END-EVALUATE.

EXEC CICS
RETURN TRANSID('TAA3') COMMAREA(WS-COMMAREA)
END-EXEC.


0000-MAIN-PARA-EXIT. EXIT.


2000-mapsend-para.
2000-mapsend-para-exit.
3000-receive-para.
3000-receive-para-exit.
The control is not at all gng to Receive para

Thanx and regards
pavan

Re: Pesudo conversation logic

PostPosted: Thu Aug 02, 2012 10:48 am
by kandrepavan
WHEN WS-COMMAREA= 1

Here i tried with
WHEN EIBCALEN = 1 then also same problem

Re: Pesudo conversation logic

PostPosted: Thu Aug 02, 2012 11:41 am
by NicC
You do not 'throw' maps onto screens - one or other may break. You send the map to the screen or the screen displays the map. You only throw things in curly-whirly languages like java and c++. Also, when posting code, use the code tags to make it align and read-able.

Now, what was the value in WS-COMMAREA when you displayed it?

Re: Pesudo conversation logic

PostPosted: Thu Aug 02, 2012 12:44 pm
by mongan
I assume that the first use of the program is also from the same transaction, or is it triggered from XCTL?

The first use of your program will have an EIBCALEN of 0, WS will not be populated.
The second use of your programm will have an EIBCALEN of 1, WS will not be populated (it has random characters in it unless you initialize it or move something to it), LS-CHOICE in the DFHCOMMAREA should have the value of 1.

Re: Pesudo conversation logic

PostPosted: Thu Aug 02, 2012 3:27 pm
by Monitor
Pls post the whole code using code-tags and we will be able to tell you whats wrong with your logic.

Re: Pesudo conversation logic

PostPosted: Thu Aug 02, 2012 3:39 pm
by Monitor
You are testing
WHEN WS-COMMAREA= 1

which is a dataelement in your Working-Storage.
You should test the value in the DFHCOMMAREa like this:
When LS-CHOICE = 1

You have prepared for 88´s in the Ws. Copy those to the commarea like this:
01 DFHCOMMAREA.
   05 LS-I-CH PIC 9(1).
      88 C01-CH-PENQ VALUE 1.
      88 C02-CH-POAPPLY VALUE 2.
      88 C03-CH-PEDIT VALUE 3.
      88 C04-CH-PCANCEL VALUE 4.

The you can say:
When C01-CH-PENQ

Pls note that you have to take care of the naming-problem that now will appear, becasue the 88´are not unique.
In the future, post your code using the code-tags.