      SUBROUTINE WAPARM
      IMPLICIT NONE
*
* WAPARM - Write Ascii data part of parameter file record from common block
*
* Local Variables...
*    ASCREC - Ascii record to be written to output file
*    ASCLEN - Length of Ascii record
*    I      - Loop counter
*    VALID  - Function to test whether values are legal reals
*                                         
      INCLUDE 'misc.inc'
      INCLUDE 'labl.inc'
      INCLUDE 'parm.inc'

      CHARACTER ASCREC*2000
      INTEGER   ASCLEN, I

      RECLEN = INDEX(RECORD,'*DATA*') + 5    

      WRITE (UNIT=RECORD(RECLEN+1:),FMT=1120)
     +   NUM32W,SDIREC,SUNVIE,(PMCPID(I),I=1,8),PRCIDM,LOS,LAST2

 1120 FORMAT (I2,10I4,2I6,A2)

      RECLEN = RECLEN + 56
*
* Attach any record key to the front of completed record and write out...
*
      IF (RECKEY .NE. ' ') THEN
         ASCREC = RECKEY(1:20)//RECORD(1:RECLEN)
         ASCLEN = 20 + RECLEN
      ELSE
         ASCREC = RECORD(1:RECLEN)
         ASCLEN = RECLEN
      ENDIF

      CALL WAWRIT (ASCREC,ASCLEN)

      RETURN
      END    
