Showing posts with label tso. Show all posts
Showing posts with label tso. Show all posts

Saturday, December 27, 2008

Dataset ENQ and CONtention

If you are trying to edit or view a dataset and you get a message "data set in use", how will you find who is using it? ISRDDN is the answer.

Type TSO ISRDDN (in some shops its just ISRDDN - no TSO prefix required) and hit enter. Then type ENQ and hit enter.

You will get a screen like this:


Type your dataset name (or prefix) in "Minor name prefix" and hit enter.

You'll get a list of all the users/jobs that are viewing/editing the
dataset(s) under the Job Name field. These are color coded to indicate the following ENQue status:

GREEN - Shared
REVERSE GREEN - Waiting for shared
RED - Exclusive
REVERSE RED - Waiting for exclusive

For the System ENQ List you may specify specific Major, and Minor prefixes, as well as specific job or user prefixes to reduce the size of the list.

You can use the RESET command to reset these values to defaults.

On the ENQ display screen, you can type ALL to view all system ENQs or RESET to view the SYSDSN enqs for your user id.

The System ENQ Contention display (command Con) shows all ENQ contention on the system.

Tuesday, November 4, 2008

APF Authorization

When someone says, "you need to APF authorize this dataset", what do they mean?

Well, APF means "Authorized Program Facility". In a z/OS environment, APF is a facility that permits the identification of programs that are authorized to use restricted functions.

To find the datasets that are APF authorized:

1. Type TSO ISRDDN in your ISPF session (some shops need just ISRDDN with no TSO prefix) and hit enter.

2. Type APF and hit enter. It'll bring up a list of all datasets that are APF authorized.

Remember that, if you like to use a APF authorized dataset in a job STEPLIB, make sure all the datasets in the STEPLIB are APF authorized.

Saturday, October 25, 2008

ISRDDN

When you log on to your mainframe TSO (Time Sharing Option) session, you can use the TSO supplied commands. Apart from those commands, if you know how to code in REXX or CLIST, you can come up with your own commands.

There are also occasions when you use commands written by some 3rd party vendors. For example, Quick Reference - you invoke their product by typing "QW keyword". Sometimes you wonder, how does TSO know these commands exist or where to get the source/load from - the source could be in a lot of different datasets.

When you logon into your TSO session, the system preallocates a bunch of datasets. This is determined by your logon PROC. Usually the system programmer determines the appropriate logon PROC for each user. For example, a developer might need a set of datasets preallocated, while a DBA might need a different set of datasets preallocated. So, when you type QW in the command line, TSO searches in these datasets and executes it.

To find out which are all the datasets that have been allocated to your TSO session, type ISRDDN (in some shops, you may have to type TSO ISRDDN) in the command line and hit enter. You will get all the datasets that are allocated and the corresponding DD names. If you want to find the source of a particular CLIST, REXX, Panel, etc., just type "M membername" (without quotes). e.g. M qw -- will search for the source code or load for QW.

Thursday, September 18, 2008

ISPF/TSO tips

  • PANELID ON will show the panel name in the top left corner
  • PFSHOW ON will show the PF Keys assignment at the bottom of the screen
  • You are editing a PDS (partitioned dataset) member; you've made significant number of changes to the member; now you are thinking about creating a new member with these changes rather than saving the changes in the member you are editing. Can you do this? Yes, you can. Just issue this command: CRE .ZF .ZL memname. And, don't forget to issue CANCEL command on the member that you are editing, otherwise, you might save the changes accidentally (if AUTOSAVE is turned ON in your ISPF profile)
  • Talking of ISPF profile, how will you know what are all the options available and which are turned on/off? Issue PROF on a dataset while in VIEW or EDIT mode.
  • C ALL 'abc' 'xyz' will replace all occurrences of string abc to xyz
  • C ALL 'abc' 'xyz' n will replace all occurrences of string abc to xyz in column n
  • C ALL 'abc' 'xyz' n1 n2 will replace all occurrences of string abc to xyz between columns n1 and n2
  • C ALL P'¬' 'abc' n1 n2 will replace ANY character found between columns n1 and n2 to abc. Use this very carefully.
  • X ALL 'abc' will exclude all the lines that have the string 'abc'
  • COMP X 'dataset(optional_member_name)' will display the differences between current PDS/PS and the compared dataset excluding all the lines that match. This is very useful if you are making changes to a source code and want to compare it with the baseline. There is another powerful feature available along with comparing two datasets. You can bring in the changes found in the compared dataset which is not available in the current dataset. If you would like know how to do this, please send me an email or post a comment

"HIDE EXCLUDE"

When you are editing a dataset in ISPF, you can exclude lines by typing 'x' in the line number area. When you do that, you see the excluded lines as a row of dots. You now have the option of entering 'HIDE EXCLUDE' on the command line. The line of dots disappears and is replaced with a solid line in the number area.

RESET will behave as before; RESET HIDE will return the row of dots to your display.

Monday, September 15, 2008

HRECALL with DFDSS option

When you need a dataset that has been migrated to tape, you can issue the HRECALL command. However, if the recalled dataset doesn’t fit in one volume the command fails. To get through this, you can have it span multi-volumes using the following command:

HSEND RECALL ‘migrated-dataset-name’ DFDSSOPTION(VOLCOUNT(ANY))