Products Downloads


French version


 


      

VADELIA

SADELIA

WADELIA

EADELIA


(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(B) (C/S)


Section for use

DECLARATION


Syntax

BREAK SeriesGlobalVarId EndBreak


SeriesGlobalVarId

SeriesGlobalVarId GlobalVarId



| GlobalVarId




EndBreak

*VIEW(ViewName) | *LIST(ListName) | *SQL |



*SQL(EntityName)


Description

Declaration of a control break for the fields SeriesGlobalVarId (with at least one field defined for the control break).


This instruction must be located in the DECLARATION part of the "BEGIN_BREAK BreakName" paragraph. The break fields must be global variables.


The parameter EndBreak represents the point at which scanning ended.


- If it is set to *VIEW, there will be a break at the end of the file corresponding to the view ViewName.

- If it is set to *LIST, the break will be at the end of the list ListName.

- If it is set to *SQL, the break will occur when an SQL access is made with *SQLCODE <> 0.

- If it is set to *SQL(EntityName), the break will be during an SQL access on the EntityName entity with a reading that has not been successfully completed.


The INIT_BREAK instruction is used to initialize the internal fields in the control break BreakName.


Example

* This program seeks and displays into a graphical list the last amendments to an
* insured person's agreement(s)


* Cursor declaration on AGREEMENTS entity

CURSOR CURS_AGR_INSNAME AGREEMENTS *COND(AINSNAME = :FINSNAME) *SORT(AAGREEMENT_NUM *ASC)

...

* In this program, the cursor is opened, the matching records are read,
* then the cursor is closed

OPEN_SQL_C CURS_AGR_INSNAME

READ_NX_SQL_C CURS_AGR_INSNAME

DO_WHILE *SQLCODE = *NORMAL

PROCESS_BRK BRK_AMENDMENT

PRESENT AGREEMENTS

READ_NX_SQL_C CURS_AGR_INSNAME

PROCESS_TOTAL BRK_AMENDMENT

REDO

CLOSE_SQL_C CURS_AGR_INSNAME

...

* Declaration of a control break AAGREEMENT_NUMBER

BREAK AAGREEMENT_NUMBER *SQL(AGREEMENT)

...

* In the TOTAL_PROCEDURE section of the break, the record is inserted into

* the graphical list AGREEMENT_LST

INSERT_ELT WIN_SEL_AGREEMENT.AGREEMENT_LST:LIST *END

* The inserted record is the last amendment's record


↑ Top of page

  • Aucune étiquette