Wednesday, March 16, 2011

Macros in Mainframe

There are a lot of things which can reduce our day to day manual effort and this is one of them -

We can record the keystrokes for any manual effort that we do in a mainframes session like-
(i) Opening a PDS
(ii) Logging into CA7 etc

When you are in the start screen -
Go to Tools -> Record Keystrokes
Give a name for the Keystroke (for ex: opening a PDS) and then save
Do the task that is to be stored:
For ex : Start 3.4
Enter the PDS Name - MYID.MYPDS.LIBRARY

Go to Tools -> Stop Recording

Tools -> Convert Keystroke to Script
Select the Keystroke file and save the script name

To run the script ->
Go to Tools -> Run script

Lot of manual effort can be saved by having these scripts :)



Tuesday, March 15, 2011

CUT DISPLAY

To check the lines that are cut or to edit the same

Type CUT DISPLAY after using the CUT Command

Compare Session

To check for the changes made since the last save command -

Type COMPARE SESSION in the command window

Search members in multiple PDS

To search for members which are present in multiple PDS -

M MEMNAME
where MEMNAME - member name

Autotype

To have Autotype option in mainframes -
Type Start 3.4 in the command window
Type Keys in the command window and press enter
Set any PF key to AUTOTYPE and press F3 to save the options

Type any dataset name partially and press the PF key assigned :)
press the PF key again to check for other dataset names that can exist

This option will not work for GDG's and VSAM's

Line Command

We know many line commands like
A - After
B - Before
C - Copy
M - Move etc

But got to know a new one
X - This excludes the current line from display

Screenname

To have a unique name for each screen -

Suppose we have a file open in a screen and we want to name the screen as FILE1

Command -
SCRNAME FILE1