To explain how to run the MFC CICS tracing to help debug SQL, DCDB2 or Transaction Router (TRS) problems.
MFC DB2/UDB for CICS is a Remote Procedure that used to process dynamic SQL Statements (Language Events), Remote Stored Procedures (RSP) and Remote Procedure Calls (RPC),
that are called from a client application, These calls can come directly from a Client to the mainframe (Gatewayless) or via a DirectConnect Gateway (DCDB2) or a TRS.
When the tracing is turned on it will trap all the request that passes through the MFC Language Handler Program (AMD2CICS).
This tracing is written to a CICS Temporary Storage Queue (TSQ) with the ID of "CE"+1st 6 bytes of the user ID that is connecting.
The trace can be used by the customer to see their queries, but its design for support and development to see what is going on.
The first line of the trace shows the version of MFC DB2/UDB running, then you see trace points in the code
00001 termid= , Program=AMD2CICS, /15.0 SP06/P-P21106/IBM Z/03
00002 MUT ,InitConfig: CfgRpcOpt: LANG , RpcOption: L
00003 MUT ,InitConfig: parsexit_sw: N
00004 MUT ,rtgetopt: tdgetopt rc: 0
00005 MUT ,rtgetopt: tdgetusr rc: 0
00006 MUT ,rtgetopt: parsexit:
Step for start tracing:
From a CICS 3270 Screen you will need to run transaction AMCF.
This is the default transaction name, you may have changed the default to something else?
In that case, you would need to see what transaction is tied to Program AMD2CFG and use that one.
As you see from above screen print, put your cursor over the Transaction ID and Press Enter.
Below: then set “Tracing” to YES. tracing will be turned on for any requests that are sent to AMD2CICS, via Transaction AMD2
Press F3/PF3 to exit.
All tracing will be written out to a CICS Temporary Storage Queue with the name of “CE”+ “ First 6 Bytes of the User ID, that was used to connect to the Mainframe”.
Running CEMT Inquire(I) TSQ to view the temp Storage Queues.
Place a B next to the Temp Storage Queue (TSQ) to browse it.
Here is what you see when you Browse the file when using CEBR,
You can use this method if you are looking for a Specific Query or issue.
If you need to get the trace (TSQ) to SAP Support, you can use your own method or you can use
the RSP(RSPTSQ) that was written to download a TSQ for a specific user ID (CE+1st 6 bytes of UserID).
Use the USE Procedure RSPTSQ (CE#1st6bytesUserId) statement from any client connected to the mainframe or DC.
Or you can run this via ISQL using an input file containing the Use procedure statement listed above.
ISQL -S"Servername" -U"MFCUserID" -P"MFPSWD" -i Path to RunRSPTSQ.txt -o Output File path an name -w 130
If you require RSPTSQ please see KBA 2845297 - Steps for using MainframeConnect(MFC) DB2/UDB Option for CICS Tracing.
for the RSPTSQ XMT file.