Recovering Deleted Flat Files

Flat files can be recovered by following the below mentioned steps.

  1. Start 6 
  2. HLIST BCDS DSN(‘filename’) 
  3. Wait for the system notification
  4. Type the command HRECOVER ‘filename’ and wait for system notification

Different variations of HRECOVER are given below.

  • HRECOVER ‘filename’ recovers with same name
  • HRECOVER ‘old filename’ NEW (‘new filename’) recovers and assigns new name
  • HRECOVER ‘file name’ REPLACE recovers replacing a file with same name

The recovery might take some time. You should have HSM volume dump(s) of the volume(s) where the dataset resided for HRECOVER to work successfully. Else you will recive a message “BACKUP/DUMP COPY DOES NOT EXIST”.

AUTOTYPE Suggestion

How wonderful it feels when Internet explorer suggests names for URLs when we start typing the first few letters!

Our mainframe also has the ability to do pretty much the same. Using ‘KEYS’ command on the command line, assign a free PF key with the value ‘AUTOTYPE’. We are all set.

Now use 3.4 to go to the Data Set list utility and then type the first few qualifier of the required data set. Press the desired PF key. It will show you the dataset name which is nearest match.

Special Searching

A picture string in a FIND, CHANGE, or EXCLUDE command allows you to search for a particular kind of character without regard for the specific character involved. 
You can use special characters within the picture string to represent the kind of character to be found, as follows:

They can be used in REXX / ISREDIT macros too.  

String Meaning

P’=’   Any character
P’¬’   Any character that is not a blank
P’.’    Any character that cannot be displayed
P’#’   Any numeric character, 0-9
P’-‘    Any non-numeric character
P’@’   Any alphabetic character, uppercase or lowercase
P’c’    Any lowercase alphabetic character
P’>’   Any uppercase alphabetic character
P’$’   Any special character, neither alphabetic nor numeric.

Appending to ISPF Clipboard


I have a dataset with 10,000 lines. I want to cut the first 10 lines and last 10 lines and paste into another dataset. When I cut the first 10 lines and then again the last 10 lines, only the last 10 lines are pasted into the new dataset.

Is there anyway out (other than doing a 2 cut & paste)?

Yes, here it is.

  1. First cut 10 lines, then issue CUT APPEND.
  2. Cut last 10 lines, then issue CUT APPEND.
  3. When you PASTE it, you got both.

Viewing ISPF Clipboard

When I issue CUT , I know that the CUT content are placed in a clipboard. And when I issue PASTE, the clipboard content are pasted.

But is it possible for me to view/edit the clipboard ?

One can view the clipboard after any valid CUT command was issued.

To view the clipboard, issue : CUT DISPLAY.

Clipboard manager will pop up and gives us options to edit or browse the content.

Repeating the ISPF command without typing again

Any command entered in the ISPF COMMAND LINE disappears after the successful execution of its intended function. If you want to repeat the same command , you got to re-type it or use some PF key to retrieve the last command entered.

But here is a cool method the make the command entered not to disappear and stay on the screen.

Precede commands with ‘& ‘

For Example:

&C    ‘110-PARA’      ‘220-PARA’

After the execution of the command, the below command stays on the screen.

This way you can entering the same command or modifying the command a little and using it multiple times.

Recently accessed Datasets

Here is the way to find the last 10 datasets that you have accessed.

  1. GO TO ISPF 3.4 option.
  2. On the top, there is a MENUBAR. Select REFLIST
  3. Select Option 1 in it.

Using this option you can find out the last 30 datasets that you have accessed.