#BEGINBUCKET TSORECEIVESTG 
#/ -------------------------------------------------
#BEGINDEFS
#/ -------------------------------------------------
#/EXCEPTIONFORMISSINGSYMBOL
#TABLECALL <MVSDSDATATABLE> KEY:MVS2BDSCODE
#SYMBOLCALLS SYSOUT;SSDDIR1;SSDDIR2;SSDDIR3;CUSTPRODQUAL;STAGEQUAL;ORDERENCODING;
#/ -------------------------------------------------
#BEGININSTANCEQUALIFIERS
#/ -------------------------------------------------
#IFEQ {ENCODE} [ORDERENCODING] #THEN PASSESENCODE
#IF [INSTALLENCODEDONLY] #THEN DOESNOTQUALIFY
#IFNOTEQ {ENCODE} NE #THEN DOESNOTQUALIFY
#PASSESENCODE
#IFEQ {ARTIFACTTYPE} XMT #CREATEINSTANCEFROMENTRY
#DOESNOTQUALIFY
#ENDQUALIFIERS
#/ -------------------------------------------------
#BEGINPREFIX 
#/ -------------------------------------------------
//UNLDXMT EXEC PGM=IKJEFT01,DYNAMNBR=50,REGION=2048K,PARM=                                   
//SYSTSPRT DD SYSOUT=[SYSOUT]                                       
//SYSTSIN DD DATA,DLM='!I'    
#/ -------------------------------------------------
#BEGININSTANCE
#/ -------------------------------------------------
#SET [DSLANGCODE] EN         #/ Set language symbol to EN for empty/blank language argument.
#IFNOT {LANG2BCODE} #THEN NEXT     #/ Is language symbol non-blank?
#SET [DSLANGCODE] {LANG2BCODE}     #/ If so set general use language symbol to instance argument value. 
#NEXT
#SET [MVSDSCODE] {MVS2BDSCODE}
#TABLEFIX <MVSDSDATATABLE> [MVSDSCODE] #/ Fix ds table row to OTP2 from the instance.
#IFNOT [ALIASTO] #THEN NOALIAS #/ See if it's marked alias in ds table, if not then skip 
#SET [MVSDSCODE] [ALIASTO]     #/ Hold the aliased ds from the table row
#TABLEFIX <MVSDSDATATABLE> [MVSDSCODE]  #/ Reset the table row to the aliased OTP2.
#NOALIAS
 ALLOC FI(INDD) PATH('+                                     
[SSDDIR1]+  
#IFNOT [SSDDIR2] #THEN NEXT
[SSDDIR2]+   
#NEXT
#IFNOT [SSDDIR3] #THEN NEXT
[SSDDIR3]+
#NEXT
#IFNOT [SSDDIR4] #THEN NEXT
[SSDDIR4]+
#NEXT
/{LANG}+                             
/{ARTIFACTNAME}+                                                 
') PATHOPTS(ORDONLY)                                         
RECEIVE INDDNAME(INDD) 
#/ #IFNOTEQ [MVSDSCODE] XX  #THEN NEXT
#/  RESTORE DSNAME ('[CNTLDSN]')  
#/ #THEN TXEN
#/ #NEXT
#IF [NOSAL] #THEN NEXT
  RESTORE DSNAME ('[CUSTPRODQUAL][STAGEQUAL].[LOQUAL]')  
#THEN TXEN
#NEXT
  RESTORE DSNAME ('[CUSTPRODQUAL].[LOQUAL]')
#TXEN
  FREE FI(INDD)
#/ -------------------------------------------------
#BEGINSUFFIX 
#/ -------------------------------------------------
!I    
#ENDBUCKET 