Adjusting Fixed-Width Regions

If you specify the layout of the file you are converting as fixed-width, Stylus Studio uses a default row length of 80 characters. (If you let Stylus Studio determine the file layout, Stylus Studio will attempt to determine record length based on the line terminating character, if any.) You might need to adjust the row length of a region if your input file uses a different row length, or when converting a line-oriented region, like the one shown in Figure 178, to fixed-width.

Figure 178. Line-Oriented Region

There are several ways to specify the row length for a fixed-width region:

  • Using the Row Length property - simply change the default value, 80, to the value that is appropriate for the current region and press Enter.
  • Dragging the document pane to the left or right - move the pointer to the right border of the document pane. When it changes shape, press and hold mouse button 1 and drag the right border of the grid until the input file's fields are aligned.
  • Holding the Shift key and pressing the right arrow (to add width) or the left arrow (to decrease width).

Each of these methods lets you explicitly set the row length. Alternatively, you can specify a Line Terminator character manually, as shown in Figure 179.

Figure 179. Manually Setting the Line Teriminator Character

Specifying a Line Terminator character means that the rows in the region can be of variable length, based on the where the specified Line Terminator character occurs in the record.



When you specify a Line Terminator character for a fixed-width region, the value shown in the Row Length property represents the value of the longest row in the region.


After converting the line-oriented region shown in Figure 178 to fixed-width, it looks like this:

Figure 180. Line-Oriented Region Converted to Fixed-WIdth

Figure 178 shows the same fixed-width file after it has been resized by dragging the document pane.

Figure 181. Resized Fixed-Width Region

Free Stylus Studio XML Training: