hi,
I am trying to switch the transaction from the current application program to another program. For this I understand that i need to issue a CHNG call to set the destination an ISRT call to the destination and then a PURG call. My change call is abending with return code A1. This is how my call looks
MOVE 'ET100AU1' TO WL-ALT-MOD-NAME
MOVE 'ET100A' TO WL-ALT-LTERM-NAME
MOVE 'ET100A' TO WS-TRANS-CODE
CALL 'CBLTDLI' USING WS-DLI-CHNG
WL-ALT-PCB
WS-TRANS-CODE
END-CALL
WL-ALT-MOD-NAME is within the ALT-PCB and I am passing the destination programs's MFS-modname to this variable.
MOVE 'ET100A' TO WL-ALT-LTERM-NAME
here i am moving the transaction code of the destination.
(i tried moving the current lterm to the above variable but that also is abending).
please help me out with the correct syntax. The current syntax I am using, i got it from the IBM site.
just an additional information to whatever i have said above... I could see that the ALT-PCB which I am using is defined as EXPRESS=YES. Does this make any difference?
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
Here's a program to program switch in PL/!; almost the same as in cobol execpt for the LL-field. Check your code against this one. Did you send a message to the program to take control?
Thanks George,
The CHNG is to another transaction (that is another program). So do we need to make the ISRT call with the MID area for the new transaction? What does the variable PALTERN (in your example) contain? And what is the significance of PARMCT? Are these specific to PLI?
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
Insert the message to invoke the other program and supply it with information about what it is supposed to do. PALTERN is the alternate IO-PCB which is required in the CHNG-call.
Code:
********************************* Top of Data **************************
2 QATNAM CHAR(8), /* NAME DES ALTERNATE-PCB */
2 QATRES CHAR(2), /* RESERVED */
2 QATSTAT CHAR(2); /* STATUSCODE */
******************************** Bottom of Data ************************
A different way is to modify the trx in your spa but we're talking about a change-call now. Parmcount contains the number of parameters to the dli-call. Long ago I wrote cobol and also provided the count in the call.
Hello,
As per my knowledge whenever we want to invoke a new program we need to send the message to the respective Transaction queue. for this we need to configure any ALTRMPCB using the CHNG call and then ISRT the message as per the format required by the called program.
I think you are getting confused with the MOD name in the ISRT call. whenever we see some data on the screen that is first processed by the respective program and then it throws the data on the screen via MOD and that is after execution but you are trying to invoke a new program so you should send the message to the called program Transaction Queue. no need of any MOD name here, the only thing you need to take care is that you are passing the data via correct layout (i..e how MID sends the data to the called program).
Please let me know if I am wrong somewhere and the changes u made once execute the same successfully
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
Hi Amit,
If you'd read all posts you'd see we are beyond the MOD-thing. Glad though you confirm my previous post. Seems his message/CHNG problem has been solved and there's a new question about screencolours. This one will take some digging because I myself never did this; just highlight or not but I've seen some discussions somewhere so let's concentrate on that one
Hi George, Amit,
Yes CHNG call was succesfull and I am able to switch between the transactions. Now I am concerned about changing the colur for some fields on the display screen dynamically. Could you please help me out?
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
Found this function at our site (is for prot, highlite, clear etc). Not for colours but anyway, just another field
Code:
$ATTR:
PROC(F,A) REORDER;
DCL (F, /* MOD - FELD */
A) CHAR(*); /* ATTRIBUTES */
DCL CA CHAR(10) VAR,
1 AS BASED(AP),
2 A1 BIT(8),
2 A2 BIT(8),
AP PTR,
AM BIN FIXED(31) BASED(ADDR(AP)),
(SUBSTR,INDEX,ADDR,LENGTH) BUILTIN,
(I,
J) BIN FIXED(15);
%INCLUDE $CAPS;
AP = ADDR(F);
AM = AM - 2;
A2 = A2 | '10000000'B;
J = 1;
I = INDEX(SUBSTR(A,J),',');
DO WHILE(I > 0 | J < LENGTH(A));
IF I > 0 THEN
DO;
CA = SUBSTR(A,J,I - 1);
J = J + I;
END;
ELSE
DO;
CA = SUBSTR(A,J);
J = LENGTH(A);
END;