Subject: Re: newbie needs help with copying file with only FID From: "Hein" Date: Fri, 18 Mar 2005 20:35:59 GMT Newsgroups: comp.os.vms wrote in message news:1111154963.443146.69820@f14g2000cwb.googlegroups.com... >> I am tasked to get a bunch of files off of an optical device. When I >> set default to the device (seems each side of a platter is mounted as a >> file system.) I can do a directory and see only base system files. First and foremost you should doublecheck the mount command/options. Maybe they failed to use /MEDIA=CDROM? It _is_ an ISO 9660 CD is it? >> know there are many-many files on the platter and I have what I believe >> is the FID of each of those files. I do not have the file names - nor >> does a directory show them. So where to you get those file-id's from? What to they look like? >> Can someone suggest a means by which I might be able to copy all the >> files off of these platters to a regular disk? Well, if you are truly looking at file ID, then you can open those files by file ID. The only standard tool to have this is DUMP, I would encourage you to try that. You can possibly also use a 'FID-Abbreviated Name' and feed that to copy. Check out the "VMS Guide to File Applictions", Chapter 6.5 You could also roll your own program of cours, opening the file by ID. I'll include a sample that just gets records and outputs them to SYS$OUTPUT. You could DEFIN[/user] SYS$OUTPUT to a file, or PIPE the data elsewhere. Or you could readily use that program as a starting point and change to block-io (SYS$READ + SYS$WRITE) or rms record output (SYS$PUT instead of printf). Good luck, Hein. /* ** type_by_id.c print records from file where file passed by id. ** Based on: enter.C create directory entry for a file ID. ** ** Merry Xmass, Hein van den Heuvel, HP 12/2004 */ #include ssdef #include rms #include stdio #include string #include stdlib main(int argc, char *argv[]) { int i, status, sys$parse(), sys$open(), sys$connect(), sys$get(); char *p, expanded_name[256], resultand_name[256], buf[32768]; struct FAB fab; struct NAM nam; struct RAB rab; if (argc < 3) { printf ("Usage $%s \n", argv[0]); return 268435456; } else { fab = cc$rms_fab; fab.fab$l_fop = FAB$M_NAM; fab.fab$l_nam = &nam; nam = cc$rms_nam; nam.nam$b_nop = NAM$M_NOCONCEAL; nam.nam$l_rsa = resultand_name; nam.nam$b_rss = 255; nam.nam$l_esa = expanded_name; nam.nam$b_ess = 255; rab = cc$rms_rab; rab.rab$l_fab = &fab; rab.rab$l_ubf = buf; rab.rab$w_usz = 32767; status = sys$parse( &fab ); if (status & 1) { i = atoi (argv[1]); nam.nam$w_fid_num = (short) i; nam.nam$b_fid_nmx = (unsigned char) (i >> 16); nam.nam$w_fid_seq = (short) atoi ( argv[2] ); status = sys$open ( &fab ); if (status & 1) status = sys$connect ( &rab ); if (status & 1) status = sys$get ( &rab ); } while (status & 1) { buf[rab.rab$w_rsz]=0; printf ("%s\n", buf); status = sys$get ( &rab ); } if (status == RMS$_EOF) status = 1; return status; } } >> I dont believe I'm not seeeing files because of ACLs or any other >> permissions issues (though I should know for sure today and get needed >> perms if thats the cause) >> >> Your thoughts greatly appreciated. >> Thanks! >>