Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

about keyword

Former Member
0 Likes
516

wat is use of keywords reserve and back.with example please.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
494

hi,

RESERVE

Basic form

RESERVE n LINES.

Effect

If there is not enough space left on the current page for at least n lines, this statement starts a new page. n can be a constant (1,2,3,...) or a variable.

Notes

Before starting a new page, the END-OF-PAGE processing is executed. This differs from NEW-PAGE .

If the RESERVE statement does not trigger a new page, output is continued on the current page.

Use BACK to return to the first line you can display after RESERVE .

BACK

Basic form

BACK.

Effect

Returns output position to the first line of the current page after the TOP-OF-PAGE processing.

When used in connection with RESERVE x LINES , the statement returns the output position to the first output line after RESERVE .

Example

DATA: TOWN(10) VALUE 'New York',

CUSTOMER1(10) VALUE 'Charly',

CUSTOMER2(10) VALUE 'Sam',

SALES1 TYPE I VALUE 1100,

SALES2 TYPE I VALUE 2200.

RESERVE 2 LINES.

WRITE: TOWN, CUSTOMER1,

/ CUSTOMER2 UNDER CUSTOMER1.

BACK.

WRITE: 50 SALES1,

/ SALES2 UNDER SALES1.

Using the positioning in WRITE in column 50, data not yet output is not overwritten, but the sales volume is output after the customer names.

regads,

keerthi

wat is use of keywords reserve and back.with example please.

2 REPLIES 2
Read only

p291102
Active Contributor
0 Likes
494

Hi,

Effect

If there is not enough space left on the current page for at least n lines, this statement starts a new page. n can be a constant (1,2,3,...) or a variable.

Notes

Before starting a new page, the END-OF-PAGE processing is executed. This differs from NEW-PAGE.

If the RESERVE statement does not trigger a new page, output is continued on the current page.

Use BACK to return to the first line output after RESERVE.

Note

Performance:

The runtime required to execute a RESERVE statement is approx. 1 msn (standardized microseconds

Basic form

BACK.

Effect

Returns output position to the first line of the current page after the TOP-OF-PAGE processing.

When used in connection with RESERVE x LINES, the statement returns the output position to the first output line after RESERVE.

Example

DATA: TOWN(10) VALUE 'New York',

CUSTOMER1(10) VALUE 'Charly',

CUSTOMER2(10) VALUE 'Sam',

SALES1 TYPE I VALUE 1100,

SALES2 TYPE I VALUE 2200.

RESERVE 2 LINES.

WRITE: TOWN, CUSTOMER1,

/ CUSTOMER2 UNDER CUSTOMER1.

BACK.

WRITE: 50 SALES1,

/ SALES2 UNDER SALES1.

Using the positioning in WRITE in column 50, data not yet output is not overwritten, but the sales volume is output after the customer names.

Notes

If you use a '/' with the first WRITE after the BACK statement, this starts a (usually unwanted) new line.

BACK in the TOP-OF-PAGE processing positions the cursor after the standard header. Subsequent WRITE statements also overwrite the lines output under TOP-OF-PAGE.

Note

Performance:

The runtime required to execute a BACK statement is about 1 msn (standardized microsecon

Thanks,

Shankar

Read only

Former Member
0 Likes
495

hi,

RESERVE

Basic form

RESERVE n LINES.

Effect

If there is not enough space left on the current page for at least n lines, this statement starts a new page. n can be a constant (1,2,3,...) or a variable.

Notes

Before starting a new page, the END-OF-PAGE processing is executed. This differs from NEW-PAGE .

If the RESERVE statement does not trigger a new page, output is continued on the current page.

Use BACK to return to the first line you can display after RESERVE .

BACK

Basic form

BACK.

Effect

Returns output position to the first line of the current page after the TOP-OF-PAGE processing.

When used in connection with RESERVE x LINES , the statement returns the output position to the first output line after RESERVE .

Example

DATA: TOWN(10) VALUE 'New York',

CUSTOMER1(10) VALUE 'Charly',

CUSTOMER2(10) VALUE 'Sam',

SALES1 TYPE I VALUE 1100,

SALES2 TYPE I VALUE 2200.

RESERVE 2 LINES.

WRITE: TOWN, CUSTOMER1,

/ CUSTOMER2 UNDER CUSTOMER1.

BACK.

WRITE: 50 SALES1,

/ SALES2 UNDER SALES1.

Using the positioning in WRITE in column 50, data not yet output is not overwritten, but the sales volume is output after the customer names.

regads,

keerthi