IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Problems with CHNG call when switching programs


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nithusi

New User


Joined: 12 Apr 2006
Posts: 30

PostPosted: Thu Feb 08, 2007 5:53 pm
Reply with quote

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.

Thanks,
Nithya.
Back to top
View user's profile Send private message
nithusi

New User


Joined: 12 Apr 2006
Posts: 30

PostPosted: Thu Feb 08, 2007 5:58 pm
Reply with quote

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?

Thanks,
Nithya.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Feb 12, 2007 12:55 am
Reply with quote

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?

Code:
DCL 1 IOAREA CHAR(1924);             
DCL 1 MID_E0 UNAL BASED(ADDR(IOAREA))
      3 LL          BIN FIXED(31),   
      3 ZZ          BIT(16),         
      3 TC          CHAR(09),       
     
LL       = 294;           
TC       = 'NPBE22';                 
DCL ALT_TRX CHAR(8);           
ALT_TRX = 'NPBE22';                             
PARMCT  = 3;                                     
CALL  PLITDLI (PARMCT,'CHNG',PALTERN,ALT_TRX);   
CALL  PLITDLI (PARMCT,'ISRT',PALTERN,IOAREA);   


Are you making this change call for a printer? Check this
Back to top
View user's profile Send private message
nithusi

New User


Joined: 12 Apr 2006
Posts: 30

PostPosted: Mon Feb 12, 2007 8:22 pm
Reply with quote

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?

Thanks & Regards,
Nithya Iyer.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Mon Feb 12, 2007 9:02 pm
Reply with quote

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.

Information about your status code A1:
here

Sorry can't stay with you further today, I'm in a rush. More tomorrow.
Back to top
View user's profile Send private message
nithusi

New User


Joined: 12 Apr 2006
Posts: 30

PostPosted: Thu Feb 15, 2007 9:25 pm
Reply with quote

Thanks a lot George. I was not able to acces the site for a couple of days. Thanks for the information.

Can you please tell me how do we change the display colour for a particular screen field dynamically through the program?

Thanks
Nithya Iyer.
Back to top
View user's profile Send private message
amitchaudhary
Warnings : 1

New User


Joined: 13 May 2005
Posts: 8

PostPosted: Thu Feb 15, 2007 10:37 pm
Reply with quote

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
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Feb 15, 2007 11:35 pm
Reply with quote

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 icon_wink.gif
Back to top
View user's profile Send private message
nithusi

New User


Joined: 12 Apr 2006
Posts: 30

PostPosted: Fri Feb 16, 2007 8:29 pm
Reply with quote

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?

Thanks
nithusi.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Sat Feb 17, 2007 1:04 am
Reply with quote

Hm............ this item has been passed before. Seems difficult to me bt I will look into it. Reply you later on.
Back to top
View user's profile Send private message
amitchaudhary
Warnings : 1

New User


Joined: 13 May 2005
Posts: 8

PostPosted: Wed Feb 21, 2007 5:13 pm
Reply with quote

Hello All,
Regarding chainging the colours in DC screens from the program you can use the Extended Field Attributes
for more information check the link
publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.ims9.doc.aptm/p2hopmf.htm

section "Dynamic Modification of Extended Field Attributes "
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Feb 21, 2007 6:06 pm
Reply with quote

Right Amit: knew I've seen it before. Btw, I send you a PM.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Wed Feb 21, 2007 6:39 pm
Reply with quote

Found this function at our site (is for prot, highlite, clear etc). Not for colours but anyway, just another field icon_wink.gif
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;                                                     
                                                                   
                                                                   
        SELECT($CAPS(CA));                                         
           WHEN('CLR','CLEAR')                                     
              DO;                                                   
                 A1 = '00000000'B;                                 
                 A2 = '10000000'B;                                 
              END;                                                 
           WHEN('NULL')                                             
              DO;                                                   
                 A1 = '00000000'B;                                 
                 A2 = '00000000'B;                                 
              END;                                                 
           WHEN('C','CU','CUR','CURS','CURSO','CURSOR')             
              A1 = A1 | '11000000'B;                               
           WHEN('+C','+CU','+CUR','+CURS','+CURSO','+CURSOR')       
              A1 = A1 & '00111111'B;                               
           WHEN('P','PR','PRO','PROT')                             
              A2 = A2 | '00100000'B;                               
           WHEN('+P','+PR','+PRO','+PROT')                           
              A2 = A2 & '11011111'B;                                 
           WHEN('NU','NUM')                                           
              A2 = A2 | '00010000'B;                                 
           WHEN('+NU','+NUM')                                         
              A2 = A2 & '11101111'B;                                 
           WHEN('H','HI','HIG','HIGH')                               
              A2 = A2 | '00001000'B;                                 
           WHEN('+H','+HI','+HIG','+HIGH')                           
              A2 = A2 & '11110111'B;                                 
           WHEN('ND','NDIS','NDISP','NODISP','DARK')                 
              A2 = A2 | '00000100'B;                                 
           WHEN('+ND','+NDIS','+NDISP','+NODISP','+DARK')             
              A2 = A2 & '11111011'B;                                 
           WHEN('M','MO','MOD')                                       
              A2 = A2 | '00000001'B;                                 
           WHEN('+M','+MO','+MOD')                                   
              A2 = A2 & '11111110'B;                                 
           WHEN('S','SK','SKI','SKIP')                               
              A2 = A2 | '00110000'B;                                 
           WHEN('+S','+SK','+SKI','+SKIP')                           
              A2 = A2 & '11001111'B;                                 
           WHEN('R','RE','REP','REPL')                               
              A2 = A2 | '01000000'B;                                 
           WHEN('+R','+RE','+REP','+REPL')                           
              A2 = A2 & '10111111'B;                                 
           WHEN('NP','NPR','NPRO','NPROT') DO;                       
              A2 = A2 & '11011111'B;                                 
              A2 = A2 & '10111111'B;                             
           WHEN('NP','NPR','NPRO','NPROT') DO;                   
              A2 = A2 & '11011111'B;                             
              A2 = A2 | '01000001'B;                             
           END;                                                   
           WHEN('NORM')                                           
              A2 = A2 & '11110111'B;                             
           OTHER;                                                 
        END;                                                     
        I = INDEX(SUBSTR(A,J),',');                               
     END;                                                         
                                                                 
END $ATTR;                                                       
Back to top
View user's profile Send private message
nithusi

New User


Joined: 12 Apr 2006
Posts: 30

PostPosted: Thu Feb 22, 2007 8:21 pm
Reply with quote

Thanks Amit/George,
I will work on this and get back in case of any further doubts.

Thanks & Regards
Nithya.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts Call an hlasm from REXX in batch and ... CLIST & REXX 4
No new posts C++ problems Java & MQSeries 3
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top