23 Jun, 2012

Usage of BNDS command in Mainframe

Mainframes BNDS

BNDS – Boundary

Here is the tutorial of how can we edit the PDS report file similar to how we manipulate in excel sheet.

People will think that they can’t edit any of the row in between their data for further processing in mainframe, but mainframe had an awesome command BNDS which makes our work simple, usually if people got this kind of task they will FTP the PDS to an excel sheet then they will make the changes and then upload it again to another PDS, but this will have some formatting issues.  Using BNDS we need not to go for any of the FTP process to get the file outside the mainframe emulator.  So please start practicing to use this super power command.

BNDS command:

The BOUND command is given in the scrolling, shift command area as given below.


=BNDS> <                                            >              


The Boundary limit will be set for the data change to happen between the limits mentioned using < and >, changes will happen only in between this boundary range.

Reseting BOUND:

To remove the bounds line from the display, use the D line command or the RESET primary command.

Line Commands:

  Bounds are used with scrolling, shift line commands ( “>”, “<”, “)”, “(” ),   text line commands ( “TS”, “TF”, “TE” ) and FIND , CHANGE , EXCLUDE , and  SORT commands.

The following topics, regarding the use of boundaries with other commands,  will be presented only if selected by number:                                

1.       Shifting columns right ( “)” ).    

2.       Shifting columns left ( “(” ).     

3.       Shifting data right ( “>” ).       

4.       Shifting data left ( “<” ).        

5.       Boundaries with Text commands.    

6.       Boundaries with FIND  

7.       Boundaries with CHANGE

8.       Boundaries with EXCLUDE

9.       Boundaries with SORT                                          

10.   Boundaries with Scrolling

Operation of Boundary Commands:

When using the right shift) line command, columns are shifted within the boundaries defined on the bounds line.  That is, only data that is within the bounds is considered for shifting, and the data outside of   the bounds is never shifted.  (Note:  The bounds are always in effect, whether or not the bounds line is being displayed.  In the example below the line is displayed so that you can see where the bounds are set).

       =BNDS>           <                                           >         

       )5 300   DATA1   DATA2   DATA3   (‘    ‘)   DATA4   DATA5              

   results after pressing enter                                                                 

       =BNDS>           <                                           >         

       000300   DATA1        DATA2   DATA3   (‘    ‘)   DATA4   DATA5         

·         DATA1 is not shifted because it is outside of the current bounds.(marked in white)

·         DATA2 through DATA5 is shifted right 5 columns. (which is marked in Red)   


No Responses to "Usage of BNDS command in Mainframe"

Subscribe to Comment follow up

Comment Form