#BEGINBUCKET ULSASDATALIBSTG
#/ ------------------------------------------------------------------
#BEGINDEFS
#/ ------------------------------------------------------------------
#TABLECALL <MVSDSDATATABLE> KEY:MVS2BDSCODE
#/ -------------------------------------------------
#BEGININSTANCEQUALIFIERS
#/ -------------------------------------------------  
#IFEQ {ENCODE} [ORDERENCODING] #THEN PASSESENCODE
#IF [INSTALLENCODEDONLY] #THEN DOESNOTQUALIFY
#IFNOTEQ {ENCODE} NE #THEN DOESNOTQUALIFY
#PASSESENCODE
#IFEQ {ARTIFACTNAME} sascompiled.sdl #THEN DOESNOTQUALIFY
#/ odstemplate has to be done separately, due to a quirk in SAS with template content keeping SASHELP open
#IFEQ {PRODUCT} odstemplate #THEN DOESNOTQUALIFY  
#IFEQ {ARTIFACTTYPE} SDL #CREATEINSTANCEFROMENTRY
#DOESNOTQUALIFY
#ENDQUALIFIERS
#/ -------------------------------------------------------------------
#BEGINPREFIX      #/ Prefix invokes SAS from targeted SAS installation
#/ -------------------------------------------------------------------
#SET [DSLANGCODE] EN         #/ Set language symbol to EN for firing up SAS
//SASDLIB EXEC PGM=[ENTRY],                       
//  PARM=('SETINIT MSGCASE CAPSOUT ERRORABEND NOWORKTERM',     
//        'MACRO ERRORCHECK=STRICT SASUSER=WORK DEBUG=NOMSASHELP')
#TABLEFIX <MVSDSDATATABLE> LD  #/ Load Library
//STEPLIB  DD DISP=SHR,                                        
//  DSN=[CUSTPRODQUAL].[LOQUAL]                                       
#TABLEFIX <MVSDSDATATABLE> SH  #/ Sashelp
//[DFLTDDN]  DD DISP=SHR,                                        
//  DSN=[CUSTPRODQUAL].[LOQUAL]                                       
#TABLEFIX <MVSDSDATATABLE> AU  #/ Autocalls
//[DFLTDDN] DD DISP=SHR,                                        
//  DSN=[CUSTPRODQUAL].[LOQUAL]                                        
#TABLEFIX <MVSDSDATATABLE> SM  #/ SAS messages
//[DFLTDDN] DD DISP=SHR,                                        
//  DSN=[CUSTPRODQUAL].[LOQUAL]                                        
//WORK     DD UNIT=[TMPUNI],SPACE=(6144,([WORKSPC])),          
//         DCB=(RECFM=FS,LRECL=6144,BLKSIZE=6144)              
//SASLOG   DD SYSOUT=[SYSOUT]                                  
//SASCLOG  DD SYSOUT=[SYSOUT]                                  
//CONFIG   DD DISP=SHR,  #/ Using configuration file for install, not customer's
//         DSN=[CNTLDSN]($CFGINST)                             
//SASLIST  DD SYSOUT=[SYSOUT]                                  
//SASPARM  DD UNIT=[TMPUNI],SPACE=(400,(100,300)),             
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=400,BUFNO=1)         
//SYSIN  DD DATA,DLM='!^'  #/ Begin source code stream for SAS session. Delimiter is !^ in column 1 of line
options filestat symbolgen mprint mlogic;
#/ -------------------------------------------------
#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
#TABLEFIX <MVSDSDATATABLE> {MVS2BDSCODE}  #/ SAS messages
data _null_; %let ssddir1 =  #/ pull in root dir in parts to fix FB80 MVS lines
[SSDDIR1]                    #/ part 1 of path
; %let ssddir2 =
[SSDDIR2]                    #/ part 2 of path
; %let ssddir3 =
[SSDDIR3]                    #/ part 3 of path
; %let ssddir4 =
[SSDDIR4]                     #/ part 4 of path
; %let ssdsdl = /{LANG}/{ARTIFACTNAME};  #/ artifact name
libname insdl "&ssddir1&ssddir2&ssddir3&ssddir4&ssdsdl";  #/ define entire path libname in SAS macro variable, 
libname [OUTPDDNAME] '[CUSTPRODQUAL][STAGEQUAL].[LOQUAL]' disp=old;  #/ define target
run;           #/ force SAS to evaluate prior libnames
proc fcopy in=insdl out=[OUTPDDNAME];                     #/ binary page copy source to target
run;                                                      #/ flush SAS compiler to force proc fcopy before clear
libname insdl clear;                                      #/ clear source libname
libname [OUTPDDNAME] clear;                               #/ clear target libname
#/ -------------------------------------------------------------------
#BEGINSUFFIX                 
#/ -------------------------------------------------------------------
!^
//*
#/ -------------------------------------------------------------------
#ENDBUCKET ULSASDATALIBSTG
