Routines (alphabetical) > Routines: H > HDF-EOS Routines > EOS_SW_WRITEDATAMETA

# EOS_SW_WRITEDATAMETA

This function writes field metadata for an existing data field. This is useful when the data field was defined without using the swath API. Note that any entries in the dimension list must be defined through the EOS_SW_DEFDIM function before this function is called.

Note: Array ordering of variables used or returned by this routine changed in IDL 5.5. Programs written for versions of this routine prior to IDL 5.5 may need to be modified to work correctly with the current version.

## Examples

In this example, we write the metadata for the “Band_1” data field used in the swath:

status = EOS_SW_WRITEDATAMETA(swathID, "Band_1", $

"GeoTrack,GeoXtrack",5)

## Syntax

Result = EOS_SW_WRITEDATAMETA(swathID, fieldname, dimlist, numbertype)

## Return Value

Returns SUCCEED (0) if successful and FAIL (–1) otherwise.

## Arguments

### swathID

Swath id (long) returned by EOS_SW_CREATE or EOS_SW_ATTACH.

### fieldname

Name of field (string).

### dimlist

The list of data dimensions defining the field (string).

### numbertype

The number type of the data stored in the field (long).

## Keywords

None

## Version History

5.2 | Introduced