/* REXX */ /* IF THEY PASSED IN TRACE THEN TURN ON TRACING */ parse upper arg traceyn; if traceyn = 'TRACE' then trace r; /* GET THE NAME OF THE XMIT FILE AND VALIDATE IT */ xmitupld=getfile("XMIT"); /* GET THE NAME OF THE AUDIT FILE AND VALIDATE IT */ audupld=getfile("AUDIT"); /* GET THE NAME OF THE TEXT FILE AND VALIDATE IT */ txtupld=getfile("TEXT"); /* READ THE AUDIT FILE AND GET THE HOTFIX NUMBER */ "alloc f(audit) da('"audupld"')"; "execio * diskr audit (stem auditfl. finis" ; "free f(audit)"; hotfixno='HF'||substr(auditfl.1,1,6); /* GET THE NAME OF THE INSTALL PREFIX AND VALIDATE IT */ do until goodpref='YES'; say; say; say "Enter the unquoted prefix of your SAS"; say "Release 8.1 TS1M0 Installation data sets"; say; say "The following data sets will be created:"; say " 'prefix'."hotfixno".LIBRARY"; say " 'prefix'."hotfixno".AUDIT"; say; say "**********************************************************************"; say "* Your Release 8.1 TS1M0 Installation data sets will not be modified *"; say "**********************************************************************"; parse upper pull pref ; if pref=' ' then do; say; say 'A prefix must be entered'; end; else if length(pref)>29 then do; say; say 'Your prefix can not be > 29 characters'; end; else do; if length(pref)=lastpos('.',pref) then pref=substr(pref,1,length(pref)-1); statuspr1=SYSDSN("'"pref".library'"); statuspr2=SYSDSN("'"pref".sashelp'"); if (statuspr1 /= 'OK') | (statuspr2 /= 'OK') then do; say; say pref 'is not a prefix to an existing SAS system'; say 'Would you like to use this prefix anyway ? (Y/N)'; do until (abbrev('YES',ans,1) | abbrev('NO',ANS,1)); parse upper pull ans; if (abbrev('YES',ans,1) | abbrev('NO',ans,1)) then nop; else say 'Please enter Y or N'; end; if abbrev('YES',ans,1) then goodpref='YES'; end; else goodpref='YES'; end; end; /* GET THE NAME OF THE UNIT FOR THE PERMANENT FILES */ do forever; say; say; say "Enter the desired disk UNIT for these 'permanent' data sets"; say "or hit ENTER to take the default UNIT type at your site:"; parse upper pull unitresp; ans=''; if unitresp /= "" then leave; else do until (abbrev('YES',ans,1) | abbrev('NO',ANS,1)); if (abbrev('YES',ans,1) | abbrev('NO',ans,1)) then nop; else do; say 'UNIT not specified. Continue with default UNIT?'; say 'Please enter Y or N'; end; parse upper pull ans; end; if abbrev('YES',ans,1) then leave; end; if unitresp = "" then unit=' '; else unit="UNIT("unitresp")"; /* MAKE SURE THAT EVERYTHING IS CORRECT GIVING A */ /* CHANCE TO ABORT THE PROCESS */ say; say; say "Files specified are :"; say " Specified Prefix -" pref; say " Specified Unit -" unitresp; say " Uploaded XMIT file -" xmitupld; say " Uploaded AUDIT file -" audupld; say " Uploaded TEXT file -" txtupld; say; say "New files to be created are :" say " "pref"."hotfixno".AUDIT" ; say " "pref"."hotfixno".LIBRARY" ; say; Say "Is this information correct? (Y/N)"; ans=''; do until (abbrev('YES',ans,1) | abbrev('NO',ANS,1)); parse upper pull ans; if (abbrev('YES',ans,1) | abbrev('NO',ans,1)) then nop; else say 'Please enter Y or N'; end; if (abbrev('NO',ans,1)) then do; say "Exec terminated. Please rerun the exec to reenter"; say "the parameters."; exit 999; end; /* APPEND USER INFORMATION TO THE AUDIT FILE */ count=auditfl.0+1; auditfl.count = date('N')":"time('C')", Prefix="pref", Unit="unitresp; count=auditfl.0+2; auditfl.count = "XMIT File Used =" xmitupld; count=auditfl.0+3; auditfl.count = "AUDIT File Used =" audupld; count=auditfl.0+4; auditfl.count = "TEXT File Used =" txtupld; count=auditfl.0+5; auditfl.count = "Library Created =" pref"."hotfixno".LIBRARY" ; count=auditfl.0+6; auditfl.count = "Audit File Created =" pref"."hotfixno".AUDIT"; auditfl.0=count; /* RECEIVE THE XMIT FILE */ "PROFILE PROMPT" IF PROMPT() \= 'ON' THEN x = PROMPT('ON') push "da ('"pref"."hotfixno".LIBRARY')" unit; say '****************************************************************'; say '* RECEIVING THE XMIT FILE *'; say '* AND COPYING THE AUDIT FILE *'; say '* PLEASE WAIT *'; say '****************************************************************'; "receive indataset('"xmitupld"')"; /* CREATE AND COPY THE AUDIT FILE */ say ' ------------------------------------------------------ '; if SYSDSN("'"pref"."hotfixno".AUDIT'") = 'OK' then do; "alloc f(audt) da('"pref"."hotfixno".AUDIT') mod"; end; else do; "alloc f(audt) da('"pref"."hotfixno".AUDIT') new catalog dsorg(ps) recfm(f,b) lrecl(80) blksize(3120) space(1,1) tracks" unit ; end; "execio * diskw audt (stem auditfl. finis" ; "free f(audt)"; say '****************************************************************'; /* ISSUE MESSAGES ABOUT WHAT TO DO NEXT */ say; say; say "The following files were created:"; say " "pref"."hotfixno".AUDIT" ; say " "pref"."hotfixno".LIBRARY" ; say; say; say '**************************************************************'; say '**************************************************************'; say " To continue, please refer to Step 4 of the section "; say " entitled 'INSTALLATION INSTRUCTIONS' in the text "; say " document : " txtupld ; say '**************************************************************'; say '**************************************************************'; exit 0 ; /******************************************************/ /* SUBROUTINE */ /******************************************************/ getfile: procedure expose filevar; parse upper arg type; do until status='OK'; if status /= 'STATUS' then do; say; say "'"filevar"' :" status ; say "Please try again"; end; say; say; say "Enter the unquoted fully qualified data set name"; say "of the" type "file you uploaded:"; parse upper pull filevar ; status=SYSDSN("'"filevar"'") end; return filevar;