You are here: Home > Knowledge Refreshers

KR edition 209 - 211

KR-209* Disabling the Edit/View entry panel
Hi everyone,
Does the 'edit/view entry panel' annoy you by 'popping up' whenever you try to edit/view a PS file? Have you wished you had a 'pop-up blocker' activated for the edit/view entry panel? :)

Disabling the Edit/View entry panel:

When you try to open a PS file in edit/view mode, you get the Edit/View entry panel which allows you to specify Initial Macro, Profile Name, Format Name etc. It can be annoying most of the times (if you generally don’t use the options available in the entry panel), because it presents another screen to be closed before you are taken to the edit or view session.

Is there a way to disable this panel, so that we are taken directly to the edit or view session? Of course, there is.

After entering the dataset name in option 3.4, in the DSLIST screen, select the ‘Options’ drop down and select 'DSLIST Settings', as shown below:

Deselect the ‘Display Edit/View entry panel (*)’ option. Now, whenever you try to open a PS file in edit/view mode, you will be skipping the Edit/View entry panel and will be directly taken to the file contents.

You can revert back the setting by selecting the ‘Display Edit/View entry panel (*)’ option.

Extra Bytes: The Edit/View entry panel can be used for running initial macros, for instance we can use ‘Initial Macro’ option to specify a macro that is to be executed, or to specify commands to be executed (eg. ‘F ABC’), before the data is displayed for the edit or view session. So do we not have an option to run initial macros or execute commands in 'PDS member' before the data is displayed? We can do that by providing the macro or command, in the ‘Prompt’ field next to the PDS members.

KR-210* Counting number of records
Hi everyone,
We frequently encounter situations where we need to count the number of records in a file, don't we? Here is an easy way to do just that through JCL.
Idea for this KR contributed by SS


The input file is to be given in SORTIN, and the output (count of the records) will appear in SORTOUT.

Lets look into the parameters used in the sort card a little deeper:

  • The OUTFIL statement is used to write records to an OUTFIL DD. There are two different ways to do this - using FNAMES or FILES keywords.

  • Eg 1. OUTFIL FNAMES=COUNT,REMOVECC,NODETAIL - In this case the output will be written to the DDNAME assigned to the FNAMES keyword (DDNAME should be 'COUNT' for the output file, in this eg.)

  • Eg 2. OUTFIL FILES=1,REMOVECC,NODETAIL - In this case the output will be written to the DDNAME in the form SORTOFxx (DDNAME should be 'SORTOF1' in this eg.)

  • If neither the FNAMES nor FILES parameters are specified to give the ddname (as in OUTFIL REMOVECC,NODETAIL), the default ddname of SORTOUT is used.

  • REMOVECC removes the ANSI carriage control characters. Without REMOVECC, the output would look like '100000041' for an input file with 41 records (where '1' is the carriage control). With REMOVECC the output would look like '00000041'.

  • By default, DFSORT/SYNCSORT would write the data lines (records of the input file) to the output data set. NODETAIL tells DFSORT/SYNCSORT not to write the data lines along with the count in the TRAILER1 line.

  • TRAILER1 writes a report trailer at the end of the report. In this case, it writes one record to SORTOUT, with count of the number of records in the input data set.
    M11 is an edit mask, that tells DFSORT to use leading zeros. LENGTH=8 says the length of the output field is 8 bytes.

Extra bytes: PGM=ICEMAN and PGM=SORT are ways to invoke the primary sort product at your mainframe site. If DFSORT (an IBM product) is the primary sort product, PGM=ICEMAN or PGM=SORT will invoke DFSORT, if the primary sort product is SYNCSORT... (yeah, you guessed it :) )

KR 211* - SORT in ISPF - already detailed in an earlier KR.

Have you always wanted to learn REXX, but never got the time/ oppurtunity to learn it? Well, your wish has been granted! Starting next KR, we will have a series on REXX by SS - 'REXX in 6.5 hours'. Over to SS. :)

Go back to the main contents page