Usually, if you are working on a mainframe issue (DB2 or CICS or MQ or any mainframe stuff), and if you are dealing with a 3rd party vendor, they would ask the maintenance level or patch level or PUT level or RSU level of your system or product. How do you find the RSU/PUT level?
If you install your products through SMP/E, this is how you find this information.
Go to SMP/E panel, and enter SMCSI dataset (global zone data set) and select option 3 and hit enter.
Select option 3 from this screen and hit enter.
Just hit enter again (no input for ZONE NAME).
Now select the region you are interested in. GLOBAL zone will show all the RSU that has been RECEIVED (it may or may not be APPLYed already). TARGET zone will show all the RSU that has been APPLYed.
e.g., this screen shows the last maintenance applied (RSU1103), along with the previous maintenance:
Technical Tips including DB2 z/OS, DB2 LUW, COBOL, JCL, VSAM, CICS, 3rd party vendor tools (BMC, CA, IBM, Macro4, etc.)
Showing posts with label CICS. Show all posts
Showing posts with label CICS. Show all posts
Wednesday, October 19, 2011
Friday, July 31, 2009
How to find the number of times a CICS program was used in a day?
CICS has a very handy tool called "Statistics Utility Program" - DFHSTUP. If you want to know how many times a program was used in a particular day, run this program at the end of the day.
It prepares and prints reports offline, using the CICS statistics data recorded on the MVS system management facilities (SMF) SYS1.MANx data sets. To enable the CICS statistics domain to record interval statistics on these SMF data sets, you must specify the STATRCD=ON system initialization parameter (SIT). The other statistics record types (unsolicited, requested and end-of-day) are written regardless of the setting of the STATRCD option.
Note: Use the version of the DFHSTUP program from the same release of CICS as the data that it is to process.
Sample Job from CICS manual:
The job shown comprises of two job steps. The job steps are:
1. Unload the SMF data set (or data sets) containing the CICS statistics that you want to process
2. Run DFHSTUP to sort, format, and print the statistics data. You run the DFHSTUP program in a batch region to process any CICS SMF type 110 statistics records that are present in an unloaded SMF data set, which you can write to either a temporary or a cataloged data set.
For more information, please refer to DFHSTUP in "CICS Transaction Server for z/OS Information Center"
It prepares and prints reports offline, using the CICS statistics data recorded on the MVS system management facilities (SMF) SYS1.MANx data sets. To enable the CICS statistics domain to record interval statistics on these SMF data sets, you must specify the STATRCD=ON system initialization parameter (SIT). The other statistics record types (unsolicited, requested and end-of-day) are written regardless of the setting of the STATRCD option.
Note: Use the version of the DFHSTUP program from the same release of CICS as the data that it is to process.
Sample Job from CICS manual:
The job shown comprises of two job steps. The job steps are:
1. Unload the SMF data set (or data sets) containing the CICS statistics that you want to process
2. Run DFHSTUP to sort, format, and print the statistics data. You run the DFHSTUP program in a batch region to process any CICS SMF type 110 statistics records that are present in an unloaded SMF data set, which you can write to either a temporary or a cataloged data set.
//**********************************************************************
//* Step 1: Unload data from the SMF data sets
//**********************************************************************
//SMFDUMP EXEC PGM=IFASMFDP
//INDD1 DD DSN=SYS1.MANx,DISP=SHR,AMP=('BUFSP=65536')
//INDD2 DD DSN=SYS1.MANy,DISP=SHR
//OUTDD1 DD DSN=user.SMF.DATA,DISP=(NEW,CATLG),
// SPACE=(CYL,(50,10)),UNIT=SYSDA
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
INDD(INDD1,OPTIONS(DUMP))
INDD(INDD2,OPTIONS(DUMP))
OUTDD(OUTDD1,TYPE(0:255))
/*
//**********************************************************************
//* Step 2: Sort, format and print the statistics records
//**********************************************************************
//STUP1 EXEC PGM=DFHSTUP,REGION=0M
//********************************************
//STEPLIB DD DSN=CICSTS31.CICS.SDFHLOAD,DISP=SHR
// DD DSN=CICSTS31.CICS.SDFHAUTH,DISP=SHR
//DFHSTATS DD DSN=user.SMF.DATA,DISP=SHR
//DFHSTWRK DD UNIT=SYSDA,SPACE=(CYL,(8,4))
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(4))
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(4))
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(4))
//SORTWK04 DD UNIT=SYSDA,SPACE=(CYL,(4))
//DFHPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSABEND DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SELECT APPLID=(applid1,applid2)
COLLECTION TYPE=ALL
/*
For more information, please refer to DFHSTUP in "CICS Transaction Server for z/OS Information Center"
Saturday, June 13, 2009
How to turn on Aux trace in CICS
The CICS INTERNAL trace stays on always. But it doesn't get externalized, so the trace data may not be available when you need it. When trace data is needed, you can turn on Aux Trace by changing the Auxiliary Trace Status to "Stopped" to "Started" using CETR transaction. The Aux Trace data set has initial value of A which is defined as DFHAUXT in the CICS started task. When A gets filled, it automatically switches to B which is defined as DFHBUXT in the started task. When B gets filled the status changes to STOPPED. You can do a STANDARD trace or a SPECIAL trace (with only the components that you want to trace - Standard usually captures lot more data than required). To set up values for special tracing, press PF4 and set the values under "special" as needed. The component abbreviations are defined in the help screen (press PF1). Once you make the required changes in this screen, press PF5 to define the transaction for which you want Aux trace turned on.
From the main CETR screen, press PF4 to get to the Component Trace Options screen where you can set the options for Standard and/or Special trace options.
From the main CETR screen, press PF1 to get to this Trace Help screen where you can see the meanings of component abbreviations.
From the main CETR screen, press PF9 to get to this "Transaction and Terminal Trace" screen where you can set the transaction name and/or terminal name that needs to be traced.
To print the trace data use the following job or use IPCS to analyze the trace data.
CETR CICS Trace Control Facility
CICTTOR
Type in your choices.
Item Choice Possible choices
Internal Trace Status ===> STARTED STArted, STOpped
Internal Trace Table Size ===> 400 K 16K - 1048576K
Auxiliary Trace Status ===> STOPPED STArted, STOpped, Paused
Auxiliary Trace Dataset ===> A A, B
Auxiliary Switch Status ===> NO NO, NExt, All
GTF Trace Status ===> STOPPED STArted, STOpped
Master System Trace Flag ===> OFF ON, OFf
Master User Trace Flag ===> OFF ON, OFf
When finished, press ENTER.
PF1=Help 3=Quit 4=Components 5=Ter/Trn 6=JVM 9=Error List
From the main CETR screen, press PF4 to get to the Component Trace Options screen where you can set the options for Standard and/or Special trace options.
CETR Component Trace Options
CICxxxx
Over-type where required and press ENTER. PAGE 1 OF 4
Component Standard Special
-------- --------------------------------------------------------------
AP 1 1-2
BA 1 1-2
BM 1 1
BR 1 1-2
CP 1 1-2
DC 1 1
DD 1 1-2
DH 1 1-2
DM 1 1-2
DP 1 1-2
DS 1 1-2
DU 1 1-2
EI 1 1-2
EJ 1 1-2
EM 1 1-2
FC 1 1-2
GC 1 1-2
PF: 1=Help 3=Quit 7=Back 8=Forward 9=Messages ENTER=Change
From the main CETR screen, press PF1 to get to this Trace Help screen where you can see the meanings of component abbreviations.
CETR Help: CICS Component Trace
(3) MEANINGS OF COMPONENT ABBREVIATIONS.
AP . . . Application domain IE . . . ECI over TCP/IP domain
BA . . . Business Application Manager II . . . IIOP domain
BM . . . Basic Mapping Support IS . . . ISC
BR . . . Bridge KC . . . Task Control
CP . . . CPI-C interface KE . . . Kernel
DC . . . Dump compatibility layer LC . . . Local Catalog domain
DD . . . Directory manager LD . . . Loader domain
DH . . . Document Handler domain LG . . . Log Manager domain
DM . . . Domain Manager domain LM . . . Lock Manager domain
DP . . . Debugging Profiles domain ME . . . Message domain
DS . . . Dispatcher domain MN . . . Monitoring domain
DU . . . Dump domain NQ . . . Enqueue Manager
EI . . . Exec interface OT . . . Object Transaction domain
EJ . . . Enterprise Java domain PA . . . Parameter Manager
EM . . . Event Manager domain PC . . . Program control
FC . . . File control PG . . . Program Manager domain
GC . . . Global Catalog domain PI . . . Pipeline Manager domain
IC . . . Interval control PT . . . Partner Management
PF 3=End 7=Back 8=Next ENTER=End
From the main CETR screen, press PF9 to get to this "Transaction and Terminal Trace" screen where you can set the transaction name and/or terminal name that needs to be traced.
CETR Transaction and Terminal Trace xxx
CICxxxx
Type in your choices.
Item Choice Possible choices
Transaction ID ===> Any valid 4 character ID
Transaction Status ===> STandard, SPecial, SUppressed
Terminal ID ===> Any valid Terminal ID
Netname ===> Any valid Netname
Terminal Status ===> STandard, SPecial
Terminal VTAM Exit Trace ===> ON, OFf
Terminal ZCP Trace ===> ON, OFf
VTAM Exit override ===> NONE All, System, None
When finished, press ENTER.
PF1=Help 3=Quit 6=Cancel Exits 9=Error List
To print the trace data use the following job or use IPCS to analyze the trace data.
//PRINT EXEC PGM=DFHTU640 <-- Program namechanges depending on the CICS version
//STEPLIB DD DSN=xxx.SDFHLOAD,DISP=SHR
//DFHAUXT DD DSN=xxx.DFHBUXT,DISP=SHR
//DFHAXPRT DD SYSOUT=*
//DFHAXPRM DD *
ABBREV
/*
//*TASKID=(74082)
//*TYPETR=(APE160,AP3180)
Monday, May 11, 2009
Trace Master - CICS abend AEYB
My colleague was trying to debug a CICS program in TraceMaster (a Macro4 Prodcut). He got this message:
DFHAC2206 15:45:50 CICTTOR Transaction xxxx failed with abend AZI6. Updates to local recoverable resources backed out. DFHAC2261 System OPR sentmessage (sese code 0824089E). 'DFHAC2206 15:45:50 CICTOPR Transaction xxxx failed with abend AEYB. Updates to local recoverable resources backedout.'
CICS manual describes the condition for code "AEYB" as "INVMPSZ". This "occurs if the specified map is too wide or too long for the terminal." So I had him change the Screen Size on Trace Master profile from "2" for 24x80 to "3"for 32x80 and SAVEd the profile (this is important, Trace Master doesn'tsave the profile automatically).
That fixed the problem.
However, he started getting a "X PROG" after starting the debug session. We looked at the program source code and found what the problem was. Apparently TraceMaster doesn't like FREEKB option. It failed while executing this statement:
EXEC CICS SEND
FREEKB
CONTROL
CURSOR (EIBCPOSN)
END-EXEC.
We don't understand why the program is doing this to free the keyboard because the SEND of the map has the FREEKB option on it. This problem got resolved when we bypassed this statement while debugging in TraceMaster. This extra 'SEND CONTROL' command seems to be confusing it. To bypass this command, we set a breakpoint at this statement and then did a GOTO (PF13) to the exit to skip the SEND to get it to work.
DFHAC2206 15:45:50 CICTTOR Transaction xxxx failed with abend AZI6. Updates to local recoverable resources backed out. DFHAC2261 System OPR sentmessage (sese code 0824089E). 'DFHAC2206 15:45:50 CICTOPR Transaction xxxx failed with abend AEYB. Updates to local recoverable resources backedout.'
CICS manual describes the condition for code "AEYB" as "INVMPSZ". This "occurs if the specified map is too wide or too long for the terminal." So I had him change the Screen Size on Trace Master profile from "2" for 24x80 to "3"for 32x80 and SAVEd the profile (this is important, Trace Master doesn'tsave the profile automatically).
That fixed the problem.
However, he started getting a "X PROG" after starting the debug session. We looked at the program source code and found what the problem was. Apparently TraceMaster doesn't like FREEKB option. It failed while executing this statement:
EXEC CICS SEND
FREEKB
CONTROL
CURSOR (EIBCPOSN)
END-EXEC.
We don't understand why the program is doing this to free the keyboard because the SEND of the map has the FREEKB option on it. This problem got resolved when we bypassed this statement while debugging in TraceMaster. This extra 'SEND CONTROL' command seems to be confusing it. To bypass this command, we set a breakpoint at this statement and then did a GOTO (PF13) to the exit to skip the SEND to get it to work.
Saturday, January 10, 2009
CICS EIBRESP=27
Last week I was coding a simple CICS program and in the first execution, I got this error message:
EIBRESP=27 and EIBRESP2=0
As per the CICS manual, EIBRESP=27 means "Length Error". Well I found it strange that it got a
length error. After analyzing further I found that, I forgot to define the program in CICS. I defined it in CICS and then ran the program again, it started working !!
Why wouldn't CICS give me a straight forward "I cannot find this program in CICS" instead saying "Length Error"?
Well, the problem is solved now, I'm not worried about it anymore.
EIBRESP=27 and EIBRESP2=0
As per the CICS manual, EIBRESP=27 means "Length Error". Well I found it strange that it got a
length error. After analyzing further I found that, I forgot to define the program in CICS. I defined it in CICS and then ran the program again, it started working !!
Why wouldn't CICS give me a straight forward "I cannot find this program in CICS" instead saying "Length Error"?
Well, the problem is solved now, I'm not worried about it anymore.
Thursday, October 30, 2008
CICS Scheduled task
I've a CICS program which is invoked when CICS is started (either a cold start or a warm start) through a PLT entry "DFHPLT TYPE=ENTRY,PROGRAM=program_name".
Our shop cycles CICS every Sunday. But I wanted to run this program every day at 10 a.m. and again at 10 p.m. So, what I did was, I coded this piece at the end of the program (just before "EXEC CICS RETURN END-EXEC"):
Thanks to my colleague who taught me this technique.
Our shop cycles CICS every Sunday. But I wanted to run this program every day at 10 a.m. and again at 10 p.m. So, what I did was, I coded this piece at the end of the program (just before "EXEC CICS RETURN END-EXEC"):
IF WS-TIME > '21.59.59'
EXEC CICS START TRANSID(WS-THIS-TRAN)
REQID(WS-REQID)
AT HOURS(10)
END-EXEC
ELSE
EXEC CICS START TRANSID(WS-THIS-TRAN)
REQID(WS-REQID)
AT HOURS(22)
END-EXEC
END-IF
Thanks to my colleague who taught me this technique.
Subscribe to:
Posts (Atom)