Products Downloads


French version


 


ADELIA

      

      

      

      

(I/B)






Section for use

All


Syntax

DS Id SeriesDSFields


Description

This instruction is used to define a data structure named Id .

The name is mandatory and must not exceed 10 characters.

A DS name cannot be described as a numeric variable or as a TIMESTAMP variable (DATE, TIME or TIMESTAMP).

Data structures can be used like alphanumeric variables.

In such cases, it must be declared in the data environment:


Name

Guide word

Ln

Dec

Reference

DSname

W_structure

n


*NODEF


Then, you can declare the guide word of the variable as the name of the DS, even when the guide word contains more than 6 characters.


The beginning variable position can be indicated after the fields.

If data structures are to be defined for "packed" or binary (4 bytes) fields (file fields, parameters), indicate the codes P or B after the beginning position. Any numeric field placed in a DS, without having affixed the code P or B after it, will be defined in extended mode.

Click here for the explanation of the SeriesDSFields element.


The same field cannot be used in several data structures.

The DS length can be indicated; this should be placed after the DS name. In this way, a data communication field (Data Area) is defined.



Example

* Let's assume that you have an alphanumeric variable W_ADDRESS with length 95.

* For this field to be broken down as: W_ADDR_1 (alpha 30), W_ADDR_2 (alpha 30),

W_ZIP_COD (numeric of 5 ;0) and W_CITY (alpha 30)

* you must write:

DS DSADDR W_ADDRESS,1  W_ADDR_1 ,1  W_ADDR_2 ,31  W_ZIP_COD,61 W_CITY,66

* or:

DS DSADDR W_ADDR_1 ,1  W_ADDR_2 ,31  W_ZIP_COD,61  W_CITY,66  W_ADDRESS,1


See also the list of 4GL instructions by topic

↑ Top of page

  • Aucune étiquette