Hp XP P9500 Storage Manuel d'utilisateur Page 125

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 182
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 124
When the datasetOpen function terminates successfully, it returns a handle that identifies the dataset
opened. The datasetHandle information is used as the argument of subsequent functions such as
datasetGet, datasetPut, or datasetClose. Do not change the datasetHandle value returned
by this function. If the datasetOpen function terminates unsuccessfully, it returns a value of -1. To
get the error code information, execute the datasetGetLastError function (see Acquiring Error
Information on page 127).
The datasetOpen function has the following restrictions:
Only one dataset at a time can be open within one process. When multiple datasets need to be
opened, the open dataset must be closed before another dataset can be opened. This restriction
does not apply to open-system files.
A dataset that is being accessed by the datasetFindFirstFile or datasetFindNextFile
function cannot be opened. The datasetFindClose function must be executed before the
dataset can be opened. This restriction does not apply to open-system files.
Reading Data
reclen = datasetGet (datasetHandle, buf, buflen)
The datasetGet function reads one record from the specified dataset (datasetHandle) and puts
the record into a buffer (buf) of length buflen. The datasetGet function extracts only the data
entity from each record and does not transfer the BL and RL bytes for variable-length records to the
buffer. Table 42 on page 125 shows the datasetGet arguments and return values.
Table 42 DatasetGet Function
DescriptionTypeValueItem
The datasetHandle value returned by the
datasetOpen function.
DATASET_HANDLEdatasetHandle
Argument
Buffer area for storing the read data.char *buf
Size of the buffer area. If the record is larger
than buflen or equal to zero, datasetGet
returns an error and does not transfer any
data to the buf.
longbuflen
Data entity size transferred to the buffer
long
reclen
Return value
Abnormal end-1
Figure 77 on page 126 shows the format requirements for variable-length records accessed by the
datasetGet function. Each variable-length block must start with the 2-byte BL field, and each
variable-length record must start with the 2-byte RL field. The datasetGet function automatically
extracts the data entities without the BL and RL fields.
HP StorageWorks P9000 Data Exchange User Guide 125
Vue de la page 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 181 182

Commentaires sur ces manuels

Pas de commentaire