6.0

Table Of Contents
Code Samples
27
Determine the proper page to print based on the width of the data in the data page
In this sample, the document contains three different pages and a runpage that manages execution of the
three pages.
Each document page has a different page width and accommodates data of a specific line length. The code
determines which document page to use with a given data page based on the length of line 5 of the data
page. The three page widths are 198 columns, 132 columns, and 80 columns.
Code
% =======================================================
% SELECT THE PROPER PAGE FOR THE CURRENT DATA
% =======================================================
if(trimleft(@(5,198,1))<>'')
execpage('198ColPage')
elseif()
if(trimleft(@(5,132,1))<>'')
execpage('132ColPage')
elseif()
execpage('80ColPage')
endif()
endif()