Gentlemen I have access to most relevant file types/systems except of ZFS (I have HFS)
I would like somebody who has both C license and ZFS files to compile the below code and run it with PARM='/some/ZFS/file' and send me or post the results. I need to know exactly how fldata sees that stuff. Thanks ZA [code] #include <stdio.h> #include <string.h> #include <stdlib.h> #define _XOPEN_SOURCE #include <fnmatch.h> #define _POSIX_SOURCE #include <sys/stat.h> #include <dirent.h> int displayzosfileattributes (FILE * file); main(int argc, char *argv[]) { int c; int d; int i; FILE * mypds; for ( c = 1 ; c < argc ; c++) { if (c > 0) { mypds = fopen(argv[c],"rb"); if (mypds == NULL) { fprintf(stderr, "XXXXXX-XXX - could not open %s\n", argv[c]); fclose (mypds); continue; }; printf ("FILE %s openned successfuly\n", argv[c]); i = displayzosfileattributes (mypds); fclose (mypds); } } return 0; } int displayzosfileattributes (FILE * file) { fldata_t fileinfo; int rc; char local_fname [FILENAME_MAX]; char decipher [20]; rc = fldata(file, local_fname, &fileinfo); if (rc != 0) { fprintf(stderr, "XXXXXX-XXX - fldata failed %d\n", rc); return rc; } printf ("FILE NAME: %s\n", local_fname); printf ("PDS GROUP: PO %d MEM %d DIR %d PDSE %d\n", fileinfo.__dsorgPO,fileinfo.__dsorgPDSmem,fileinfo.__dsorgPDSdir,fileinfo.__dsorgPDSE); if(fileinfo.__vsamRLS == __NORLS) {strcpy (decipher, "__NORLS"); } else if(fileinfo.__vsamRLS == __RLS) {strcpy (decipher, "__RLS"); } else if(fileinfo.__vsamRLS == __TVS) {strcpy (decipher, "__TVS"); } else {strcpy (decipher, ""); } printf ("VSAM GROUP: VSAM %d RLS %s\n", fileinfo.__dsorgVSAM,decipher); if(fileinfo.__vsamtype == __NOTVSAM) {strcpy (decipher, "__NOTVSAM");} else if(fileinfo.__vsamtype == __ESDS) {strcpy (decipher, "__ESDS"); } else if(fileinfo.__vsamtype == __KSDS) {strcpy (decipher, "__KSDS"); } else if(fileinfo.__vsamtype == __RRDS) {strcpy (decipher, "__RRDS"); } else if(fileinfo.__vsamtype == __ESDS_PATH) {strcpy (decipher, "__ESDS_PATH"); } else if(fileinfo.__vsamtype == __KSDS_PATH) {strcpy (decipher, "__KSDS_PATH"); } else {strcpy (decipher, ""); } printf ("VSAM TYPE: %s\n", decipher); printf ("PS GROUP: PS %d F %d V %d U %d S %d\n", fileinfo.__dsorgPS,fileinfo.__recfmF,fileinfo.__recfmV,fileinfo.__recfmU,fileinfo.__recfmS); printf ("HFS GROUP: HFS %d\n", fileinfo.__dsorgHFS); } [/code] ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN