4-102 DAS ACI Functions
601626-B
Figure 4-93 Example of the aci_qvolsrange Function
/* Query volser range */
int rc = 0;
char szBeginVolser[ ACI_VOLSER_LEN ] = "";
char szEndVolser [ ACI_VOLSER_LEN ] = "";
char szClient [ ACI_NAME_LEN ] = "";
int nCount = ACI_MAX_QUERY_VOLSRANGE;
int nActualCount = 0;
int nFor;
struct aci_volserinfo stVolsRange[ nCount ];
rc = aci_qvolsrange((char *) &szBeginVolser,
(char *) &szEndVolser,
nCount,
(char *) &szClient,
&nActualCount,
(struct aci_volserinfo *) &stVolsRange );
if( rc == -1 )
aci_perror("Command failed: ");
else
{
printf( "\nnext volser %s", szBeginVolser );
printf( "\ncount %ld", nActualCount );
printf( "\n%smore
data",d_errno==EMOREDATA?"":"no" );
for( nFor = 0; nFor < nActualCount; nFor++ )
printf( "\nvolser %s media %ld attrib %c",
stVolsRange[ nFor ].volser,
stVolsRange[ nFor ].media_type,
stVolsRange[ nFor ].attrib );
}