Chapter Contents

Previous

Next
cmsfcent

cmsfcent



Returns Century Indicator after a Call to cmsffind or cmsfnext

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
CAUTION
EXAMPLE
RELATED FUNCTIONS


SYNOPSIS

#include <cmsio.h>

int cmsfcent(struct EXT_FILEINFO *info)


DESCRIPTION

cmsfcent returns the century indicator of the date last updated for the file last found by either cmsffind or cmsfnext. The EXT_FILEINFO structure pointed to by info will contain the date for the last match found by cmsffind or cmsfnext.


RETURN VALUE

cmsffind returns 1 if the file was last updated in 19yy, 2 if the file was last updated in 20yy, or -1 if the century cannot be determined.


CAUTION

The century indicator can only be provided for VM/ESA Release 2.2.0 and later.


EXAMPLE

int main(void)
{
 int exitrc = 0
 int century_ind;
 struct EXT_FILEINFO info;
 /*   Type the names of all the files on the C disk whose   */
 /*   filenames have an "A" as the second character, whose */
 /*   filetype is "EXEC" followed by any characters, and   */
 /*   whose filemode number is 2.                          */
 match = cmsffind(&info, "%A* EXEC* C2");  
 while(exitrc == 0)
  {
   printf("fileid  : %20.20s  ", info.Fileid);
   printf("date    : %s    time: %s \n", info.Date, info.Time);
   century_ind = cmsfcent(&info);
   if (century_ind == 1)
       printf("Century : 19yy\n......\n"); /* 1 = 19yy */
   else
       printf("Century : 20yy\n......\n"); /* 2 = 20yy */
   exitrc=cmsfnext(&info);
  };

 cmsfquit();
 return(0);
}


RELATED FUNCTIONS

cmsffind, cmsfnext


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.