/* REXX EXEC for LOAD LIBRARY only */ /* TEST FOR TRANSLATION ERRORS */ if '4F'X = '|' then NOP; else do; "clear"; say "ERROR: TRANSLATION ERROR IN THE REXX EXEC. "; say " "; say " When your REXX exec was uploaded to the mainframe, "; say " the vertical bar character was incorrectly "; say " translated. To correct the problem, edit the MVS "; say " file containing your REXX exec, and issue the "; say " following global change command: "; say " "; say " CHANGE X'6A' X'4F' ALL "; say " "; say " Save the file, and execute this REXX exec again. If "; say " it still fails, please contact SAS Technical Support."; exit 999; end; /* 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 XMIT FILE AND VALIDATE IT */ xmitupld=getfile("XMIT"); call dcbcheck xmit xmitupld ps fb ; /* 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); rel=substr(hotfixno,3,1)||'.'||substr(hotfixno,4,1); tslev='TS'||substr(hotfixno,4,1)||'M0'; /* GET THE NAME OF THE INSTALL PREFIX AND VALIDATE IT */ msg=' '; do until goodpref='YES'; "clear"; say msg; say; say "Enter the unquoted prefix of your SAS"; say "Release" rel tslev "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" rel tslev" Installation data sets will not be modified";; say "**********************************************************************"; parse upper pull pref ; pref=strip(pref,'B'); pref=strip(pref,'B','.'); pref=strip(pref,'B','*'); if pref=' ' then do; msg='ERROR: A prefix must be entered'; end; else if length(pref)>29 then do; msg='ERROR: 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'; else msg=' '; 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; unitresp=strip(unitresp,'B'); 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 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; "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 = "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; "clear"; say '****************************************************************'; say '* RECEIVING THE XMIT FILE *'; say '* AND COPYING THE AUDIT FILE *'; say '* PLEASE WAIT *'; say '****************************************************************'; "receive indataset('"xmitupld"')"; x= PROMPT('OFF'); /* 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 like('"audupld"') tracks space(1,1)" unit ; end; "execio * diskw audt (stem auditfl. finis" ; "free f(audt)"; say ' ------------------------------------------------------ '; say; say '***'; parse upper pull x; /* ISSUE MESSAGES ABOUT WHAT TO DO NEXT */ "clear"; 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 ; /******************************************************/ /* SUBROUTINES */ /******************************************************/ 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 ; filevar=strip(filevar,'B'); 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;