From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,a1ece9ffdee9cde5 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,a1ece9ffdee9cde5 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1990-05-01 07:01:05 PST Path: gmdzi!unido!mcsun!uunet!cs.utexas.edu!samsung!uakari.primate.wisc.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!haven!decuac!shlump.nac.dec.com!shodha.dec.com!csc32.enet.dec.com!s_johnson From: s_johnson@csc32.enet.dec.com (My name is...) Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: Desperately seeking help with VAXCRTL fopen Message-ID: <1010@shodha.dec.com> Date: 1 May 90 14:01:05 GMT Sender: news@shodha.dec.com Followup-To: comp.os.vms Organization: Digital Equipment Corporation Xref: gmdzi comp.os.vms:23788 comp.sys.dec:2439 Posted: Tue May 1 15:01:05 1990 In article <2816@teda.UUCP>, bob@teda.UUCP (Bob Armstrong) writes... > The >question is, how do I find the FAB that fopen is using so that I can determine >the cause of the error ? Is there another way to find the STV field from >the last fopen ? > #include stdio #include rab; #include fab; #include nam; #define fcb_l_rab 0x0f4; /* This offset might change depending on vms version. It works for 5.4. */ struct FAB *fabptr; struct RAB *rabptr; struct NAM *namptr; FILE fp; int *mp; main() { int fn = 0; fp = fopen("stuff.dat","w"); mp = fp; rabptr = *mp + fcb_l_rab; printf("RAB.BID = %x.RAB.BLN = %x. RAB.FAB = %x. \n", rabptr->rab$b_bid,rabptr->rab$b_bln,rabptr->rab$l_fab); fabptr = rabptr->rab$l_fab; printf("FAB.BID = %x.FAB.BLN = %x. FAB.NAM = %x. \n", fabptr->fab$b_bid,fabptr->fab$b_bln,fabptr->fab$l_nam); namptr = fabptr->fab$l_nam; printf("Per NAM block, file name string is %.*s. \n", namptr->nam$b_rsl,namptr->nam$l_rsa); }