#include #include #include #include int sys$open(); int sys$close(); main() { int stat; int size; char fnm[] = "Z.DAT"; struct FAB fabblk; struct XABFHC xabblk; fabblk = cc$rms_fab; fabblk.fab$b_fac = FAB$M_GET; fabblk.fab$l_fna = (char *)&fnm; fabblk.fab$b_fns = strlen(fnm); fabblk.fab$l_xab = (char *)&xabblk; xabblk = cc$rms_xabfhc; stat = sys$open(&fabblk); printf("stat=%d\n",stat); size = xabblk.xab$l_ebk; if (xabblk.xab$w_ffb==0) size = size-1; printf("size=%d\n",size); stat = sys$close(&fabblk); printf("stat=%d\n",stat); };