z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


BOUNDS—Set or Query the Edit Boundaries

z/OS ISPF Edit and Edit Macros
SC19-3621-00

The BOUNDS macro command sets the left and right boundaries and saves them in the edit profile.

The BOUNDS assignment statement sets or retrieves the left and right boundaries and places the values in variables.

Syntax

Read syntax diagramSkip visual syntax diagram
Macro command syntax

>>-ISREDIT--+-BOUNDS-+--+-----------------------------+--------><
            +-BOUND--+  '-+-left_col-+--+-right_col-+-'   
            +-BNDS---+    '-*--------'  '-*---------'     
            +-BND----+                                    
            '-BOU----'                                    

left_col
The left boundary column to be set.
right_col
The right boundary column to be set.
Read syntax diagramSkip visual syntax diagram
Assignment statement syntax

>>-ISREDIT--(var1,var2)-- = --BOUNDS---------------------------><

Read syntax diagramSkip visual syntax diagram
>>-ISREDIT--BOUNDS-- = --+-----------------------------+-------><
                         '-+-left_col-+--+-right_col-+-'   
                           '-*--------'  '-*---------'     

var1
A variable containing the left boundary. If the variable is VDEFINEd in character format, it should be defined with a length of 5. The returned value is left padded with zeros. For compatibility with earlier releases of ISPF, a length of 3 or 4 is allowed if no data loss will result.
var2
A variable containing the right boundary. If the variable is VDEFINEd in character format, it should be defined with a length of 5. The returned value is left padded with zeros. For compatibility with earlier releases of ISPF, a length of 3 or 4 is allowed if no data loss will result.
left_col
Same as macro command syntax.
right_col
Same as macro command syntax.

Description

The BOUNDS macro command provides an alternative to setting the boundaries with the BOUNDS line command or primary command; the effect on the member or data set is the same.

The column numbers are always data column numbers (see Referring to column positions). Thus, for a variable format data set with number mode on, data column 1 is column 9 in the record.

See Edit boundaries for more information, including tables that show commands affected by bounds settings and default bounds settings for various types of data sets.

Return codes

0
Normal completion
4
Right boundary greater than default, default right boundary used
12
Invalid boundaries specified
20
Severe error

Examples

To set the boundaries to their default values, type:
ISREDIT BOUNDS
To set one boundary while leaving the other value unchanged, type an asterisk (*) for the boundary to be unchanged. For example, to set the left boundary from the variable &LEFT, and leave the right boundary unchanged, type:
ISREDIT BOUNDS &LEFT *
To set the left boundary to 1, leaving the right boundary unchanged:
ISREDIT BOUNDS = 1 *
To save the value of the left boundary in the variable &LEFT:
ISREDIT (LEFT) = BOUNDS
To save the value of the right boundary in the variable &RIGHT:
ISREDIT (,RIGHT) = BOUNDS
To evaluate numbers for bounds when NUMBER COBOL is on, or NUMBER is on for a variable blocked data set:
/* REXX - Set physical bounds in a macro.  Input is 2 column       */
/*        numbers and result is bounds set on that physical column */
/*        regardless of number setting.  Bounds will not be set    */
/*        within line number areas.  This sample has minimal       */
/*        error checking.                                          */
Address isredit
'MACRO (LEFT,RIGHT)'                  /* Take left and right bounds*/
'(NUMBER,COBOL) = NUMBER'             /* Get number status         */
Parse Var cobol . cobol .             /* Get just left status      */
'(RECFM) = RECFM'                     /* Get record format         */
'(DW) = DATA_WIDTH'                   /* Get data width            */
If left='' Then left = 1              /* Assume col 1 for left     */
If right='' Then right = dw           /* Assume datawidth for right*/
shift = 0                             /* Assume no left seq numbers*/
If cobol='COBOL' Then                 /* If numbered as cobol      */
  shift = 6                           /*   Account for sequence num*/
Else If number='ON' & recfm='V' Then  /* If numbered variable block*/
  shift = 8                           /*   Account for sequence num*/
right = max(1,right - shift)          /* Adjust right column       */
right = min(right,dw)                 /* Adjust right column       */
left  = max(1,left  - shift)          /* Adjust left column        */
left  = min(left ,dw)                 /* Adjust left column        */

'BOUNDS 'min(left,right) max(left,right) /* Issue bounds command   */
'PROFILE'

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014