You are here: Home > Knowledge Refreshers

KR editions 47 to 51


KR-47 TSO tips

  • Did you know that the command RETP (Retrieve Panel) will list the last 25 commands that you typed on the command line?
  • While monitoring the progress of a job in your spool, instead of pressing the enter key repeatedly, you can use the command: 
    &X 
    where X = no. of seconds. (Type this on the command line).
    This will keep looking for an update by itself after every X seconds. To come out of this mode, use SHIFT+ESCAPE.

KR-48 TSO tips (continued)

Tips on sorting a file (in view/edit mode):

(The following can be typed on the command line after you open the file).
SORT (or SORT A)
This would sort all the records in ascending order. 
SORT D 10
sorts in descending order from column 10 to the rest. 
SORT 16 20
sorts in ascending order - column# 16 to 20 as control 
SORT A 10 20 D 30 35
sorts columns 10 to 20 ascending and then columns 30 to 35 descending 
SORT .FROM .TO D 10 20
sorts columns 10 to 20 in descending order for the labeled section (i.e. .FROM and .TO)


KR-49  Bookmarks/labels

When viewing/ editing a code in mainframes you may want to bookmark particular locations so that you can jump to them easily (rather than having to go up and down the page frequently). In the previous KR also we used bookmarks. 

Contributed by Ashish

To bookmark a line, just type:
.X
on the line number column; where X can be any character (it should start in an alphabet).
.X is referred to as a LABEL.



In the figure above, we have 3 labels: .A, .B and .C

To jump to a particular bookmark, just type:
L label-name
on the command line.

Note: The previous KR on using SORT made use of labels:
SORT .FROM .TO D 10 20
sorts columns 10 to 20 in descending order for the labeled section (i.e. .FROM and .TO are labels) 


KR-50 Undeleting datasets!

Undeleting/ Retrieving older versions of datasets:
You can recover datasets that you deleted accidentally as well as recover older backed-up versions of existing datasets using HSM. Type HSM on the command line and you'll be taken to a screen where you have to give the dataset name.

Here you can specify the dataset name that you want to recover. You can also recover older versions of existing datasets (depending on how frequently they were backed up you'll get a listing of all the backups). You can also rename the output dataset which would be created (this would be useful if you want to see the older versions of a dataset). Type an 'S' to recover the version you want.

Note: DFSMSHSM does a regular backup of all datasets (depending on the management class of the dataset, which was discussed in an earlier KR on ISMF). These backed-up datasets can be recovered using the above procedure. 

Note: Some management classes are defined as "no backup"; in these cases you will not have different versions of the dataset (since there is no backup). Check ISMF for details on this.

Note: HSM is just a tool that may be present on some installations. Or it may be called something else. There is another standard technique for recovering datasets as well. We shall take a look at this in a later KR.


KR-51 TSO member search

There may be instances where you want to know whether a particular member exists within multiple PDS. To find out, get all the PDS listed in option 3.4.
On the Command line, type
Command line = => M member-name

This command will not work for the migrated PDS. So ensure all the PDS are in primary storage. 
Now the message "MEMBER(S): member-name found" will appear in the right side of the PDS (under the column "message" in option 3.4). M stands for the command MEMBER. You can also use the wildcard * in the search. For ex.: member cob* will search for all members starting in "cob".

Note:
It was specified that you can use the member command in the 3.4 option. It's actually in the data set listing screen of 3.4 (where all datasets are displayed) that you should use the option.


Go back to the main contents page