]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | * |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.1.1.1 1996/03/06 10:47:26 mclareni | |
6 | * Zebra | |
7 | * | |
8 | * | |
9 | #include "zebra/pilot.h" | |
10 | #if defined(CERNLIB_QMUIX) | |
11 | SUBROUTINE RZSTRIP(CHFILE,NST,NRS,LREC,ISTAT) | |
12 | * | |
13 | ********************************************************************** | |
14 | * | |
15 | * Routine called by RZOPEN and RZIODO for striped files | |
16 | * | |
17 | * CHFILE Name of the header description file (Ascii) | |
18 | * NST* Number of striped files | |
19 | * NRS* Number of records in each file | |
20 | * LREC* Record length in words of the files | |
21 | * ISTAT* return sattus | |
22 | * | |
23 | * Description of the /RZCSTR/ structure | |
24 | * ISLAST File number currently described in the structure | |
25 | * ISTRIP Current striped file number for file ISLAST | |
26 | * NSTRIP Number of striped files for ISLAST | |
27 | * NRSTRIP Number of records in each file of file ISLAST | |
28 | * | |
29 | * Example of a descriptor file (starts in column 1) | |
30 | * ============================ | |
31 | * | |
32 | * The first line after the ###FTRIPE line contains | |
33 | * nstrip, Total_number_of_records, Record_Length_in_words, File_size | |
34 | * | |
35 | * ###FSTRIPE-V001### | |
36 | * 5 3872 1024 15859712 | |
37 | * 775 3174400 /user/brun/hbook/hart.hbook_1 | |
38 | * 775 3174400 /user/brun/hbook/hart.hbook_2 | |
39 | * 775 3174400 /user/brun/hbook/hart.hbook_3 | |
40 | * 775 3174400 /user/brun/hbook/hart.hbook_4 | |
41 | * 772 3162112 /user/brun/hbook/hart.hbook_5 | |
42 | * | |
43 | * | |
44 | * Author : R.Brun CERN/CN | |
45 | * Written : 10.06.94 | |
46 | * | |
47 | ************************************************************************ | |
48 | * | |
49 | #include "zebra/rzcstr.inc" | |
50 | character*(*) chfile | |
51 | character*128 file | |
52 | character*10 strip | |
53 | integer istat,nst,nrs | |
54 | parameter (lunhead=121) | |
55 | * | |
56 | *----------------------------------------------------------------------- | |
57 | * | |
58 | istat=1 | |
59 | open(unit=lunhead,file=chfile,status='old') | |
60 | read(lunhead,'(a)',err=20,end=20)strip | |
61 | if(strip.ne.'###FSTRIPE')go to 20 | |
62 | read(lunhead,*,err=20,end=20)nst,nrtot,lrec,nwords | |
63 | if(nst.le.0)go to 20 | |
64 | nrs=(nrtot+nst-1)/nst | |
65 | if(nrs.le.1)go to 20 | |
66 | if(nst.ge.maxstrip)go to 20 | |
67 | do 10 i=1,nst | |
68 | read(lunhead,'(a)',err=20,end=20)file | |
69 | isl=index(file,'/') | |
70 | if(isl.eq.0)go to 20 | |
71 | rzsfile(i)=file(isl:) | |
72 | 10 continue | |
73 | rzsfile(maxstrip)=chfile | |
74 | istat=0 | |
75 | 20 close(lunhead) | |
76 | * | |
77 | end | |
78 | #endif |