/* REXX for CATALOG only */ /* IF THEY PASSED IN TRACE THEN TURN ON TRACING */ parse upper arg traceyn; if traceyn = 'TRACE' then trace r; /* GET THE NAME OF THE TEXT FILE AND VALIDATE IT */ txtupld=getfile("TEXT"); /* GET THE NAME OF THE XPT FILE AND VALIDATE IT */ xptupld=getfile("XPT"); call dcbcheck xpt xptupld ps fb 80 8000; /* GET THE NAME OF THE AUDIT FILE AND VALIDATE IT */ audupld=getfile("AUDIT"); /* 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'; "clear"; 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".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; "clear"; 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? (Y/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 */ "clear"; say "Files specified are :"; say " Specified Prefix -" pref; say " Specified Unit -" unitresp; say " Uploaded XPT file -" xptupld; say " Uploaded AUDIT file -" audupld; say " Uploaded TEXT file -" txtupld; say; say "New files to be created are :" say " "pref"."hotfixno".AUDIT" ; 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; "clear"; say "*** Exec terminated. Please rerun the exec to reenter"; say "*** the parameters."; say; 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 = "AUDIT File Used =" audupld; count=auditfl.0+3; auditfl.count = "TEXT File Used =" txtupld; count=auditfl.0+4; auditfl.count = "XPT File Used =" xptupld; count=auditfl.0+5; auditfl.count = "Audit File Created =" pref"."hotfixno".AUDIT"; auditfl.0=count; /* CREATE AND COPY THE AUDIT FILE */ 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 like('"audupld"') tracks space(1,1)" unit ; end; "execio * diskw audt (stem auditfl. finis" ; "free f(audt)"; /* ISSUE MESSAGES ABOUT WHAT TO DO NEXT */ "clear"; say "The following files were created:"; say " "pref"."hotfixno".AUDIT" ; 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'; "clear"; if status /= 'STATUS' then do; say "'"filevar"' :" status ; say "Please try again"; say; say; end; 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; DCBCHECK: parse upper arg name dsn dsorg recfm lrecl blksize rest; dsn2="'"dsn"'"; rc=listdsi(dsn2); if SYSDSORG /= dsorg then do; if termflg /=1 then do; "clear"; end; say 'ERROR: Incorrect DCB for' name 'file :' dsn; say ' Required DSORG is' dsorg'; however, the DSORG for'; say ' ' dsn 'is' SYSDSORG'.'; say; termflg=1; end; if SYSRECFM /= recfm then do; if termflg /=1 then do; "clear"; end; say 'ERROR: Incorrect DCB for' name 'file :' dsn; say ' Required RECFM is' recfm'; however, the RECFM for'; say ' ' dsn 'is' SYSRECFM'.'; say; termflg=1; end; if lrecl /= ' ' then do; if SYSLRECL /= lrecl then do; if termflg /=1 then do; "clear"; end; say 'ERROR: Incorrect DCB for' name 'file :' dsn; say ' Required LRECL is' lrecl'; however, the LRECL for'; say ' ' dsn 'is' SYSLRECL'.'; say; termflg=1; end; end; if blksize /= ' ' then do; if SYSBLKSIZE /= blksize then do; if termflg /=1 then do; "clear"; end; say 'ERROR: Incorrect DCB for' name 'file :' dsn; say ' Required BLKSIZE is' blksize'; however, the BLKSIZE for'; say ' ' dsn 'is' SYSBLKSIZE'.'; say; termflg=1; end; end; if termflg=1 then call term; return; TERM: say; say 'Please upload the file again with appropriate DCB'; say 'per the instrucions in' txtupld', and then rerun the EXEC.'; say; say exit 999;