You are here: Home > Knowledge Refreshers

KR edition 184 - 186


KR-184: the FILter SDSF command

A tip contributed by Gowri on SDSF...

The FILTER command in SDSF:

FILTER is the command for filtering the display in spool.
We can use FILTER or FIL on the command line in SDSF (ST option) to limit the number of rows (jobs) that appear in the spool.

  • FIL MAX AB*
    where MAX refers to the MAX-RC column in the spool. This commands filters out all jobs that abended in the spool (i.e. MAX-RC would be ABEND - so we give MAX AB*)

  • FIL MAX CAN* will give jobs that were cancelled (MAX-RC would be CANCELED)

  • FIL MAX 'CC 0000' would filter out and display jobs in the spool that had MAXCC 0

  • FIL JOBNAME XXXX would give jobs in the spool that had JOBNAME as XXXX (we can filter on any of the columns that appear in the spool).

To come out of the filter mode, use FIL OFF.

Even operators can be used. For example: FIL MAX GT 'CC 0004' will display all jobs with a return code greater than 4 (by default if we don't specify an operator EQ will be used). For more operators and functionalities of the FIL command do check out the online help in SDSF.


KR-185* (text editing commands)

There are some interesting commands (other than cut, move, shift etc.) that can be used while editing members in ISPF; we'll take a look at some in this edition...

Idea for this KR triggered by Venkat;

The following are some line commands that can be used while working on flat files (in edit or view more). They should be entered on the line number column (i.e. the column where we type "c" for cutting, "m" for moving lines etc.).

  • LC - lowercase. Changes text to lowercase. Give LCn to change n lines to lowercase or use the block command LCC for block processing.

  • UC - uppercase. Similar to the LC command.

  • TS - text split. Can be used to split a line at the cursor position. Everything following this will come below the current line. If we type TS3 the text will be split and three new lines will be inserted below as well. We can set bounds as well to determine upto which column we want the TS option to work upon.

  • TF - text flow. This command tries to form proper praragraphs from short sentences which appear on consecutive lines. Give TFnn to specify the column upto which the paragraph should flow to (this is similar to the wordwrap feature in notepad).

Note: You might be tempted to use these commands while coding but they may spring a few surprises! These commands are mainly for simple text processing (to be used like tools in text editors). Try them out on sample files to get a feel of how they work - and of course the invaluable help will provide more info on these line commands.


KR-186* (.ZF/ZL & saving in VIEW mode)

A couple of tips contributed by Shankar and Ashish on ISPF commands:

What is .ZF and .ZL?
In KR-49 we discussed about creating and using labels (bookmarks) within flat files.

To recap: We place a label by saying .a or .b on the line command on the line we want to label. Then we can jump to this label by using the command L .A (which means "Locate the label .A").

  • .ZF and .ZL are predefined labels which map to the first and last lines of the file respectively. We are allowed to use .ZF and .ZL just like other labels.

  • A handy use of labels is to selective replace text in a specific range:
    C old-text new-text ALL .A .B
    (Here all the old-text is changed to new-text between labels .A and .B)

  • Labels can be used in other commands like sort, find etc. as well (anywhere where we need to specify a range of lines).

Saving changes in VIEW MODE:
There are many instances where we enter a PDS in view mode, make some changes and then want to save the changes. Instead of quitting and opening the file again in edit mode we can use the REPLACE command. Type the following on the command line:
REPLACE .ZF .ZL mem-name
Then confirm the change to be made. mem-name is the member in which you are in VIEW mode. This command basically means that you want to replace from first to last line the existing member with the new one.


Go back to the main contents page