/**********************************************************************/


PCSDDNTB CSECT                                  
*                                               
* ALLOW MULTIPLE ISPFS                          
*                                               
  @SDDNAME ISPPARM,OFFSET=2      FOR OLD SPF    
  @SDDNAME ISPPROF,OFFSET=2      PROFILE DATASET
  @SDDNAME ISPLOG,OFFSET=2       ISPF LOG DATASET      
  @SDDNAME ISPLIST,OFFSET=2      ISPF LIST DATASET     
  @SDDNAME ISPCTL,OFFSET=2       ISPCTL0/ISPCTL1/ETC.  
  @SDDNAME ISPLST,OFFSET=2       ISPLST0/ISPLST1/ETC.  
  @SDDNAME ISPWRK,OFFSET=2       ISPWRK0/ISPWRK1/ETC.  
  @SDDNAME 'ISPEDA  ',OFFSET=2   FOR ISPF VERSION 1    
  @SDDNAME 'ISPEDB  ',OFFSET=2   FOR ISPF VERSION 1    
  @SDDNAME ISP#####,OFFSET=2     TEMP ISPF DDNAMES     
*                                                      
* ALLOW MULTIPLE SAS SESSIONS                          
*                                                      
  @SDDNAME WORK,OFFSET=1         V5/V6 WORK FILE       
  @SDDNAME FT11F001,OFFSET=1     V5 SAS LOG            
  @SDDNAME FT12F001,OFFSET=1     V5 SAS LIST           
  @SDDNAME FT13F001,OFFSET=1     V5 SAS PUNCH          
  @SDDNAME FT15F001,OFFSET=1     V5 PARMCARDS FILE     
  @SDDNAME SASUTL,OFFSET=2       V5 UTILITY DATASET    
  @SDDNAME SASAUTOS,OFFSET=2     V5/V6 AUTOCALL MACROS 
  @SDDNAME SASHELP,OFFSET=2      V5/V6 HELP DATASET    
  @SDDNAME SASUSER,OFFSET=2      V6 USER PROFILE FILE  
  @SDDNAME SASLIB,OFFSET=2       V5/V6 AUX LOADLIB     
  @SDDNAME SASLOG,OFFSET=2       V6 SAS LOG            
  @SDDNAME SASLIST,OFFSET=2      V6 SAS LIST           
  @SDDNAME SASPARM,OFFSET=2      V6 PARMCARDS FILE     
  @SDDNAME SASMSG,OFFSET=2       V5/V6 MESSAGES DATASET
  @SDDNAME LIBRARY,OFFSET=1      V5/V6 FORMAT LIBRARY  
  @SDDNAME MAPS,OFFSET=2         V5/V6 MAPS LIBRARY    
  @SDDNAME SASEXEC,OFFSET=2      V6 SASEXEC FILE       
  SPACE 2
  DC    D'0'                END OF DDNAME TABLE
  END


/**********************************************************************/


SET SESSID =                                                 
PIECHECK                                                     
SET RC = &LASTCC                                             
IF &RC ¬= 0 THEN DO                                          
   IF &RC >= 240 THEN +                                      
      SET SESSID = &RC - 240                                 
   ELSE DO                                                   
      SET POS = &EVAL(&RC - 192)                             
      SET SESSID = &SUBSTR(&POS:&POS,AB)                     
   END                                                       
   ALLOC F(SASUSER) DA('&PREFIX..SAS606.SASUSER&SESSID') ... 
END 


/**********************************************************************/