MainframeSupports
tip week 12/2004:

The ISPF EDIT command BNDS (or BOUNDS) is one of the very few EDIT commands that you can use both as a primary command and a line command. When you use it as a line command an extra line appears showing you the left and right margins for a lot of different EDIT commands. You can edit the BNDS line and by doing so, you change the left and right margins. When you use BNDS as a primary command you can change the settings for left and right margins, but you can't see the result.

Used as primary command BNDS works like this: BNDS 10 50 sets left margin as 10 and right margin as 50. BNDS * 40 doesn't change left margin, but set right margin to 40. * can also be used to leave right margin unchanged. BNDS without parameters sets margins to the default for the dataset type. Be careful when you change the margins because their settings are kept between EDIT sessions for datasets of the same dataset type. This can cause a lot of confusion and therefore it is a very good idea to reset the margins using primary command BNDS without parameters if you have altered the setting of the margins. The RESET command doesn't have any impact on the settings of the margins.

Changing the margins using BNDS first of all influences the FIND command and its relatives (CHANGE and EXCLUDE) because the search will only take place between the current margins unless you have explicitly specified margins for the command. If EDIT doesn't seem to find text that obviously appears in the data part of EDIT, it is because the margins has been changed somehow.

The interesting thing about changing the margins is that line commands <, >, ) and ( shifts text within the margins only. Text outside remains unshifted. I use this feature a lot and it is very useful. The SORT command only sorts data between the margins. You simply have to try it to before you will realize what happens. I haven't found any use for this feature but it has confused me several times. If you are a fan of the overlay line command O it is nice to know that it overlays between the margins only. This is also extremely useful. The margins also affect the way that line command TS, TF and TE works.

I have made this tip without any examples, because I think you will get a better feel of margins by trying the possibilities yourselves. If you have trouble making it work then feel free to contact me by clicking on the "Skriv til os" link on the left hand side of this page.

Previous tip in english        Sidste danske tip        Tip list