Mainframe Commands

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Datasets command

RES – RESET command to remove the warnings

S (Against a member) – Selects a file

S (in command) – Open a file in view mode; you can use wild card characters for opening a file; to
open a file in edit mode use ‘e’ at the end. E.g. S *ABC* e

V – View File Content

M – Member list

E – Edit file

I – Insert in file

Z – Compresses a dataset. Can be used to resolve the space issue with the dataset.

Start – New screen

COLS – display record length/column numbers. Type this command anywhere in number list

SAVE – save a member/file or changes

I5 – insert 5 lines in a file. Type this command anywhere in number list

Space – adds a blank line in a file

C – copy a single line

Cn – copy n lines

CC – copy a block of lines

A – paste copied data after a line

B – paste copied data before a line

Cancel or F12 – revert the last saved changes

UC – line will be converted to upper case

LC – line will be converted to lower case

F – Finds an string in a file, press f5 for next string

C String1 String2 – Replace string1 with String2

C ALL String1 String2 – Replace all occurances of String1 with String2

L – Locate file

Refresh – REF or refresh a file list

R, RR, Rn – Repeat command, similar to copy

CAPS ON/OFF – all typed text will be written in upper case when CAPS ON
F7 – up, F8 – down, F10 – left, F11 – right. Type M in command and use navigation keys to move to
very last, very first, extreme right or extreme left. You can also use the TOP and BOTTOM
commands for the same.

CREATE – Create a member of copied lines

Copy – paste from one member to another – copy line/lines using C or CC commands, type CUT in
command line then open a new member, in command type PASTE and use A / B for pasting line
before or after.

M or MM – used to move a line or block of lines (Similar to cut and paste in Windows)

PDS Commands:

B – Browse Command – opens a file in read only mode. Similar to V (view command)

C – Copy file, go to PDS by M command, and write C at left side of the file to be copied and press
enter, copy entry panel will be opened. Enter the PDS name where you want to copy, if PDS already
exists, it will be copied in it or else new PDS will be created. Enter the member name as well if you
want to copy a file with different name than the existing one.

M – Move a file

R – Rename a member name, after renaming a file hit REF command to reflect a new name

SRCHFOR | search-for | search-forE – Searches for a string in members. It is also available in utilities
option 14 and 15.

SUPERC AND SUPERCE – Utilities option 12 and 13 to compare datasets

Sort column_name – Sort the data according to the specified column in ascending order; you can
also point to specific column and hit enter to sort the data

How to resolve the space issue with the PS and PDS:

Option1 – Compress the dataset using z command against the PDS

Option2 – Create a new PS or PDS with higher space allocation and copy the data/files in it.

Copying a data of a member to another:

Create .zf .zl new_member_name -> It creates a new member copying data from first line to last line.

SCNAME – Changes the default screen name. E.g. SCRNAME PROD1

Sub – submits a job/JCL in mainframe


S;st – takes you to spool

Create JCL_NAME – creates a copy of open JCL

Open a JCL to be copied and type create jcl_name in command to copy opened JCL to a newly
defined jcl name.

Copy jobcard – Creates a copy of job card.

Open a JCL, run copy jobcard and type a in very first line to append the jobcard.

Epdf ‘file_name’ – Opens a file in edit mode from any screen

Epdf ‘file_name’ view - Opens a file in view mode from any screen

Epdf ‘file_name’ browse - Opens a file in browse mode from any screen

RAFC

1. Go to commands from TSO (Option 6)


2. ‘listuser’ command shows own user profile
3. ‘lu userid’ command shows specified user ids user profile.
4. ‘lg group_name’ command shows information about the specified group.

Command Function
<  Data shift left
shifts a single line of program source code to the left
without affecting the program labels or comment ie. data
from column one to the first blank and data following
several blanks are not moved. May be specified with a
number identifying the distance to move (default 2).
<<  Block data shift left
All of the lines in the block are affected as if you
typed individual data shift left commands. May be
specified with a number identifying the distance to move
(default 2).
>  Data shift right
As for data shift left but the opposite direction. May be
specified with a number identifying the distance to move
(default 2).
>>  Block data shift right
( Column shift left
Works similarly to data shift left but moves everything
within the bounds, nothing stays fixed in place. May be
specified with a number identifying the distance to move
(default 2).
(( Block column shift left
) Column shift right
)) Block column shift right
A After
used with copy, move, or paste to specify the line after
which the copied/moved lines are to be inserted.
B Before
used with copy, move, or paste to specify the line before
which the copied/moved lines are to be inserted.
BNDS Display bounds above this line
Displays the current boundary positions which can be
changed by tying < and > in the new boundary positions
that you require.
C Copy
Copies this line either to another place within the
current file (using a, b, or o to identify destination)
or to another file (using the create, replace, or cut
commands). Can be specified with a number to indicate
that multiple lines are to be copied.
CC Block copy
COLS Display the column ruler above this line
D Delete
Deletes this line from the file. Can be specified with a
number to indicate that following lines are also to be
deleted.
DD Block delete
F Display the first excluded line
Can be specified with a number to display more than one
excluded lines. This command is only valid on excluded
lines.
I Insert a new line after this one
Can be specified with a number to insert multiple lines.
L Display the last excluded line
Can be specified with a number to display more than one
excluded lines. This command is only valid on excluded
lines.
LC Convert all text on this line to lower case
Can be specified with a number to convert more than one
line to lower case.
LCC Block convert to lower case
M Move
Works the same as copy except that the lines are removed
from their current location.
MM Block move
MASK Display the mask line above this one
The mask defines the default content for inserted lines.
O Overlay (used with copy and move to specify the line into
which the copied/moved line is to be inserted - only
spaces are replaced). Can be specified with a number to
indicate that following lines are also to be overlaid.
OO Block overlay (the lines to be copied/moved are inserted
into the block as many times as they will fit)
R Repeat - create a duplicate of this line
Can be specified with a number to indicate that
additional duplicate lines are to be produced.
RR Block repeat
Can be specified with a number to indicate that multiple
duplicates of the block are to be produced.
S Show the excluded line that has the least indentation
Can be specified with a number to display more than one
excluded lines. When multiple lines are displayed they
may not be together. This command is only valid on
excluded lines.
TABS Show the tab settings above this line
Hardware tabs positions are indicated by asterisks (*)
and software tabs by hyphens (-) or underscores (_).
TE Text Entry mode - allows bulk insert following this line
You can start entering data without paying any attention
to lines as the text will wrap automatically. Press the
enter key to exit from text entry mode.
TF Text flow - flows the text between the margins for this
line and following lines until a blank line is found, the
indentation changes, or a special character (period,
colon, ampersand, less than, or form feed) is found in
the first column.
TJ Text Join - merges this line with the following one
TS Text split - splits this line in two
You need to position the cursor at the position on the
line where you want the split to occur.
UC Convert all text on this line to upper case
Can be specified with a number to convert multiple lines.
UCC Block convert to upper case
X Exclude this line from the display
Can be specified with a number to exclude multiple lines.
This command is useful when you need to view two blocks
of data that are in different locations within the file,
just exclude the intervening data from the display.
XX Block exclude
. label assignment
You can assign a label to any non-excluded line by typing
a period followed by the label name. The label can then
be used to identify the line in primary commands. You
cannot start labels with "z" as these labels are reserved
for system use.

You might also like