The HDF_SD_ENDACCESS function closes an SD dataset interface. Failure to close the interface can result in the loss of any changed or added SD data. This routine should be called once for each call to HDF_SD_START or HDF_SD_CREATE. After all SD dataset interfaces are closed, the HDF file can safely be closed with HDF_SD_END.
sd_id = HDF_SD_START('test.hdf', /CREATE)
;
O;
pen a new HDF file.
sds_id_1 = HDF_SD_SELECT(sd_id,0) ; Access the HDF file.
HDF_SD_ENDACCESS, sds_id_1 ; End access to any SD IDs.
HDF_CLOSE , HDF_OPEN , HDF_SD_CREATE , HDF_SD_ENDACCESS , HDF_SD_START