Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(B) (C/S)


Warning: In the case of ADELIA programs, this instruction is not compatible with C generator.


Section for use

All


Syntax

INIT_BREAK ControlBreakName


Description

This instruction is used to initialize the internal fields in the control break ControlBreakName.


Example

INIT_BREAK Brk_ItemId


Other example:


* The program below allows to search and create in a memory list

* the latest endorsements of contracts for a given customer

* Break is defined on CU_CONTRACT_NB field

* Declaration of a cursor on a customer's CONTRACTS whose name is ZA_CUST_NAME

CURSOR  CURS_CON_CUSNAM  CONTRACT  *COND(CU_CUST_NAME = :ZA_CUST_NAME) *SORT(CU_CONTRACT_NB, CU_CONT_NB_UPD *ASC)

...

* In program, open the cursor, read the corresponding records, then close

OPEN_SQL_C CURS_CON_CUSNAM


INIT_BREAK BRK_CONTRACT_UPD


READ_NX_SQL_C CURS_CON_CUSNAM

DO_WHILE *SQLCODE = *NORMAL

PROCESS_BRK BRK_CONTRACT_UPD

READ_NX_SQL_C CURS_CON_CUSNAM

PROCESS_TOTAL BRK_CONTRACT_UPD

REDO

CLOSE_SQL_C CURS_CON_CUSNAM

...

* In paragraph BREAK_TOTAL of the break, a record is added into the LSM_CONTRAT memory list

INSERT_ELT LSM_CONTRAT

* The added record is the one in the latest contract endorsement



↑ Top of page

  • Aucune étiquette