Mainframe Call Generator (MCG) Refresh - Micro Focus

Mainframe Call Generator (MCG) Refresh - Micro Focus Mainframe Call Generator (MCG) Refresh - Micro Focus

01.05.2013 Views

Mainframe Call Generator Refresh Termination of misbehaving MCG programs No restrictions are placed on the MCG RPC program logic and it is possible for a program to loop or enter a WAIT that will never be satisfied. In these cases, the end user only sees that the client is busy with a remote program call. Eventually, the client will be interrupted by a communications timeout and close the TCP/IP stream socket connection to the server. In previous implementations of the MCG RPC function (both Mainframe Access Version 2 and the original MFA Server Version 3), the socket close would not be recognized at the server. This is because the user program is in control of the task execution (either looping or waiting) and the server logic does not receive control to process communications events. In the new design, the user program execution in the MCGEXEC task is separated from the communications processing that now continues normally in the multi-threaded XDBMFADM task. MFA Server can respond to the client’s socket close and log the user off. The logoff cleanup processing for the user’s Mainframe Access session recognizes that a MCG subtask is still allocated to the user, and can force it down using the z/OS CALLRTM service to ABEND the subtask. The subtask is unconditionally ended with a User 201 ABEND code in this case. The end user can also force a program out using the “stop debugging” action before the expiration of the timeout period. The following excerpt from a test system shows a program starting at 14:40:53.2 hours. This test program enters an endless loop of processing and waiting. The MFE timeout value (a Windows environment variable) used in this test was set at 100 seconds and the socket connection was closed due to a communications error (a timeout) exactly 100 seconds later, at 14:42:33.2 hours. Message MFM0131E is issued during the cleanup processing to log the forced termination of the MCGEXEC task with a U201 ABEND. 14:40:53.2 MCGEXEC 20 TMCGTEST - Input test name is "LOOP " 14:42:33.2 XDBMFADM 19 MFM0112I SAF logoff for CSIRLW1 (sd=8 (13EDA970) rc=0 type=0) 14:42:33.3 XDBMFADM 19 MFADirect close for sd=8 (13EDA970) ip=10.10.1.7 sent=8 rcvd=9 14:42:33.3 XDBMFADM 19 MFM0131E Task MCGEXEC 13E99E28 TCB 008B7280 terminated U0201; callrtm rc=000 Many cases of incorrect MCG program execution can be recognized and cleaned up using this forced termination. However, there are no restrictions placed on the user program and a MCG program can possibly damage the server address space in such a way that simple task termination fails to provide adequate cleanup. For example, the program can overlay server control blocks and data areas, allocate excessive virtual storage without releasing it at the conclusion of processing, consume address space and/or system resources without releasing, etc. It is also possible for incorrect MCG program execution to cause the server address space to fail without warning. In all cases of program failure and recovery (that is what the forced termination actually is), it is advisable to shutdown and restart the server at the earliest convenient time. Confidential - 12 - December 2004 Randy Witek Micro Focus Development

Mainframe Call Generator Refresh New startup parameter FixPack 1a introduces one new startup parameter to select the DB2 attachment facility used for MCG DB2 SQL calls. Parameter Description MFA_MCG_DB2CONNECTION Example ... Confidential - 13 - December 2004 Randy Witek Micro Focus Development Controls which attachment facility is used by MFA Server for DB2 connections. Specify CAF to use the DB2 call attach facility. Specify RRSAF to use the DB2 Recoverable Resource Manager Services attachment facility. RRSAF is the default if this parameter is omitted. CGMQOTMA LOGDD=SYSOUT --- CG production log DDname or "SYSOUT" WEB_ROOT=HLQ.WEBROOT * *--------------------------------------------------------------------* * Mainframe Access services parameters * *--------------------------------------------------------------------* * MFA_ENDEVOR_HISTORY=YES --- Endevor MFALOGE history (YES,NO) MFA_LIBRARIAN_HISTORY=YES --- Librarian MFALOG history (YES,NO) MFA_LIBRARIAN_UPD_MODULE=AFOLIBR - Librarian batch update module name MFA_PANVALET_HISTORY=YES --- Panvalet MFALOG history (YES,NO) MFA_PANVALET_UPD_MODULE=PAN#1 --- Panvalet batch update module name MFA_SAF_HISTORY=YES --- Data set access MFALOG history MFA_SYSOUT_CLASS=A --- MFALOG,MFALOGE,SNAPDUMP class MFA_SYSOUT_DEST=LOCAL --- MFALOG,MFALOGE,SNAPDUMP dest MFA_MCG_DB2CONNECTION=CAF --- Select DB2 call attach facility * *--------------------------------------------------------------------* * Services to be activated * *--------------------------------------------------------------------* * TCP LINK FEATURE=YES --- MFE SQL Option, Telnet client MFADIRECT=YES --- Mainframe Access services ...

<strong>Mainframe</strong> <strong>Call</strong> <strong>Generator</strong> <strong>Refresh</strong><br />

Termination of misbehaving <strong>MCG</strong> programs<br />

No restrictions are placed on the <strong>MCG</strong> RPC program logic and it is possible for a program to loop<br />

or enter a WAIT that will never be satisfied. In these cases, the end user only sees that the client<br />

is busy with a remote program call. Eventually, the client will be interrupted by a communications<br />

timeout and close the TCP/IP stream socket connection to the server.<br />

In previous implementations of the <strong>MCG</strong> RPC function (both <strong>Mainframe</strong> Access Version 2 and the<br />

original MFA Server Version 3), the socket close would not be recognized at the server. This is<br />

because the user program is in control of the task execution (either looping or waiting) and the<br />

server logic does not receive control to process communications events.<br />

In the new design, the user program execution in the <strong>MCG</strong>EXEC task is separated from the<br />

communications processing that now continues normally in the multi-threaded XDBMFADM task.<br />

MFA Server can respond to the client’s socket close and log the user off. The logoff cleanup<br />

processing for the user’s <strong>Mainframe</strong> Access session recognizes that a <strong>MCG</strong> subtask is still<br />

allocated to the user, and can force it down using the z/OS CALLRTM service to ABEND the<br />

subtask. The subtask is unconditionally ended with a User 201 ABEND code in this case. The<br />

end user can also force a program out using the “stop debugging” action before the expiration of<br />

the timeout period.<br />

The following excerpt from a test system shows a program starting at 14:40:53.2 hours. This test<br />

program enters an endless loop of processing and waiting. The MFE timeout value (a Windows<br />

environment variable) used in this test was set at 100 seconds and the socket connection was<br />

closed due to a communications error (a timeout) exactly 100 seconds later, at 14:42:33.2 hours.<br />

Message MFM0131E is issued during the cleanup processing to log the forced termination of the<br />

<strong>MCG</strong>EXEC task with a U201 ABEND.<br />

14:40:53.2 <strong>MCG</strong>EXEC 20 T<strong>MCG</strong>TEST - Input test name is "LOOP "<br />

14:42:33.2 XDBMFADM 19 MFM0112I SAF logoff for CSIRLW1 (sd=8 (13EDA970) rc=0 type=0)<br />

14:42:33.3 XDBMFADM 19 MFADirect close for sd=8 (13EDA970) ip=10.10.1.7 sent=8 rcvd=9<br />

14:42:33.3 XDBMFADM 19 MFM0131E Task <strong>MCG</strong>EXEC 13E99E28 TCB 008B7280 terminated U0201;<br />

callrtm rc=000<br />

Many cases of incorrect <strong>MCG</strong> program execution can be recognized and cleaned up using this<br />

forced termination. However, there are no restrictions placed on the user program and a <strong>MCG</strong><br />

program can possibly damage the server address space in such a way that simple task<br />

termination fails to provide adequate cleanup. For example, the program can overlay server<br />

control blocks and data areas, allocate excessive virtual storage without releasing it at the<br />

conclusion of processing, consume address space and/or system resources without releasing,<br />

etc. It is also possible for incorrect <strong>MCG</strong> program execution to cause the server address space to<br />

fail without warning. In all cases of program failure and recovery (that is what the forced<br />

termination actually is), it is advisable to shutdown and restart the server at the earliest<br />

convenient time.<br />

Confidential - 12 - December 2004<br />

Randy Witek<br />

<strong>Micro</strong> <strong>Focus</strong> Development

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!