Products Downloads


French version


 


ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(B) (C/S)


Section for use

All


Syntax

WRITE_DTAARA Dtaara


Dtaara

DtaaraId | *LDA


Description

This instruction is used to update a data field Dtaara.


In order to write to a data field (data area):

    • the data field name must be defined in the program by the DS instruction (ADELIA programs), or else by the DTAARA or LDA instruction (Visual Adelia programs),

    • the data field must be read in exclusive mode (except for the LDA); see the READ_DTAARA instruction.

Whenever this instruction is used, the data field is automatically unlocked after being updated.


Important note: In a Visual Adelia context, where this instruction applies to the LDA (WRITE_DTAARA *LDA), it can be used either in the client part or in a server block. Where it applies to a data area (declared using the DTAARA instruction), it can only be used in a Windows or AS/400 server block.


Note concerning the LDA: The LDA is read implicitly at the beginning of the program, and is written implicitly at the end of the program.

Data can be written in the LDA during the execution of the program (for example prior to calling another program); also refer to the DS (Local Data Area) instruction.



Example

* The name of the data communication field is defined as DTADAT.

* Date format is DDMMYY

*

DS DTADAT 6 DATE,1 DAY,1 MONTH,3 YEAR,5 MMYY,3

*

*********************

VERIFICATION 01

*********************

READ_DTAARA DTADAT *LCK

IF   *LOCKED = '1'

PREPARE_MSG 0090 Z_SELECT_DATE

ERROR

END

DATE = Z_SELECT_DATE

******************

VALIDATION 01

******************

WRITE_DTAARA DTADAT


↑ Top of page

  • Aucune étiquette