Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Invoking MPP program from another MPP program
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
Sanjoy

New User


Joined: 19 Oct 2005
Posts: 19

PostPosted: Mon Sep 25, 2006 9:03 pm    Post subject: Invoking MPP program from another MPP program
Reply with quote

How one MPP pl1 program can invoke another MPP pl1 program?
Back to top
View user's profile Send private message

Bitneuker

CICS Moderator


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

PostPosted: Wed Oct 18, 2006 6:27 pm    Post subject:
Reply with quote

Program-to-program switch. Either use ALTPCB or change the transaction code in your SPA.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Wed Oct 18, 2006 7:47 pm    Post subject:
Reply with quote

Bitneuker wrote:
Program-to-program switch. Either use ALTPCB or change the transaction code in your SPA.


When using ALTPCB you also make a GHNG-call and insert a message for the callee.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Wed Oct 18, 2006 7:50 pm    Post subject:
Reply with quote

Example of change-call:

DCL ALT_TRX CHAR(8);

ALT_TRX = 'prog to change to';
PARMCT = 3;
CALL PLITDLI (PARMCT,'CHNG',PALTERN,ALT_TRX);
CALL PLITDLI (PARMCT,'ISRT',PALTERN,IOAREA);
Back to top
View user's profile Send private message
Sanjoy

New User


Joined: 19 Oct 2005
Posts: 19

PostPosted: Tue Oct 24, 2006 1:34 pm    Post subject:
Reply with quote

Thank you Bitneuker.

Can you please explian it ,I mean little bit more technical details?

Actually I get that CHNG command will change the Alternate PCB PALTERN and of transaction ALT_TRX.Am I right.
But in the ISRT call which IMS message do we need to put?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Tue Oct 24, 2006 3:01 pm    Post subject:
Reply with quote

Hi,

this is the complete piece. This message is sent to MPP-prog PBE22. PBE22 uses transaction NPBE22 which is started in the CHNG-call via the ALTPCB. The PBE22 will act on the content of the message (DATA).




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),
3 PFX CHAR(08),
3 CURSOR CHAR(04),
3 PAWO CHAR(08),
3 SYSSPA,
5 SPLITKZ CHAR(1),
5 SECOK CHAR(1),
5 MODUS CHAR(8),
5 PAGE# CHAR(3),
5 MASKE CHAR(5),
5 TCOK CHAR(1),
3 SPA CHAR(50),
3 FEHLER CHAR(79),
3 MASKE1 CHAR(05),
3 MASKE2 CHAR(05),
3 FMASKE CHAR(05),
3 FFUNKT CHAR(01),
3 DATA CHAR(1725);


MID_E0 = '';
DATA = 'blablabla info for PBE22';
LL = 294;
MASKE1 = 'QA';
FMASKE = 'PBE22';
SYSSPA.MASKE = 'QA';
FFUNKT = 'A';
TC = 'PBE22';

DCL ALT_TRX CHAR(8);

ALT_TRX = 'NPBE22';
PARMCT = 3;
CALL PLITDLI (PARMCT,'CHNG',PALTERN,ALT_TRX);
CALL PLITDLI (PARMCT,'ISRT',PALTERN,IOAREA);
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Tue Oct 24, 2006 3:43 pm    Post subject:
Reply with quote

Sorry for the typo-error. In the message TC is filled with 'NPBE22'. not with 'PBE22'. Thus IMS knows the message is for TRX NPBE22.
Back to top
View user's profile Send private message
Sanjoy

New User


Joined: 19 Oct 2005
Posts: 19

PostPosted: Thu Oct 26, 2006 2:38 pm    Post subject:
Reply with quote

Thnaks Bitneuker.

It's working.

But I have got one more question.

After 1st run of the 2nd program some how it is getting stopped. What may be the possible reasons?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Thu Oct 26, 2006 2:50 pm    Post subject:
Reply with quote

Sanjoy wrote:
Thnaks Bitneuker.

It's working.

But I have got one more question.

After 1st run of the 2nd program some how it is getting stopped. What may be the possible reasons?


I understand the following:

MPP-1 is started, executes the CHNG-call to MPP-2 and sends a message to MPP-2. MPP-2 is invoked and processes the messages. So far so good.

Question: what is MPP-2 supposed to do after the message send by MPP-1 is processed?
Back to top
View user's profile Send private message
Sanjoy

New User


Joined: 19 Oct 2005
Posts: 19

PostPosted: Thu Oct 26, 2006 3:03 pm    Post subject:
Reply with quote

No...Actually MPP2 is getting stopped after 1st run.

In Ims region it is showing

TRAN CLS ENQCT QCT LCT PLCT CP NP LP SEGSZ SEGNO PARLM RC
SN02 12 0 0 10 5 5 5 7 0 1000 4 0
PSBNAME: SN0200
STATUS: BAL( 2),STOP

So subsequent transaction of MMP1 can't invoke MPP2. My Qs is why MPP2 is getting stopped after 1st run?
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Thu Oct 26, 2006 3:25 pm    Post subject:
Reply with quote

Was this MPP-2 started meaning PGM and TRAN are up? Was the region stopped? Please check by typing subsequently:

/DIS REG A.
does the region in which the MPP-2 should run show? If not check SDSF whether the region abended. If it's not active submit the job from SDSF.

/DIS TRAN transactioncode
does is say STOPPED then type /STA TRAN transactioncode

/DIS PROG programname MPP-2
does it say STOPPED then type /STA PROG programname MPP-2
Back to top
View user's profile Send private message
Sanjoy

New User


Joined: 19 Oct 2005
Posts: 19

PostPosted: Thu Oct 26, 2006 6:27 pm    Post subject:
Reply with quote

Thanks Bitneuker.

Actually my problem is After 1st invokation of the MPP-2 it is getting stopped somehow. So rest of the invokation by MPP-1 is getting failed.

Now content of MPP2 is only a display.

Can you tell me when a transaction is stopped by IMS? Then I think i can get the problem.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Thu Oct 26, 2006 6:52 pm    Post subject:
Reply with quote

I assume you invoked MPP-1 with a transactioncode. So it starts running. After it completes the CHNG- and ISRT-call MPP-2 is started. What happens next. Normally MPP-2 reads the messagequeue to retrieve the message MPP-1 has sent. Did MPP-2 report the QC statuscode telling there are no more messages? I have no clue what this MPP-2 is supposed to do next. Please tell me what it does, or should do? Just telling it stopped somehow brings no light. We need the reason and therefore more information.

You tell me it shows a display which you must have found out by looking in the SDSF (A) showing the regionjob. There you should find if and for what reason MPP-2 was stopped.

If this kind of troubleshooting takes too long by posts I'd better send you my phonenumber in a PM (just did so). Please consider our working hours at Greenwich Time (here the time is 15.19 o'clock now).
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Thu Oct 26, 2006 7:17 pm    Post subject:
Reply with quote

A transaction may be stopped by IMS when a (programmed) failure is detected. The reason is shown in the regionjob which can be looked at via SDSF. Together with the transaction also the program is stopped. See prior post.
Back to top
View user's profile Send private message
Sanjoy

New User


Joined: 19 Oct 2005
Posts: 19

PostPosted: Thu Oct 26, 2006 7:20 pm    Post subject:
Reply with quote

Actually my intention is MPP1 should only invoke MPP2. No IMS mesage sending is required.
What I did in my 1st program:
MPP1 : Proc ($LTM,$PGM) Options(Main);
DCL LTM ptr;
%INCLUDE TPPCB; /* IMS I/O PCB MASK*/
Dcl WF CHAR(21000) BASED;

dcl 1 SqlCa,
%include SQLSTATE;

dcl $PGM ptr;
dcl PGM ptr;
PGM = $PGM;
dcl SN_TRAN char(8) init('');
DCL 1 IMS_MSG,
%INCLUDE XXXXXX;;

SN_TRAN = 'SN02';
Put skip list('calling PLITDLI for change ALP');
CALL PLITDLI(C3,'CHNG',PGM,SN_TRAN); /* Change Alternate PCB */
put skip list('status code from plitdli',substr(pgm->wf,11,2));
Put skip list('calling PLITDLI for change ALP');
CALL PLITDLI(C3,'ISRT',PGM,addr(Ims_msg)); /* Insert Message */
put skip list('status code from plitdli',substr(pgm->wf,11,2));


In the 2nd prog:

MPP2:Proc($ltm) options(main);

DCL LTM ptr;
%INCLUDE TPPCB; /* IMS I/O PCB MASK*/

Put skip list(XXXXXXXXXXXXXXXXXX);

End mpp2;

It seems there is some problem in the MPP2. Is it manditory to receive the message in MPP2? and also If i don't require to send any message what should be the format of the IMS-msg?

Thanks a lot for your help.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Thu Oct 26, 2006 7:29 pm    Post subject:
Reply with quote

Looks like you forgot the ALTPCB in proc (xx,yy) options main. One of our programs making CHNG-calls:

TPQAVER: PROC (QPIOTRM,QPALTERN,Q
QPNLVERT,QPNLBUEN,Q
QPNLZBNE,QPNLHIDB,Q
QPNLVVER)
OPTIONS(MAIN);

In the corresponding PSB we coded the iopcb is modifyable:

PCB TYPE=TP,MODIFY=YES

Adjust and try again icon_wink.gif
Back to top
View user's profile Send private message
Sanjoy

New User


Joined: 19 Oct 2005
Posts: 19

PostPosted: Thu Oct 26, 2006 7:34 pm    Post subject:
Reply with quote

Also In the Job I am only getting the display XXXXXXXXXXXXXXX

Nothing else
Back to top
View user's profile Send private message
Sanjoy

New User


Joined: 19 Oct 2005
Posts: 19

PostPosted: Thu Oct 26, 2006 7:39 pm    Post subject:
Reply with quote

Yes it is done with ALTPCB. See $PGM pointer in the code.

DO i need to mention it in MPP2 as well.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Thu Oct 26, 2006 7:40 pm    Post subject:
Reply with quote

When I look at MPP-2 it's all it does.......makes a display and ends just like you programmed. If you want MPP-2 to return control to MPP-1 again you should do in MPP-2 what you did in MPP-1: CHNG control to MPP-1.

Btw: a regulair MPP keeps reading messages to process and communicate with terminals. The way this thing looks it's like a subroutine. Don't see the advantage of this exept if you wanted a proof of concept. icon_confused.gif
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


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

PostPosted: Thu Oct 26, 2006 7:46 pm    Post subject:
Reply with quote

IMS-message:

DCL 1 IOAREA CHAR(xxx);
DCL 1 MID_E0 UNAL BASED(ADDR(IOAREA)),
3 LL BIN FIXED(31),
3 ZZ BIT(16),
3 TC CHAR(09),

3 your info for MPP2 CHAR(????),


MID_E0 = '';
your info for MPP2 = 'blablabla info for PBE22';
LL = ???;
TC = 'transaction';
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us