DFH$PCEX EXIT program



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

DFH$PCEX EXIT program

Postby Mehdi shri » Mon Aug 01, 2016 4:56 pm

Dear friend
I'm confusing about how to run and see the result of DFH$PCEX exit program. This is an CICS exit program that invoked at XPCFTCH point. I was add a line like :
WTO 'A program linking was accured'
to this program to display a message on console, evey time a program linking accured in CICS. (EXEC CICS LINK issued for example PROGRAM A called or linked PROGRAM B)
This is my code:
****************************************
R0       EQU   0                   NOT USED                            
R1       EQU   1                   INITIAL USER EXIT PARAMETER LIST    
R2       EQU   2                   USER EXIT PARAMETER LIST            
R3       EQU   3                   XPCFTCH GLOBAL WORK AREA ADDRESS    
R4       EQU   4                   NOT USED                        @P2C
R5       EQU   5                   NOT USED                            
R6       EQU   6                   NOT USED                            
R7       EQU   7                   NOT USED                            
R8       EQU   8                   NOT USED                            
R9       EQU   9                   NOT USED                            
R10      EQU   10                  NOT USED                            
R11      EQU   11                  NOT USED                            
R12      EQU   12                  PROGRAM BASE                        
R13      EQU   13                  SAVE AREA                            
R14      EQU   14                  RETURN ADDRESS                      
R15      EQU   15                  INITIAL PROGRAM BASE                
         EJECT                                                          
         DFHUEXIT TYPE=EP,ID=(XPCFTCH)                                  
         EJECT                                                     @L1A
         DFHAFCD TYPE=DSECT                                        @L1A
         EJECT                                                          
         COPY  DFH$PCGA            XPCFTCH GWA DSECT                    
         EJECT                                                          
DFH$PCEX CSECT                                                        
DFH$PCEX AMODE 31                                                      
DFH$PCEX RMODE ANY                                                    
         SAVE  (14,12)             SAVE REGS                          
         LR    R12,R15             SET-UP BASE REGISTER                
         USING MEXIT001,R12        ADDRESSABILITY                      
         LR    R2,R1               GET UEP PARAMETER LIST              
         USING DFHUEPAR,R2         ADDRESSABILITY                      
         SPACE                                                        
* Pick up the address of the Global Work Area (GWA) for this exit     *
         SPACE                                                        
         L     R3,UEPGAA           GET GWA ADDRESS                    
         USING DFH$PCGA,R3         ADDRESSABILITY                      
         SPACE                                                        
         DROP  R3        
********************************************
********************************************                                            
         WTO   'A program linking was accured'          
********************************************
********************************************            
         SPACE                                                        
RETURN   DS    0H                  RETURN TO THE CALLER                
         L     R13,UEPEPSA         ADDRESS OF EXIT SAVE AREA          
         RETURN (14,12),RC=UERCNORM    RESTORE REGS AND RETURN        
         SPACE                                                        
         LTORG                                                        
         SPACE                                                        
         END   DFH$PCEX

I know that is must be first ENABLEd but! WHERE is it must be done?
I don't know how to exploit these capability.
My final goal is doing some processing on specific application program and sub-program execution time but without any change on PROGRAM A or PROGRAM B sources.
Mehdi shri
 
Posts: 134
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 55 times
Been thanked: 0 time

Re: DFH$PCEX EXIT program

 

Re: DFH$PCEX EXIT program

Postby Robert Sample » Mon Aug 01, 2016 5:32 pm

First, posting the same topic in multiple places will NOT get you faster nor better answers. In fact, it annoys people and REDUCES the chances of you getting any response at all.

Second, if it is a CICS program, where do you define / enable other programs? Through RDO and the CEDA transaction, of course. Hence you should be looking at it. You'll probably need to have your site support group do this as few, if any, sites allow application programmers to make RDO changes. And IBM probably has the exit defined in a DFH$xxxx group entry so you'll need to find out which and get it installed.

Third, you have a REALLY BAD design. If the CICS region is really active, you could be flooding the console with tens of thousands (or more) messages every day. The operations group and site support group will NOT be happy if you do this. You should be using the appropriate TD queue to write to the CICS user message log instead of the console. And before you implement anything, you need to work with your site support group to minimize the impact.

Fourth, how does displaying a message about program linking help you with execution time? What are you expecting to get through the exit that you cannot get through the CICS STAT output?

Fifth, a terminology note -- you obviously did not proof-read your post as the word "accured" does not exist in English. You may have meant "accrued" (adding through an increment or growth) or you may have meant "occurred" (happened) -- it is not clear from your post which you meant.
Robert Sample
Global moderator
 
Posts: 3123
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 182 times

Re: DFH$PCEX EXIT program

Postby Mehdi shri » Mon Aug 01, 2016 7:36 pm

Dear Robert Sample
Thanks for your help and I'm sorry about mistake really.
Really this example is not my goal (to send WTO on console).
In fact I want to get an special program's COMMAREA (program name = CARDTRXN) to analyze the content of it.
Six transaction links to CARDTRXN and CARDTRXN calls any sub program for every transaction. I want to get statistics of these transactions in real time and show those for monitoring purpose (for our CICS monitoring system and it's operators).
It seems that I must capture the COMMAREA and get first 4 character (transaction ID) then store (or increase) a value every time the incoming transaction caused to sub program execution.
But first I must have a routine that check the program's name.Then if it is equal to CARDTRXN then COMMAREA must inspected to finding transaction ID.
Its may be another ways to act correctly, But I want to use an exit program. My master problem is :
How and Where I must enable and call or using this exit program without any change in source code (CARDTRXN)!!!?
Special thanks.
Mehdi shri
 
Posts: 134
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 55 times
Been thanked: 0 time

Re: DFH$PCEX EXIT program

Postby Robert Sample » Mon Aug 01, 2016 9:00 pm

IBM documentation provides the exact RDO definition to install DFH$PCEX. Once compiled with the RDO definition installed it should be invoked automatically.

What language is CARDTRAN written in? I ask because the XPCFTCH exit discussion in the manual mentions using it for Enterprise PL/I, PL/I, and assembler. COBOL may not work with the exit.
Robert Sample
Global moderator
 
Posts: 3123
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 182 times

Re: DFH$PCEX EXIT program

Postby Mehdi shri » Tue Aug 02, 2016 8:29 am

CARDTRAN written in COBOL. But I want to write an exit. I think that is no matter what is the language of CARDTRAN written in.
Is it possible to execute my exit program without any change in CARDTRXN source code to get it's COMMAREA?
Any other methods acceptable also. :) :(
Mehdi shri
 
Posts: 134
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 55 times
Been thanked: 0 time

Re: DFH$PCEX EXIT program

Postby Robert Sample » Tue Aug 02, 2016 8:53 am

Looking at https://www.ibm.com/support/knowledgecenter/SSGMGV_3.1.0/com.ibm.cics.ts31.doc/dfha3/dfha3e6.htm indicates that what you want to do can be done. However, considering the lack of CICS knowledge you've shown so far, I don't know that it is wise for you to write such an exit.
How and Where I must enable and call or using this exit program without any change in source code (CARDTRXN)!!!?
You talk to your site support group and get DFH$PCEX installed into the CICS region. You write and compile DFH$PCEX as an assembler program that is compiled into the CICS region steplib (I doubt the exit would go into the DFHRPL). You then listen to the screaming as the application developers discover that your exit is slowing down every transaction (more precisely, every program) being executed in the CICS region. If installing the RDO definition and compiling the code doesn't implement the exit, then you need to find the CICS Customization manual for your release of CICS and find out what you need to do to get the exit working. Sometimes system exits (CICS as well as others) need to be installed through SMP/E and sometimes they don't. When I installed ICHDEX01 on our system to update RACF, I didn't have to use SMP/E but merely compiled the assembler program into SYS1.LINKLIB.

And when you write your DFH$PCEX, you need to check the program name for CARDTRXN and exit immediately if not a match to minimize the impact on the system. The URL I provided indicates that this exit is invoked for CICS internal as well as application programs, so you want the exit to run as fast as possible. You will also have to handle the case of the passed data NOT having DFHCOMMAREA since initial transactions won't have one.
Robert Sample
Global moderator
 
Posts: 3123
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 182 times

Re: DFH$PCEX EXIT program

Postby enrico-sorichetti » Tue Aug 02, 2016 7:50 pm

You talk to your site support group


from a topic with the same subject from the same poster

Our Site Technical Support can't help me, also I'm one of they



time to lock both topics
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2519
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 120 times

Re: DFH$PCEX EXIT program

Postby Robert Sample » Tue Aug 02, 2016 8:27 pm

time to lock both topics
Agreed -- we're starting to go around in circles.
Robert Sample
Global moderator
 
Posts: 3123
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 182 times


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post