      COMMON OV(200,4),CV(200,4),IHKL(200,3),ITITLE(20),                        
     1A,B,C,AL,BE,GA,GEN(300,3),HKL(300),ICON(10),DTR,RTD                       
      COMMON /BLOK/ DELTA(300)                                                  
      DIMENSION IOVCV(3438),PCT(2,7)                                            
      EQUIVALENCE (OV(1),IOVCV(1))                                              

C PROGRAM TO SET UP INPUT DECK FOR SOPREF                                       
C ASSIGN F:10 TO AN OUTPUT FILE OF ANY NAME                                     
C ASSIGN F:20 TO YOUR TWO-THETA AND INTENSITY FILE                              
C ASSIGN F:30 TO THE OUTPUT FILE FROM SOPOWDER                                  
      DIMENSION LOG(12),NAME(12),ITITLE(19),IGO(4),TT(100)                      
      DIMENSION ITEM(9), KARD(20), KARDC(80)                                    
      DATA YES/'Y'/,IBL/' '/,ICOM/','/                                          
      WAVE=1.5405                                                               
      ITYP = 108                                                                
      IREAD = 105                                                               
      ITP1 = 10                                                                 
      WRITE(ITYP,2)                                                             
    2 FORMAT(' * PROGRAM TO SET UP DECK FOR COMPUTER'                           
     1 ' RUN OF SOPREF.')                                                       
      WRITE(ITYP,9876)                                                          
9876  FORMAT(/,' SET F:10 TO YOUR BATCH FILE FOR OUTPUT',/,                     
     +' SET F:20 TO THE INPUT TWO-THETA AND INTENSITY FILE',/,                  
     +' SET F:30 TO THE CALCULATED PATTERN FROM LMDEAN',//,                     
     +' F:10 MUST BE SET.  INPUT FOR F:20 AND F:30 MAY BE TYPED',/,             
     +' IN IF THESE FILES ARE NOT AVAILABLE.')                                  
      WRITE(ITYP,101)                                                           
  101 FORMAT(/' TYPE THE FIRST TWO WORDS IN YOUR LOGON CODE'/                   
     1' WITH COMMA---E.G. FXRAY,75')                                            
      READ(IREAD,108)LOG                                                        
  108 FORMAT(12A1)                                                              
  102 FORMAT(20A4)                                                              
      WRITE(ITYP,103)                                                           
  103 FORMAT(/' TYPE YOUR LAST NAME')                                           
      READ(IREAD,108) NAME                                                      

