Archive for category MVS
How to display the Linklist concatenation
Posted by Rui Miguel Feio in MVS on August 19th, 2009
Whoever works with mainframes knows that to be able to o know what the Linklist concatenation is is one of the most important things in the job.
There is a very simple MVS command for the effect:
D PROG,LNKLST
Here’s an example of what this command returns:
RESPONSE=TST1
CSV470I 12.29.52 LNKLST DISPLAY 888
LNKLST SET LNKLST01 LNKAUTH=LNKLST
ENTRY APF VOLUME DSNAME
1 A TST1R1 SYS2.LINKLIB
2 A TST1R1 SYS1.MIGLIB
3 A TST1R1 SYS1.CSSLIB
4 A TST1R1 SYS2.LINKLIB
5 A TST1R1 SYS1.LINKLIB
6 TST1R1 SYS1.SORTLIB
...
Explanation:
TST1 is the LPAR name
LNKLST01 indicates the Linklist set currently active and in use by the system
A indicates that the dataset is also in APF list
TST1R1 indicates the volume where the dataset is allocated
Note:
The Linklist concatenation is defined in the PROGxx member of the PARMLIB.
MVS command to change the state of an Exit routine
Posted by Rui Miguel Feio in MVS on August 19th, 2009
Sometimes we find it necessary either to inactivate an active exit routine or the other way around. In order to achieve this, we need to use the MVS command:
/SETPROG EXIT,MODIFY,EXITNAME=exit_name,MODNAME=mod_name,STATE=active_inactive
Example:
/SETPROG EXIT,MODIFY,EXITNAME=SYS.IEFACTRT,MODNAME=IEFACTRT,STATE=INACTIVE
Other parameters:
JOBNAME=jobname – The job(s) name(s) for which this exit routine is to get control. If some other job calls the exit, this exit routine does not get control. The default value is * which means all the jobs. The default for the MODIFY parameter is to leave the jobname unchanged.
MVS command to Add an Exit routine to an Exit
Posted by Rui Miguel Feio in MVS on August 19th, 2009
When you require to add an exit routine to an exit you may use the most simple form of the Add command:
/SETPROG EXIT,ADD,EXITNAME=exit_name,MODNAME=mod_name,DSNAME=dsname
Example:
exit_name = SYS.IEFACTRT
mod_name = IEFACTRT
dsname = SYS2.LINKLIB.TST1
/SETPROG EXIT,ADD,EXITNAME=SYS.IEFACTRT,MODNAME=IEFACTRT,DSNAME=SYS2.TST1.LINKLIB
Other parameters:
When adding an Exit routine to an Exit you may also have the need to use one or more of the following parameters:
STATE=active_inactive - Indicates the state of the exit routine. ACTIVE is the default value.
JOBNAME=jobname – The job(s) name(s) for which this exit routine is to get control. If some other job calls the exit, this exit routine does not get control. The default value is * which means all the jobs.
ABENDNUM=(n[,CONSEC]) – indicates that the exit routine is not to be given control after the n abends occur. CONSEC indicates that there must be n consecutive abends before the system stops giving control to the exit routine.
FIRST – Specifies that the system is to call the exit routine before all other exit routines associated with this exit, unless another exit routine, added after it, also specifies FIRST.
LAST - Specifies that the system is to call the exit routine after all other exit routines associated with this exit, unless other exit routines are added after it.
Examples:
/SETPROG EXIT,ADD,EX=SYS.IEFU83,MOD=CYN1FU83,DSN=CYN.SCYNAUTH,FIRST
/SETPROG EXIT,ADD,EX=SYS.IEFU83,MOD=CYN1FU83,DSN=CYN.SCYNAUTH,FIRST,STATE=INACTIVE
/SETPROG EXIT,ADD,EX=SYSSTC.IEFACTRT,MOD=IEFACTRT,ABENDNUM=(5)
/SETPROG EXIT,ADD,EX=SYSSTC.IEFACTRT,MOD=IEFACTRT,ABENDNUM=(5,CONSEC)
MVS commands to display Dynamic Exits
Posted by Rui Miguel Feio in MVS on August 17th, 2009
The following are some of the most common ways to display Exits and Exit Routines:
1. Display the names of all the Exits
/D PROG,EXIT,ALL
Example of what this command returns:
CSV460I 13.31.32 PROG,EXIT DISPLAY 941
EXIT DEF EXIT DEF EXIT DEF
SYSSTC.IEFACTRT E SYSSTC.IEFUJI E SYSSTC.IEFUJV E
SYS.IEFACTRT E SYS.IEFUJI E SYS.IEFUJV E
SYS.IEFU83 E SYS.IEFU84 E SYS.IEFU85 E
SYSSTC.IEFU83 E SYSSTC.IEFU84 E SYSSTC.IEFU85 E
...
2. Display the names of all exit routines associated with the named exit
/D PROG,EXIT,EXITNAME=exit_name
Example:
exit_name = SYS.IEFACTRT
/D PROG,EXIT,EXITNAME=SYS.IEFACTRT
Returns:
RESPONSE=TST1
CSV461I 14.15.02 PROG,EXIT DISPLAY 068
EXIT MODULE STATE MODULE STATE MODULE STATE
SYS.IEFACTRT IEFACTRT A STRBACTR A
3. Display the names of the exits with which the specified exit routine is associated
/D PROG,EXIT,MODNAME=mod_name
Example:
mod_name = IEFACTRT
/D PROG,EXIT,MODNAME=IEFACTRT
Returns:
RESPONSE=TST1
CSV462I 14.20.25 PROG,EXIT DISPLAY 906
MODULE IEFACTRT
EXIT(S) SYSSTC.IEFACTRT SYS.IEFACTRT
MVS command to Delete an Exit routine from an Exit
Posted by Rui Miguel Feio in MVS on August 17th, 2009
The following command deletes an exit routine from an exit:
/SETPROG EXIT,DELETE,EXITNAME=exit_name,MODNAME=mod_name,FORCE=yes_no
Example:
exit_name = SYSSTC.IEFACTRT
mod_name = IEFACTRT
/SETPROG EXIT,DELETE,EXITNAME=SYSSTC.IEFACTRT,MODNAME=IEFACTRT
Note:
FORCE = NO is the default value and therefore we don’t need to specify it. This changes the state of the exit routine to inactive and the system does not free the storage.
FORCE=YES frees the storage of the exit routine immediately and it should be used only if you are sure that no exit is running that exit routine.
How to check who’s allocating a device unit
Posted by Rui Miguel Feio in MVS on August 16th, 2009
Let’s say for instance that you have a DASD volume (TSTCT1) and you would like to know who’s using it (allocating it).
In order to do this we first need to know the unit address of said device:
/D U,VOL=volume_name
In our example:
/D U,VOL=TSTCT1
Result:
RESPONSE=TST1
IEE457I 09.53.10 UNIT STATUS 444
UNIT TYPE STATUS VOLSER VOLSTATE
7001 3390 A TSTCT1 PRIV/RSDNT
Note: In this case as we can see the unit address of TSTCT1 is 7001.
Once we know the unit address then we can check who’s allocating it by using the command:
/D U,,ALLOC,address,1
In our case:
/D U,,ALLOC,7001,1
Result:
RESPONSE=TST1
IEE106I 09.56.08 UNITS ALLOCATED 623
UNIT JOBNAME ASID JOBNAME ASID JOBNAME ASID JOBNAME ASID
7001 *MASTER* 0000 *MASTER* 0001 XCFAS 0006 OMVS 000E
7001 CATALOG 0023 LLA 0024 JES2 0028
Note:
We use “1″ in the end of the command so that we only get the display for the single device we’ve specified in the command.
How to check if an LPAR is part of a SYSPLEX?
Posted by Rui Miguel Feio in MVS on July 3rd, 2009
If you need to check if an LPAR is part of a SYSPLEX or the SYSPLEX name it belongs to simply issue the command: D XCF
Example:
D XCF
Returns:
RESPONSE=TST1
IXC334I 09.32.10 DISPLAY XCF 309
SYSPLEX TESTPLEX: TST1 TST2 TST3
Notes:
- the command was issued from LPAR TST1
- in red we can see the SYSPLEX name (TESTPLEX)
- in blue we can see that 3 LPARs (TST1, TST2 and TST3) are part of the SYSPLEX TESTPLEX
How to know which IODF file is currently being used?
Posted by Rui Miguel Feio in MVS on July 3rd, 2009
If for whatever reason you need to know which IODF file is currently being used by the system, just issue the command: D IOS,CONFIG
Example:
D IOS,CONFIG
Returns:
RESPONSE=TST1
IOS506I 10.18.20 I/O CONFIG DATA 118
ACTIVE IODF DATA SET = SYS1.IODF19
CONFIGURATION ID = TEST01 EDT ID = 00
TOKEN: PROCESSOR DATE TIME DESCRIPTION
SOURCE: CMOS03 08-02-19 14:05:33 SYS1 IODF19
ACTIVE CSS: 0 SUBCHANNEL SETS CONFIGURED: 0
CHANNEL MEASUREMENT BLOCK FACILITY IS ACTIVE
As you can see LPAR TST1 is currently using IODF file SYS1.IODF19
How to dynamically add or remove libraries from APF list
Posted by Rui Miguel Feio in MVS on July 2nd, 2009
Countless times I’ve been asked if I remember the command to dynamically change the APF list.
Well, I’ve decided to include it here so that next time someone asks me I can tell them to come here.
Now, this can be done in many different ways but I normally follow this path:
1. Add/Remove just a few libraries to APF list
If the number of libraries we’re talking is not much, then we can do it by issuing the following commands for each of the libraries (datasets):
To add: SETPROG APF,ADD,DSNAME=dataset_name,VOLUME=volser
To remove: SETPROG APF,DELETE,DSNAME=dataset_name,VOLUME=volser
Notes:
- If the datasets are in an SMS managed volumes then instead of VOLUME=volser it should be SMS.
- If the system is IPLed and you did not reflect the changes to your PROGxx member in PARMLIB then these changes will be lost.
2. Add/Remove lots of libraries from APF list
If we’re talking of a considerable number of libraries then the best way is to update the PROGxx member of PARMLIB and then activate it dynamically.
Let’s assume:
PARMLIB: SYS1.PARMLIB
PROGxx: PROG00
In this case we would do the following:
- Update SYS1.PARMLIB(PROG00) and add/remove the libraries from APF list
- Issue command: SET PROG=00
Update Linklist dynamically
Posted by Rui Miguel Feio in MVS on June 29th, 2009
Some people dread the idea of having to update the Linklist dynamically but in fact it’s a very simple process:
- Update the PROGxx member that your system uses from PARMLIB:
- Add/remove libraries as required
- Change the LNKLSTnn reference to LNKLSTnn+1
- Issue the following MVS commands:
- SETPROG LNKLST,UNALLOCATE
- P LLA
- SET PROG=xx
- S LLA,SUB=MSTR
- SETPROG LNKLST,ALLOCATE
- SETPROG LNKLST,UPDATE,JOBNAME=*
- To make sure the libraries have been added /removed from the Linklist, issue the MVS command: D PROG,LNKLST
Example:
Let’s suppose your system is using SYS1.PARMLIB(PROG00) and the Linklist area in use is LNKLST00.
These would have to be the steps to follow:
- Edit SYS1.PARMLIB(PROG00) and add/remove the libraries you want from the Linklist area.
- Change all LNKLST00 references in SYS1.PARMLIB(PROG00) to LNKLST01.
- Issue the following MVS commands:
- SETPROG LNKLST,UNALLOCATE
- P LLA
- SET PROG=00
- S LLA,SUB=MSTR
- SETPROG LNKLST,ALLOCATE
- SETPROG LNKLST,UPDATE,JOBNAME=*
- D PROG,LNKLST
Note:
Click here to check why we need to stop LLA and unallocate the LNKLST.