---
name: "sdsetaccesstype"
section: "3hdf"
platform: "linux"
package: "libhdf4g-dev"
version: "4.0.2-6"
release: "Debian 2.0 (Hamm)"
platforms: ["linux"]
url: "https://new.carta.tech/sdsetaccesstype"
---

# sdsetaccesstype(3hdf)

- SDsetaccesstype (sfacct)

  - intn SDsetaccesstype(int32 sds\_id, int32 accesstype)

  *sds\_id*\
   	IN: The dataset ID returned from SDselect \
   *accesstype*\
   	IN: The type of I/O access for the dataset.

- Purpose

  Set the I/O access type for the dataset.

- Return value

     Returns SUCCEED if successful and FAIL otherwise.

- Description

  **SDsetaccesstype** sets the I/O access type for the dataset *sds\_id to* *accesstype.* The dataset must be an external element and the I/O access applies to the related external file only. *accesstype* can be  **DFACC\_SERIAL** for sequential I/O or **DFACC\_PARALLEL** for parallel I/O. HDF has only implemented the CM5 CMFS parallel I/O.

  Though access type is set for dataset *sds\_id,* it applies to the whole external file in which the dataset resides. If different access types are set on datasets of the same  HDF external file, unpredictable effects will result. It is also the users' responsibility to make sure the access type is appropriate for the files involved. For example, setting DFACC\_PARALLEL on a dataset contained in a serial file may result in slower I/O rates and sometimes failures.

- FORTRAN

  integer function sfacct(sds\_id, accesstype) \
   integer\*4 sds\_id, accesstype
