Tuesday, June 18, 2013

Case Sensitive search

Find command that we have in mainframes is not a case sensitive search.

F ’FindMe’ will do a case insensitive search

But we have many scenarios wherein we need to search based on case, we can use the below command for the same -

F C’FindMe’ will do a case sensitive search

Search string which is not suffix or prefix of another word

Many a times we need to find the count of a particular word in a file, but this word can also be a prefix or suffix to another word. In order to find the word as a whole,

F 'STRING' WORD;

Here we will get only the occurences of the word 'STRING' in the file or code and no other words like 'UNSTRING' or 'STRINGS'

Only the lines which contain a particular string

If we need to see only the lines which have a particular string, then we can use the command

X ALL; F 'STRING' ALL

This command is especially useful when we need to review standards in a cobol program.

For example, if we need to check that "TO" clause is at a particular position -

X ALL; F 'TO' ALL

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