Longpela Expertise logo
Longpela Expertise Consulting
Longpela Expertise
Home | Press Room | Contact Us | Site Map
FAQ


LongEx Mainframe Quarterly - February 2017
 

technical: Ten Ways IPCS Can Be Used As a Monitor

When I first started with z/OS (MVS in those days), you would print out dumps as a big block of paper, and then start working through them. The good news is that IBM introduced their Interactive Problem Control System (IPCS) tool a few years after I started. A TSO application, IPCS is brilliant for those of us that still need to wade through dumps.

However IPCS can do more than just analyse dumps, it can look at things that are happening live in the system. Or in other words, it could be used as a monitor. Here are 10 interesting things you may not have known you could do with IPCS without a dump.

1. Browse Active Storage

Everyone knows that IPCS can analyse dumps. Less known is that IPCS can browse the active storage in the TSO address space where you're using. This is the first step to all of our hints in this article. To do this, you first set the default source to ACTIVE:

------------------------- IPCS Default Values ------------- LOCAL updated
Command ===>

  You may change any of the defaults listed below. The defaults shown
  before any changes are LOCAL. Change scope to GLOBAL to display global
  defaults.

  Scope   ==> LOCAL   (LOCAL, GLOBAL, or BOTH)

  If you change the Source default, IPCS will display the current default
  Address Space for the new source and will ignore any data entered in
  the Address Space field.

  Source  ==> ACTIVE
  Address Space   ==>
  Message Routing ==> NOPRINT TERMINAL NOPDS
  Message Control ==> CONFIRM VERIFY FLAG(WARNING)
  Display Content ==> NOMACHINE REMARK REQUEST NOSTORAGE SYMBOL ALIGN

Press ENTER to update defaults.

Use the END command to exit without an update.

You can now use many IPCS commands (though some don't work with current storage) like the LIST command to browse your storage.

2. Browse Storage in Another Address Space

The trick above looks at storage in the current (TSO) address space. But if you have the security access, you can look at storage in other address spaces: started tasks, TSO sessions, UNIX processes, executing batch jobs. You set the address space ID (ASID) in the default values screen:

------------------------- IPCS Default Values ------------- LOCAL updated
Command ===>

  You may change any of the defaults listed below. The defaults shown
  before any changes are LOCAL. Change scope to GLOBAL to display global
  defaults.

  Scope   ==> LOCAL   (LOCAL, GLOBAL, or BOTH)

  If you change the Source default, IPCS will display the current default
  Address Space for the new source and will ignore any data entered in
  the Address Space field.

  Source  ==> ACTIVE
  Address Space   ==> 25
  Message Routing ==> NOPRINT TERMINAL NOPDS
  Message Control ==> CONFIRM VERIFY FLAG(WARNING)
  Display Content ==> NOMACHINE REMARK REQUEST NOSTORAGE SYMBOL ALIGN

Press ENTER to update defaults.

Use the END command to exit without an update.
You can also use the ASID parameters in IPCS commands. For example, the command
IPCS L 0. ASID(1)
will display storage from address 0 in ASID 1 (the master address space). You can find out the ASID of the address space you want from SDSF.

3. Find the current z/OS version

Now that we're analysing our current (or another) address space, we can start to use some of the interesting IPCS commands. The IPCS IPLDATA command shows the similar information to the D IPLDATA z/OS command:

System IPLed at 16:56:10.854 on 12/06/2016
Release z/OS 02.02.00
Used LOADW1 in SYS1.IPLPARM on 0CE3
IEASYM LIST=(W1,SV,VN)
IEASYS LIST=(00,LV,SV,VN) (OP)
IODF device 0CE3
IPL device: original 1000 current 1000 volume VIMVSB

So in our system, we're running z/OS 2.2.

4. Find more z/OS information

The IPL data is just the beginning. The IPCS CBFORMAT command can be used to format z/OS control blocks. The CVT is one of these. We list the contents at the address x'10' (decimal 16):

LIST 10. ASID(X'01D8') LENGTH(X'04') AREA
00000010. 00FDF690                            |..6.            |
This location points to the address of the CVT. So now we display it:
cbformat 00FDF690. str(cvt)

CVT: 00FDF690
    -0028  PRODN.... SP7.2.1   PRODI.... HBB7790   VERID....
    -0006  MDL...... 2964      RELNO.... 038
    +0000  TCBP..... 00000218  0EF00.... 00FF56E4  LINK..... 00FDF60C
    +000C  AUSCB.... 00FDD558  BUF...... 00000000  XAPG..... 00FE51E0
    +0018  0VL00.... 00FF6AD6  PCNVT.... 00FE7DE2  PRLTV.... 00FE7B6C
    +0024  LLCB..... 01BD0C60  LLTRM.... 815C7720  XTLER.... 00FED368
    +0030  SYSAD.... 026CB850  BTERM.... 00FF3C50  DATE..... 0117061F
    +003C  MSLT..... 00FDD3F8  ZDTAB.... 00F54000  XITP..... 00FF9AC0

The CVT shows all sorts or information. For example, we can see that this is a 2964 machine (the MDL value on the second line): a z13. We can also see that the PRODI value is HBB7790. This is the FMID of the z/OS release: z/OS 2.2.

5. List TOD Time

Longpela Expertise's website has a free tool to convert a hexadecimal time of day (TOD) value to a time. But IPCS can also do it using the IPCS LISTTOD command. For example, the command

ipcs listtod BDC6132B502B5A0A
produces
10/17/2005 10:46:04.479157 STCK   X'BDC6132B 502B5A0A'
10/17/2005 10:46:04.479157 UTC    X'BDC6132B 502B5A0A'
10/17/2005 04:46:04.479157 LOCAL  X'BDC5C2B3 F2AB5A0A'

6. Get GRSDATA

The IPCS GRSDATA command will output all the current ENQs managed by GRS.

Options list:
  Report................. GRSDATA
  Level of detail........ SUMMARY
  Filter(s) in use:
    NONE

ASID(X'0023') step resources

  Major.. CL8'SYSZSDSF'

    Minor.. CL008'HSFIXCSV'

      SCOPE. STEP     SYSNAME. S0W1      JOBNAME. SDSFAUX
      ASID.. 0023     TCB..... 007FC5A0  STATUS.. SHARED

      SCOPE. STEP     SYSNAME. S0W1      JOBNAME. SDSFAUX
      ASID.. 0023     TCB..... 007D5150  STATUS.. SHARED

      SCOPE. STEP     SYSNAME. S0W1      JOBNAME. SDSFAUX
      ASID.. 0023     TCB..... 007D4528  STATUS.. SHARED

      SCOPE. STEP     SYSNAME. S0W1      JOBNAME. SDSFAUX
      ASID.. 0023     TCB..... 007D42F0  STATUS.. SHARED

7. Display System Symbols

z/OS systems programmers can code symbols that are used in JCL and parameters. The z/OS DISPLAY SYMBOLS command can be used to view these symbols. In IPCS, the current symbols can be seen using the SYMDEF command.

     Symbol... JESNODE
     Subtext.. SYS1
     HexValue. E2E8E2F1
     Symbol... LPARNAME
     Subtext.. CSYS
     HexValue. C3E2E8E2
     Subtext.. TEST

8. Display Subsystem Data

The IPCS SSIDATA produces information about installed subsystems.

Summary Report for SSIDATA
--------------------------

NUMBER OF DEFINED SUBSYSTEMS =    28
ADDRESS OF SUBSYSTEM REQUEST ROUTER = 00CCF088

SUBSYS = JES2 (PRIMARY)
   DYNAMIC = YES   STATUS = ACTIVE     COMMANDS = NO    EVENTRTN = NO
   SUBSYSTEM DEFINITION DATA
    SSCVT ADDRESS = 00C948E8
    USER FIELD 1 = 00C777CC    USER FIELD 2 = 00C77408
   SUBSYSTEM VECTOR TABLE DATA
    TOKEN = N/A         ADDRESS = 19A6EAE8    STATUS = ACTIVE
    FUNC =   1          FUNC =   2          FUNC =   3
    FUNC =   4          FUNC =   5          FUNC =   6
    FUNC =   7          FUNC =   8          FUNC =   9
    FUNC =  10          FUNC =  11          FUNC =  12
    FUNC =  13          FUNC =  16          FUNC =  17
    FUNC =  18          FUNC =  19          FUNC =  20
    FUNC =  21          FUNC =  53          FUNC =  54
    FUNC =  64          FUNC =  70          FUNC =  71
    FUNC =  75          FUNC =  77          FUNC =  79
    FUNC =  80          FUNC =  81          FUNC =  82
    FUNC =  83          FUNC =  84          FUNC =  85

SUBSYS = MSTR
   DYNAMIC = NO    STATUS = ACTIVE     COMMANDS = N/A   EVENTRTN = N/A
   SUBSYSTEM DEFINITION DATA

9. Find Information About Modules Used

IPCS can be used to see if a module has been loaded by an address space, or is in LPA. If it's been loaded, then a program in the address space is probably using it. The IPCS FINDMOD command helps here.

FINDMOD IKJEFT01
AMODE(31) entry point IKJEFT01 is at 05AD0000

IKJEFT01 - Link pack directory entry
LIST 05AD0000. ASID(X'0001') LENGTH(X'FEA0') MODULE(Ikjeft01)

So we know that the module IKJEFT01 (TSO) is in LPA at address 05AD0000.

10. Find Assembler Operation Codes

Whenever I'm looking at a dump, I sometimes need to find out an assembler instruction (an operation code) from a byte. In the past I've used the IBM z/Architecture Reference Summary. In the old days, these 'pamphlets' were hot property (though today they're available in PDF format). An easier way is to use the IPCS OPCODE command. For example, the following command finds the operation code for x'15':

IPCS OPCODE 15
Mnemonic for X'15' is CLR

IPCS expands this capability to dis-assemble modules in memory (or LPA). We used the LISTMOD command above to find out the starting address of the IKJEFT01 module (x'05AD0000'). Using the LIST command with the INSTRUCTION parameter, we can disassemble it.

LIST 05AD0000. ASID(X'01D8') LENGTH(X'01F4') INSTRUCTION
05AD0000 | 47F0 F04A      | BC      X'F',X'4A'(,R15)
05AD0004 LENGTH(X'17')==>Branch around data. Displayed as AREA
05AD0004.          008631C9 D2D1C5C6 E3F0F17A |    .f.IKJEFT01:|
05AD0010. E3D4D740 C99589A3 898193            |TMP Initial     |
05AD001B | 89A9 81A3      | SLL     R10,X'1A3'(R8)
05AD001F | 8996 9540      | SLL     R9,X'540'(R9)
05AD0023 | D996 A4A3 8995 | MVCK    X'4A3'(R9,R10),X'995'(R8),R6
05AD0029 | 8540 F1F6      | BRXLE   R4,R0,*-X'1C14'

Conclusion

IPCS is brilliant for analysing dumps in z/OS. But it also has some nice functions to be used on a live system as it is running.


David Stephens



LongEx Quarterly is a quarterly eZine produced by Longpela Expertise. It provides Mainframe articles for management and technical experts. It is published every November, February, May and August.

The opinions in this article are solely those of the author, and do not necessarily represent the opinions of any other person or organisation. All trademarks, trade names, service marks and logos referenced in these articles belong to their respective companies.

Although Longpela Expertise may be paid by organisations reprinting our articles, all articles are independent. Longpela Expertise has not been paid money by any vendor or company to write any articles appearing in our e-zine.

Inside This Month

Printer Friendly Version

Read Previous Articles


Longpela Expertise understand what's 'under the hood' of z/OS and related systems like CICS and IMS.
We can read dumps, diagnose complex problems, and write and maintain assembler routines.
Contact us to get your own z/OS internals expert.
© Copyright 2017 Longpela Expertise  |  ABN 55 072 652 147
Legal Disclaimer | Privacy Policy Australia
Website Design: Hecate Jay