>C_TITLE:   CRQLAB:  Create PDS label for NIMS Qube (Cube) FileC GC_ARGS:  LABEL  (1024) BYTE [O] PDS label string to be passed to OPCUBE0C	 NAXES         I4   [I] Number of axes in Qube?C	 LENAX  (*)    I4   [I] Axis dimensions, first varies fastest,C	 AXNAME (*)    CHAR [I] Name for each axis0C	 CORNAM        CHAR [I] Name for core variable=C	 CORTYP        CHAR [I] Core variable item type:  {INTEGER,1C				 UNSIGNED_INTEGER, REAL, COMPLEX, CHARACTER}:C	 IBYTES        I4   [I] Core variable item size in bytes:C	 IEXCL         I4   [I] Exclude/null/fill value for core;C	 DESCR         CHAR [I] Descriptive text for NOTE keywordGC	 IR            I4   [O] Return code: >0 last used label byte, pre-ENDC					     -1 invalid parameterC&C_KEYS:    FILE_LABEL, QUBE, CUBE, PDSC KC_DESCR:   Creates PDS label string to be passed to OPCUBE which will writeGC	   it to the file and extract essential structural items for the FCB.@C	   Calls CRELAB to initialize label and add SFDU, RECORD_TYPE,DC	   RECORD_BYTES and LABEL_RECORDS statements. Adds FILE_TYPE=QUBE,DC	   STORAGE_MODE=FULL and STORAGE_ORDER=BAND_SEQUENTIAL statements.GC	   Constructs statements assigning values from the arguments to AXES,BC	   AXIS_ITEMS, CORE_ITEMS, AXIS_NAME, CORE_NAME, CORE_ITEM_TYPE,8C	   CORE_ITEM_BITS, CORE_EXCLUDE_VALUE & NOTE keywords.C 1C_CALLS:   CRELAB, ADDKEY, PLVALI, PLVECI, PLVECLC*C_LIMITS:  Qubes limited to 4 axes so far.;C	   Fixed label size of 2 blocks (1024 bytes) temporarily.<C	   Still needs some statements describing the axis values.C C_BUGS:C ?C_HIST:    20aug87  R. Mehlman (RMX) UCLA/IGPP ORIGINAL VERSION&C	   22sep87  RMX  Documentation addedC C_END:C1      SUBROUTINE CRQLAB(LABEL,NAXES,LENAX,AXNAME,-     1			CORNAM,CORTYP,IBYTES,IEXCL,DESCR,IR);      CHARACTER*(*) LABEL,AXNAME(NAXES),CORNAM,CORTYP,DESCR      INTEGER LENAX(NAXES)$      DATA MAXLAB /1024/ , MAXAX /4/C?      CALL CRELAB(LABEL,MAXLAB,KPOS)		! puts in "file" keywords
      IR=KPOS7      IF (IR.LE.0) GO TO 79			! label size out of range:      CALL ADDKEY(LABEL,MAXLAB,KPOS,'FILE_TYPE','QUBE',IR)      IF (IR.LT.0) GO TO 79=      CALL ADDKEY(LABEL,MAXLAB,KPOS,'STORAGE_MODE','FULL',IR)      IF (IR.LT.0) GO TO 794      CALL ADDKEY(LABEL,MAXLAB,KPOS,'STORAGE_ORDER',      1					'BAND_SEQUENTIAL',IR)      IF (IR.LT.0) GO TO 790      IF (NAXES.LE.0.OR.NAXES.GT.MAXAX) GO TO 714      CALL PLVALI(LABEL,MAXLAB,KPOS,'AXES',NAXES,IR)      IF (IR.LT.0) GO TO 79      DO 15 I=1,NAXES!      IF (LENAX(I).LE.0) GO TO 71 15   CONTINUE@      CALL PLVECI(LABEL,MAXLAB,KPOS,'AXIS_ITEMS',NAXES,LENAX,IR)      IF (IR.LT.0) GO TO 79@      CALL PLVECI(LABEL,MAXLAB,KPOS,'CORE_ITEMS',NAXES,LENAX,IR)      IF (IR.LT.0) GO TO 79@      CALL PLVECL(LABEL,MAXLAB,KPOS,'AXIS_NAME',NAXES,AXNAME,IR)      IF (IR.LT.0) GO TO 79:      CALL ADDKEY(LABEL,MAXLAB,KPOS,'CORE_NAME',CORNAM,IR)      IF (IR.LT.0) GO TO 79C ..check for valid types here??      CALL ADDKEY(LABEL,MAXLAB,KPOS,'CORE_ITEM_TYPE',CORTYP,IR)      IF (IR.LT.0) GO TO 798      IF (IBYTES.LE.0.OR.IBYTES.GT.4) GO TO 71			! TEMP?      IBITS=IBYTES*8>      CALL PLVALI(LABEL,MAXLAB,KPOS,'CORE_ITEM_BITS',IBITS,IR)      IF (IR.LT.0) GO TO 79B      CALL PLVALI(LABEL,MAXLAB,KPOS,'CORE_EXCLUDE_VALUE',IEXCL,IR)      IF (IR.LT.0) GO TO 794      CALL ADDKEY(LABEL,MAXLAB,KPOS,'NOTE',DESCR,IR)      IF (IR.LT.0) GO TO 79
      IR=KPOS      RETURN	C  ERRORS 71   IR=-1 79   CONTINUE      TYPE 979,IR,KPOS4 979  FORMAT (' CRQLAB ERROR, CODE ',I5,'  KPOS',I5) 80   RETURN	      END