comment AUTOPAT installation script. setvar cierror 0 comment comment OPTION list comment ================================================================= comment comment SECTION 2. Note that section 1 (below in file) is executed first comment comment ================================================================= IF HPCIDEPTH > 1 THEN echo !eatup comment comment Get the installation files to insert in the job comment echo echo Enter the patch ID's for the patches you wish installed. echo echo Type // or carriage return when you are finished with the list. echo setvar save_hpmsgfence hpmsgfence setvar hpmsgfence 1 purge logci,temp purge logx,temp setvar hpmsgfence save_hpmsgfence build logci;temp;rec=40,16,f,ascii build logx ;temp;rec=40,16,f,ascii file log=logci,oldtemp file logx=logx,oldtemp comment comment NOTE: the variables setvar and comment are set equal to their comment own names so that the header of each installation file comment can be executed. comment setvar num_str,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" setvar setvar "setvar" setvar comment "comment" setvar ans "" input name=ans; prompt=" Patch ID:" setvar autocont true setvar count 0 setvar indirect false while ans <> "//" and ans <> "" do if AUTOPAT_VERSION>"A.02.06" if lft(ans,1) = "^" or (lft(ans,1) = "!") then setvar j 1 setvar indir ups(rht(ans,len(ans)-1)) if finfo("!indir.patchxl.telesup",0) then setvar indirect true xeq !indir.patchxl.telesup else echo *********************************************************** echo ***** Indirect file !indir.PATCHXL.TELESUP not found. ***** echo *********************************************************** endif endif if indirect then if j <= max_patchid then setvar ans ups(pt_id!j) echo Patch ID:!ans setvar j j+1 endif if j > max_patchid then setvar indirect false endif else setvar ans ups(ans) endif else setvar ans ups(ans) endif setvar cierror 0 if len(ans) > 3 then if len(ans) = 4 then listf I00?!ans.patchxl.telesup;*log else if len(ans) = 5 then listf I00!ans.patchx?.telesup;*log else if len(ans) = 6 then echo echo *************************************************************** echo ***** You have input 6 characters for Patch ID - INVALID. ***** echo *************************************************************** setvar cierror 9999 else if len(ans) = 7 then listf !ans?.patchxl.telesup;*log else if len(ans) = 8 then listf !ans.patchx?.telesup;*log else if len(ans) > 8 then echo echo *************************************************************** echo ***** You have input MORE than 8 characters for Patch ID. ***** echo *************************************************************** setvar cierror 9999 endif endif endif endif endif endif else echo echo *************************************************************** echo ***** You have input LESS than 4 characters for Patch ID. ***** echo *************************************************************** setvar cierror 9999 endif if cierror <> 0 then echo echo Installation file for patch id !ans not found in PATCHXL.TELESUP echo echo Patch ID convention can be: nnnn, vnnnn, pidnnnn or pidnnnnv where: echo echo nnnn = generic patch id v= version pid = product id echo echo ----- Input is ignored ----- echo echo Please try again.... echo else comment Eliminate header put out by LISTF command. Keep file names. comment Then read first line of file, assign to var fname. Eliminate comment trailing blanks with function LFT. comment print *log; start=4; out=*logx comment comment If eof (finfo code 19) is 3, then one file matches wildcard name comment if finfo("logx",19) = 3 then if AUTOPAT_VERSION > "A.02.06" input fname<*logx>$null else run ci.pub.sys;parm=3;stdlist=$null;info="input fname";stdin=*logx echo !eatup endif setvar fname lft(fname,8) comment comment Variables PJOBnn save installation file names for PATINSTL comment setvar pname "PJOB"+str(num_str,count/10+1,1)+chr(48+count mod 10 ) setvar !pname fname if bound(SLT) then deletevar SLT endif print !fname.patchxl.telesup; end=7; out=*logtemp comment comment Execute installation header. This tells if SLT needed and comment summary information saved in variables FRUnn. comment xeq logtemp.patchxl.sys if bound(SLT) then setvar SLT "TRUE " setvar tape true else setvar SLT "FALSE" endif setvar this_fru "FRU"+rht(pname,2) while len(fru_method) < 15 setvar fru_method "!fru_method " endwhile setvar !this_fru "![str(fname,4,5)] !SLT !fru_method !full_fru_name" setvar count count + 1 else echo echo Error: There are multiple installation files for Patch ID !ans print *log echo ----- Input is ignored ----- echo echo Patch ID convention can be: nnnn, vnnnn, pidnnnn or pidnnnnv where: echo echo nnnn = generic patch id v= version pid = product id echo echo Please try again.... echo endif endif if not indirect setvar ans "" input name=ans; prompt=" Patch ID:" endif endwhile purge logci,temp purge logx,temp reset log reset logx setvar save_hpmsgfence hpmsgfence setvar hpmsgfence 1 deletevar setvar,comment,full_fru_name,fru_method,pname,fname,ans,SLT setvar hpmsgfence save_hpmsgfence if count = 0 then echo ************************************************************** echo * * echo * No patch jobs selected. Patch installation terminates. * echo * * echo ************************************************************** echo EXIT else build PATINSTL;rec=-80,16,f,ascii;disc=80000 file PATINSTL,old ;acc=append comment comment Create job line with passwords. Second line will have operator's comment name to put into LOGOK later in job. Third line will reflect the comment version of AUTOPAT we are using to build the job. This portion is comment for the PATINSTL patch installation job. comment if AUTOPAT_VERSION > "A.02.06" comment Use the I/O redirection method echo !!JOB PATCHSYS,MANAGER!upass.SYS!apass,PATCHXL;OUTCLASS=,1>*PATINSTL echo !!setvar operator "!operator">>*PATINSTL echo !!setvar autopat_version "!autopat_version">>*PATINSTL else comment Use the RUN CI.PUB.SYS to echo to the output file method. run ci.pub.sys;parm=3;stdlist=*logtemp;info=& "echo !!!!JOB PATCHSYS,MANAGER!upass.SYS!apass,PATCHXL;OUTCLASS=,1" print *logtemp; start=3; out=*PATINSTL echo !eatup run ci.pub.sys;parm=3;stdlist=*logtemp;info=& 'echo !!!!setvar operator "!operator"' print *logtemp; start=3; out=*PATINSTL echo !eatup run ci.pub.sys;parm=3;stdlist=*logtemp;info=& 'echo !!!!setvar autopat_version "!autopat_version"' print *logtemp; start=3; out=*PATINSTL echo !eatup endif comment comment After all installation files are in job, append one of two possible comment COMPLETION templates: one creates an SLT, the other does not. comment setvar end_file finfo(THIS_FILE,19) setvar TXLSETUP_s end_file-632 setvar TXLSETUP_e end_file-468 setvar TXLEOJNO_s end_file-466 setvar TXLEOJNO_e end_file-424 setvar TXLEOJSY_s end_file-422 setvar TXLEOJSY_e end_file-81 setvar TXLRECOV_s end_file-79 setvar TXLRECOV_e end_file comment print !THIS_FILE;start=!TXLSETUP_s; end=!TXLSETUP_e; out=*PATINSTL setvar i 0 comment Append installation files to TXLSETUP while count > i do setvar fname "PJOB"+chr(48+i/10)+chr(48+i mod 10) setvar fname !fname setvar jcw 0 run fcopy.pub.sys;& info="from=!fname.patchxl.telesup;to=*PATINSTL;nouserlabels";& stdlist=*logtemp;stdin=$null echo !eatup if jcw <> 0 then setvar quit_code 2 setvar bad_fname fname EXIT endif comment Insert "xeq PATDONE" in the job after each patch if AUTOPAT_VERSION > "A.02.06" echo !!xeq PATDONE>>*PATINSTL else run ci.pub.sys;parm=3;stdlist=*logtemp;info="echo !!!!xeq PATDONE" echo !eatup print *logtemp; start=3; out=*PATINSTL endif setvar i i+1 endwhile comment Append the required COMPLETION template if bound(tape) = FALSE then print !THIS_FILE;start=!TXLEOJNO_s; end=!TXLEOJNO_e; out=*PATINSTL else print !THIS_FILE;start=!TXLEOJSY_s; end=!TXLEOJSY_e; out=*PATINSTL comment comment This portion will create the PATRECOV job used for patch comment installation job recovery from SYSGEN aborts. First, we comment write the job line with passwords, then we append the comment recovery template to PATRECOV. comment build PATRECOV;rec=-80,16,f,ascii file PATRECOV,old ;acc=append if AUTOPAT_VERSION > "A.02.06" echo !!JOB PATCHSLT,MANAGER!upass.SYS!apass,PATCHXL;OUTCLASS=,1>*PATRECOV else run ci.pub.sys;parm=3;stdlist=*logtemp;info=& "echo !!!!JOB PATCHSLT,MANAGER!upass.SYS!apass,PATCHXL;OUTCLASS=,1" print *logtemp; start=3; out=*PATRECOV echo !eatup endif print !THIS_FILE;start=!TXLRECOV_s; end=!TXLRECOV_e; out=*PATRECOV if finfo("AXLDEV1.PUB.SYS",0) if finfo("AXLDEV1.PUB.SYS",12)>59999 echo echo AXLDEV1.PUB.SYS file was built successfully to ensure echo a patched SLT could be used to UPDATE successfully. else echo echo Current AXLDEV1.PUB.SYS file is too small to ensure a echo successful UPDATE from a patched SLT. Purging current file... setvar cierror 0 PURGE AXLDEV1.PUB.SYS setvar cierror 0 CONTINUE BUILD AXLDEV1.PUB.SYS;DISC=60000,1,1;DEV=1 if cierror <> 0 echo Warning -- AUTOPAT cannot find enough contiguous disc space on echo LDEV #1 for UPDATE to update successfully with the SLT created echo by the patch installation job. echo echo You must create 60000 sectors of contiguous disc space on LDEV #1 echo BEFORE updating with the CSLT created by the patch installation job. echo echo If you wish to continue with this installation and create the disc echo space after AUTOPAT is done (but before streaming the patch echo installation job), respond 'Y' to the following prompt. echo If you wish to stop AUTOPAT now to create the disc space, respond echo "N" to the following prompt. echo echo Continue with AUTOPAT now and create disc space later (Y/N)? input go_for_it setvar go_for_it ups(lft(go_for_it,1)) while go_for_it <> "Y" and go_for_it <> "N" echo Please enter Y for YES or N for NO echo Continue with AUTOPAT now and create disc space later (Y/N)? input go_for_it setvar go_for_it ups(lft(go_for_it,1)) endwhile if go_for_it ="Y" echo Continuing with AUTOPAT command file execution else echo echo You have chosen to discontinue the AUTOPAT command file echo execution until free disc space can be obtained to echo continue with patch installation. setvar quit_code 3 EXIT endif endif echo echo AXLDEV1 file was succesfully created, continuing... endif endif endif echo endif deletevar @pass,operator,count,TXL@,end_file,i,@fname setvar quit_code 0 EXIT ENDIF comment comment ENDIF above ends if HPDEPTH > 1 at start of section 2. comment EXIT causes return to section 1. comment comment ================================================================== comment comment SECTION 1. comment comment The code below executes first and then executes this file again comment The next time, the HPCIDEPTH will be > 1 and the code PRIOR to this comment section (2) will execute. This scheme permits a more readable script comment because it avoids long IF-THEN clauses: the nested CI (section 2) comment can allow the first level CI (section 1) to control the flow. comment comment =================================================================== echo echo AUTOPAT: Start of patch installation procedure. echo echo All patch files must have previously been restored to PATCHXL.TELESUP. echo setvar eatup chr(27)+"&a0c-3R"+chr(27)+"J"+chr(27)+"&a0c-1R" setvar hpautocont true setvar cierror 0 comment execute a SPOOLF command to see how the system reacts. If CIERR comment reports the need for another parameter, we must be running 2.1 or comment greater. If we get any other error, we are probably running an comment earlier release that didn't support Native Mode Spooler commands. run ci.pub.sys;parm=3;stdlist=$NULL;info="spoolf" comment showjcw echo !eatup if cierror = 10015 echo AUTOPAT Version: A.02.26 Patch Product ID compatible comment Copyright Hewlett-Packard May 6, 1996 comment setvar THIS_FILE "AUTOPAT.PATCHXL.TELESUP" setvar AUTOPAT_VERSION "A.02.26" else echo AUTOPAT Version: A.02.06 Patch Product ID compatible comment Copyright Hewlett-Packard August 28, 1990 comment setvar THIS_FILE "AUTOPAT.PATCHXL.TELESUP" setvar AUTOPAT_VERSION "A.02.06" endif setvar cierror 0 setvar patch_error 0 if not ("!HPACCOUNT"="SYS" and "!HPUSER"="MANAGER") then setvar patch_error 2 echo Error: Improper logon. endif comment if patch_error = 0 then newgroup patchxl.sys;cap=ia,ba,pm,ph;access=(r,w,l,a,s:al;x:ac) if cierror <> 0 then setvar patch_error 1 echo Error: Workgroup PATCHXL.SYS already exists. endif endif comment if patch_error = 0 then echo echo Your name and a time stamp will be saved in the patch installation echo record in HPSWINFO.PUB.SYS. Please enter your name. echo setvar operator "" input name=operator; prompt=" Name:" echo echo You must give the passwords for MANAGER.SYS, which will be echo inserted into the patch job. You will be asked to confirm echo the account password and the user password. echo echo NOTE: The patch job with the passwords will be on the work echo group PATCHXL.SYS. If the patch job succeeds, it echo purges PATCHXL.SYS - erasing the record of passwords. echo echo IF THERE ARE NO PASSWORDS, you may press "return" at the prompts. echo setvar apass "+" setvar upass "+" comment comment Setvar tapass, tupass to allow go thru loop at least once comment setvar tapass "-" setvar tupass "-" set echo=off while not ("!apass"="!tapass" and "!upass"="!tupass") do input name=apass; prompt="Password for SYS account:" if "!apass"="+" then setvar apass "" else setvar apass "/!apass" endif echo input name=upass; prompt="Password for user MANAGER.SYS:" if "!upass"="+" then setvar upass "" else setvar upass "/!upass" endif echo echo Repeat passwords for confirmation echo input name=tapass; prompt="Password for SYS account:" if "!tapass"="-" then setvar tapass "" else setvar tapass "/!tapass" endif echo input name=tupass; prompt="Password for user MANAGER.SYS:" if "!tupass"="-" then setvar tupass "" else setvar tupass "/!tupass" endif echo if not ("!apass"="!tapass" and "!upass"="!tupass") then echo You must type both passwords correctly, twice. echo Please try again. echo echo If you wish to terminate normally without selecting any echo patch jobs, type ANY passwords twice. echo setvar apass "+" setvar upass "+" setvar tapass "-" setvar tupass "-" endif endwhile set echo=on setvar quit_code 1 setvar save_hpgroup hpgroup chgroup patchxl build logtemp;rec=40,16,f,ascii file logtemp,old run ci.pub.sys;parm=3;info="xeq !THIS_FILE" comment echo !eatup comment Must change group in any case. If a job runs and tries to comment purge PATCHXL, we shouldn't have a session using it! chgroup !save_hpgroup deletevar eatup,save@ if quit_code > 0 then if quit_code= 2 then echo echo There is a problem with the install file: echo echo !bad_fname.patchxl.telesup. echo echo Please contact the person who gave you this patch and let them know echo about this problem. You can start over and install any other patches. echo echo AUTOPAT could not insert (using FCOPY) !bad_fname.PATCHXL.TELESUP echo into PATINSTL.PATCHXL.SYS. This error usually indicates the install echo file named above has a record width other than 80 bytes. echo echo Remember to PURGEGROUP PATCHXL.SYS if you wish to restart. echo else echo echo Abnormal termination. Correct error and start from the echo beginning. echo echo Remember to PURGEGROUP PATCHXL.SYS if you wish to restart. echo endif purgegroup PATCHXL else reset @ echo echo Patch Job file built. To install patches, type: echo echo stream PATINSTL.PATCHXL echo if bound(tape) = true then echo A system load tape will be required. The operator will echo be asked to mount a magnetic tape at the appropriate time. echo The tape should be used to UPDATE the system according to echo standard site procedures. deletevar tape else echo A system load tape will NOT be required by this patch job. endif echo endif else if patch_error = 1 then echo ************************************************************** echo * * echo * Please save any files of value to you on PATCHXL.SYS. * echo * Then PURGEGROUP PATCHXL.SYS. AUTOPAT will recreate * echo * PATCHXL.SYS to use as a work area. * echo * * echo ************************************************************** echo endif if patch_error = 2 then echo ************************************************************** echo * * echo * You must logon as MANAGER.SYS in order to run AUTOPAT * echo * * echo ************************************************************** echo endif endif return comment The statements below are not executed by AUTOPAT. Instead they comment used as "data" to create the PATINSTL job. comment comment There are 3 sections: a SETUP and 2 COMPLETION templates. comment Only one of the completion templates is appended to a job: comment one completion template makes an SLT, the other does not. comment comment The actual installation files for patches are inserted between comment the SETUP template and the COMPLETION template. comment ============== TXLSETUP template: start=EOF-mm, end=EOF-nn ========== !comment !comment TXLSETUP: Beginning of PATINSTL job !comment !setvar HPAUTOCONT true !setvar HPPATH '!!hpgroup,pub.sys,pub' !setvar _RELEASE_PROBLEM FALSE !setvar pat_id "MPE VERSION CHECK" !if AUTOPAT_VERSION > "A.02.06" ! showme>SHOWVUF ! setvar _REL_STRING "" ! setvar _REL_COUNTER 0 ! while "!_REL_STRING" <> "RELEASE" ! setvar _REL_COUNTER _REL_COUNTER+1 ! print SHOWVUF;START=!_REL_COUNTER;END=!_REL_COUNTER>ONLYVUF ! input _VUFS_BOTH finfo("SHOWVUF",19) ! setvar _REL_STRING "RELEASE" ! setvar _RELEASE_PROBLEM TRUE ! endif ! endwhile ! setvar _REL_HDR LFT(_VUFS_BOTH,16) ! setvar _REL_PRODUCT_HDR LFT(_VUFS_BOTH,41) ! setvar _RELEASE_VUF RHT(_REL_HDR,7) ! setvar _PRODUCT_VUF RHT(_REL_PRODUCT_HDR,7) ! deletevar _REL_@ !endif !setjcw NLUSERLANG 0 !purge LOGOK !purge LOGERRS !purge LOGTEMP !purge PATCHOK !purge PATCHER !purge PATDONE !purge PLISTEQ !purge NLLINKIN !purge RELINKIN !purge PATCOMS !purge PATTEMP !BUILD LOGTEMP; rec=-80,3,f,ascii !comment Created LOGOK with a larger default size so we won't run out of !comment room writing to it for longer patch installations. !BUILD LOGOK; rec=-80,3,f,ascii; disc=5119 !BUILD LOGERRS; rec=-80,3,f,ascii !BUILD PATCHOK; rec=-80,3,f,ascii !BUILD PATCHER; rec=-80,3,f,ascii !BUILD PATDONE; rec=-80,3,f,ascii !BUILD PATCOMS; rec=-80,16,f,ascii !BUILD PATTEMP; rec=-80,16,f,ascii !comment Created PLISTEQ with a larger default size so we won't run out of !comment room writing to it for longer patch installations. !BUILD PLISTEQ; rec=-80,16,f,ascii; disc=2048 !file PATCHOK,old; acc=append !file PATCHER,old; acc=append !file PATDONE,old; acc=append !file PATCOMS,old; acc=append !file PATTEMP,old; acc=append !file PLISTEQ,old !comment !comment Create PATCHOK script !comment !print $stdin; out=*PATCHOK PARM MSG="!pat_id !sr_number !hpdatef !hptimef" OUTPUT=LOGOK OPTION nolist comment Append one line to output file. Like PATCHER - diff defaults if NOT finfo("!OUTPUT",0) BUILD !OUTPUT; rec=-80,3,f,ascii endif comment first_comp "!pat_id" file !OUTPUT,old; acc=append if AUTOPAT_VERSION > "A.02.06" echo !MSG>*!OUTPUT else file LOGTEMP,old RUN CI.PUB.SYS;parm=3; stdlist=*LOGTEMP; info="echo !MSG" PRINT LOGTEMP; start=3; out=*!OUTPUT reset LOGTEMP endif : !comment !comment Create PATCHER script !comment !print $stdin; out=*PATCHER PARM MSG="!pat_id !sr_number !hpdatef !hptimef" OUTPUT=LOGERRS OPTION nolist comment Append one line to output file. Like PATCHOK - diff defaults file !OUTPUT,old; acc=append if AUTOPAT_VERSION > "A.02.06" echo !MSG>*!OUTPUT else file LOGTEMP,old RUN CI.PUB.SYS;parm=3; stdlist=*LOGTEMP; info="echo !MSG" PRINT LOGTEMP; start=3; out=*!OUTPUT reset LOGTEMP endif : !comment Use PATCHOK to put header into LOGOK !comment !PATCHOK "AUTOPAT - Patches below installed by !!operator !!hpdatef !!hptimef" !PATCHOK "Patch ID SR Number - Module Identity Timestamp" !PATCHOK "======== =========== ============================= =========" !comment !comment Create PATDONE Script !comment !print $stdin; out=*PATDONE PARM MSG="" OPTION list comment comment PATDONE resets the one_liner variable if it was set (bound) from the comment previous patch applied; part of "writing one_liner once" enhancement. comment if _one_liner = true then xeq PATCHOK "-----------------------------------" setvar _one_liner false endif comment comment PATDONE entered after each patch and at other crucial points in comment PATINSTL. If errors occur, PRINT LOGERRS and end the job. comment if finfo("LOGERRS",19) <> 0 then tellop tellop ################################################ tellop # Patch Job FAILED !!!! # tellop # !pat_id !sr_number tellop # PRINT LOGERRS.PATCHXL.SYS for problem cause. # tellop # Use that info to find problem cause in the # tellop # PATINSTL job output listing. # tellop ################################################ comment comment ##################################################### comment ## Error Log Error Log Error Log Error Log ## comment ##################################################### comment print LOGERRS comment comment ##################################################### comment ## Error Log Error Log Error Log Error Log ## comment ##################################################### comment showjcw showvar listeq listf @.patchxl.sys,2 eoj endif : !reset PATCHOK !reset PATCHER !reset PATDONE !if _RELEASE_PROBLEM = TRUE !PATCHOK "!pat_id: A problem was detected trying to extract the System Release" !PATCHOK "!pat_id: and MPE/iX Version strings. Review job STDLIST before patch" !PATCHOK "!pat_id: installation jobs are executed to determine problem cause." !PATCHOK "!pat_id: Patch installation will continue without version checking." ! print SHOWVUF ! showvar _REL@ !endif !setvar _one_liner false !comment !comment End of standard beginning for patch jobs !comment === Installation files follow === !comment ============== COMPLETION template: start=EOF-mm, end=EOF-nn ========== !comment !comment TXLEOJNO: End of Job - non SYSGEN !comment !comment !comment Patch Installation job successful. The following patches will !comment be logged to HPSWINFO.PUB.SYS now: !comment !comment !comment ##################################################### !comment ## Patch Log Patch Log Patch Log Patch Log ## !comment ##################################################### !comment !print LOGOK !comment !comment ##################################################### !comment ## Patch Log Patch Log Patch Log Patch Log ## !comment ##################################################### !comment !comment !comment Append LOGOK to HPSWINFO.PUB.SYS !comment !editor set size=9999 text HPSWINFO.PUB.SYS join LOGOK keep yes exit !comment !comment Since job was successful, we can purge workgroup PATCHXL.SYS !comment !listf @.patchxl.sys,2 !altuser MANAGER.SYS;HOME=PUB !chgroup PUB !purgegroup PATCHXL.SYS !altuser MANAGER.SYS;HOME=!hphgroup !comment !tellop !tellop ************************************************ !tellop * Patch Job Completed! * !tellop * Check Listing before resuming operations * !tellop ************************************************ !eoj ============== COMPLETION template: start=EOF-mm, end=EOF-nn ========== !comment !comment TXLEOJSY: End of Job - SYSGEN !comment !comment Fill up command input file PATCOMS for SYSGEN based on system !comment executable libraries that have been patched. Any other system !comment files will be handled via file equation or PATTEMP contents. !comment !xeq PATCHOK "PERMYES" OUTPUT=PATCOMS !xeq PATCHOK "SYSFILE" OUTPUT=PATCOMS !comment !comment NOTE: Reset file equation for CATALOG.PUB.SYS from older templates. !comment Use proper SYSGEN commands to ensure the CATALOG is replaced. !comment !if finfo("CATALOG.PATCHXL.SYS",0) then ! reset CATALOG.PUB.SYS ! setvar cierror 0 ! xeq PATCHOK "RCAT CATALOG.PATCHXL.SYS" OUTPUT=PATCOMS !endif !comment !comment NOTE: Reset file equation for SL.PUB.SYS from older templates. !comment Use proper SYSGEN commands to ensure the SL.PUB.SYS is replaced. !comment !if finfo("SL.PATCHXL.SYS",0) then ! reset SL.PUB.SYS ! setvar cierror 0 ! xeq PATCHOK "CMSL SL=SL.PATCHXL.SYS" OUTPUT=PATCOMS !endif !comment !comment Create NLLINKIN command file if RELINKIN is found !comment !if finfo("RELINKIN.PATCHXL.SYS",0) then ! setvar pat_id "RELINKER" ! setvar sr_number "procedure replacement patches completed" ! setvar cierror 0 ! BUILD NLLINKIN;rec=-80,16,f,ascii ! if cierror <> 0 then ! xeq PATCHER ! xeq PATCHER "!pat_id: Unable to create NLLINKIN.PATCHXL.SYS, the input" !xeq PATCHER "!pat_id: command file for LINKEDITOR to apply RELINKER patches." ! xeq PATCHER "CIERROR=!hpcierrmsg" ! endif !file NLLINKIN,old; acc=append !xeq PATCHOK "BUILDXL NLLINK" output=NLLINKIN !xeq PATCHOK "PATCHXL FROM=NL.PATCHXL.SYS;TO=NLLINK;& ! MODULE=HP31900;PATCH=^RELINKIN" output=NLLINKIN !xeq PATCHOK "ENDPATCH FROM=NL.PATCHXL.SYS;to=NLLINK" output=NLLINKIN !if lft("!_RELEASE_VUF",4) = "C.45" ! xeq PATCHOK "PURGEXL XL=NLLINK;ENTRY=HP31900_07" output=NLLINKIN ! xeq PATCHOK "COPYXL FROM=NL.PATCHXL.SYS;TO=NLLINK;& ! ENTRY=HP31900_07" output=NLLINKIN !endif !xeq PATCHOK "EXIT" output=NLLINKIN !reset NLLINKIN ! if NOT finfo("NL.PATCHXL.SYS",0) then ! setvar cierror 0 ! copy NL.PUB.SYS,NL.PATCHXL.SYS ! if cierror = 0 then ! else ! xeq PATCHER ! xeq PATCHER "!pat_id: COPY of NL.PUB.SYS failed." ! xeq PATCHER "CIERROR=!hpcierrmsg" ! endif ! endif ! comment Check for errors up to this point by executing PATDONE script ! comment ! xeq PATDONE ! setvar LKEDSTAT 0 ! setvar LKEDCMD 0 ! setvar cierror 0 !comment Any LINKWARN messages are acceptable while applying Relinker patches. ! run linkedit.pub.sys;stdin=NLLINKIN !comment Any LINKWARN messages are acceptable while applying Relinker patches. ! SHOWJCW ! if LKEDSTAT = FATAL0 then ! xeq PATCHER ! xeq PATCHER "!pat_id: Could not apply relinkers to NLLINK.PATCHXL.SYS" ! xeq PATCHER "LINKEDIT failed. LKEDSTAT=!lkedstat LKEDCMD=!lkedcmd" ! xeq PATCHER "Current NL.PUB.SYS still valid" ! else ! if cierror <> 0 then ! xeq PATCHER ! xeq PATCHER "!pat_id: NLLINKIN.PATCHXL.SYS, the input command" ! xeq PATCHER "file for LINKEDIT has a problem or aborted abnormally." ! xeq PATCHER "CIERROR=!hpcierrmsg" ! else ! PURGE nl.patchxl.sys ! RENAME nllink.patchxl.sys,nl.patchxl.sys ! if cierror <> 0 then ! xeq PATCHER ! xeq PATCHER "!pat_id: PURGE NL and RENAME NLLINK,NL failed" ! xeq PATCHER "CIERROR=!hpcierrmsg" ! else ! xeq PATCHOK ! xeq PATCHOK "-----------------------------------" ! tellop ! tellop !pat_id: RELINKER patches to NL ! tellop !pat_id: installed successfully. ! endif ! endif ! endif !endif !comment !comment Check for errors up to this point by executing PATDONE script !comment !xeq PATDONE !if finfo("NL.PATCHXL.SYS",0) then ! if AUTOPAT_VERSION > "A.02.06" ! if lft("!_RELEASE_VUF",6) = "B.40.0" !comment if Release is equal to B.40.00, check for MPEFX56 patch before !comment using LinkEditor CLEANXL;COMPACT operation against NL.PATCHXL.SYS ! echo display launch_pt + d4 > fx56ain ! sompatch nl fx56aout ! setvar fx56last finfo("fx56aout",19) ! print fx56aout;start=!fx56last >fx56one ! print fx56one ! input fx56full 0 then ! xeq PATCHER ! xeq PATCHER "!pat_id: has failed for a reason" ! xeq PATCHER "different than a LinkEditor fatal error." ! xeq PATCHER "CIERROR=!hpcierrmsg" ! else ! xeq PATCHOK ! endif ! endif !comment We end up here if a condition has been detected that prevents us !comment from performing a CLEANXL;COMPACT. An example would be the Release !comment is B.40.00 and MPEFX56 not installed. ! endif ! deletevar fx56@ ! else !comment We end up here if the AUTOPAT version is A.02.06. We should not be !comment be performing CLEANXL;COMPACT on earlier releases. ! endif ! setvar LKEDSTAT 0 ! setvar LKEDCMD 0 ! xeq PATDONE !comment Must recreate START from patched/replaced NL ! setvar jcw 0 ! setvar cierror 0 ! setvar pat_id "Build new START boot image" ! setvar sr_number "for NL.PATCHXL.SYS" ! file image=tempimag ! run SAINT.MPEXL.SYS loadsyslib nl.patchxl.sys loadcme cme.mpexl.sys loadmill extmilli.mpexl.sys loadsxrt dsxrt.mpexl.sys buildpme image,sxrt map map START.MPEXL.SYS exit ! if jcw <> 0 then ! PATCHER ! PATCHER "!pat_id: SAINT failed. JCW=!jcw" ! PATCHER "!pat_id: SAINT reported errors in creating START" ! else ! reset image ! if NOT finfo("TEMPIMAG",0) then ! PATCHER ! PATCHER "!pat_id: SAINT failed. Missing TEMPIMAG file." ! PATCHER "!pat_id: SAINT could not create the START bootable image" ! else ! setvar cierror 0 ! rename tempimag,START ! if cierror <> 0 then ! xeq PATCHER ! xeq PATCHER "!pat_id: RENAME TEMPIMAG file to START failed" ! xeq PATCHER "CIERROR=!hpcierrmsg" ! endif ! endif ! endif ! comment ! comment Check for errors up to this point by executing PATDONE script ! comment ! xeq PATDONE ! xeq PATCHOK ! xeq PATCHOK "-----------------------------------" ! xeq PATCHOK "RNMLIB NL.PATCHXL.SYS" OUTPUT=PATCOMS ! xeq PATCHOK "RBOOT START.MPEXL.SYS FILE=START.PATCHXL.SYS TYPE=DISCBOOT" & ! OUTPUT=PATCOMS !endif !comment NOTE: Reset file eqn for XL.PUB.SYS to be compatible with prior !comment version of template for SOM replacement in XL. By making decision !comment here (instead of when patch applied) we avoid multiple commands for !comment XL replacement. Also, this is consistent with how we handle NL, SL. !comment !if finfo("XL.PATCHXL.SYS",0) then ! reset XL.PUB.SYS ! setvar cierror 0 ! xeq PATCHOK "RSPROG XL.PUB.SYS FILE=XL.PATCHXL.SYS" OUTPUT=PATCOMS !endif !comment !comment PATTEMP (possibly) has SYSGEN commands to replace system programs. !comment !if finfo("PATTEMP",19) > 0 then ! print PATTEMP; out=*PATCOMS !endif !reset PATTEMP !comment !comment Add commands to show the system files and create the tape. !comment !xeq PATCHOK "HOLD" OUTPUT=PATCOMS !xeq PATCHOK "SHOW" OUTPUT=PATCOMS !xeq PATCHOK "EXIT" OUTPUT=PATCOMS !xeq PATCHOK "TAPE MODE=VERBOSE" OUTPUT=PATCOMS !xeq PATCHOK "EXIT" OUTPUT=PATCOMS !reset PATCOMS ! comment ! comment Patch Installation job successful. The following patches will ! comment be logged to a copy of HPSWINFO.PUB.SYS before System Load Tape ! comment creation and file equated in case HPSWINFO is a system file. ! comment ! comment ##################################################### ! comment ## Patch Log Patch Log Patch Log Patch Log ## ! comment ##################################################### ! comment ! print LOGOK ! comment ! comment ##################################################### ! comment ## Patch Log Patch Log Patch Log Patch Log ## ! comment ##################################################### ! comment ! tellop ! tellop ------------------------------------------------ ! tellop Please mount scratch tape ! tellop Creating patch System Load Tape... ! tellop ------------------------------------------------ ! comment ! reset LOGOK ! comment ! comment Append LOGOK to a local copy of HPSWINFO ! comment ! copy HPSWINFO.PUB.SYS,TPSWINFO.PATCHXL.SYS ! if cierror <> 0 then ! tellop ! tellop NOTE: HPSWINFO was not copied to the ! tellop staging area properly. Please ! tellop check this job's output listing ! tellop to determine problem cause. ! else ! editor set size=9999 text TPSWINFO.PATCHXL.SYS join LOGOK keep yes exit ! endif ! setvar cierror 0 ! comment ! comment Set file equation for HPSWINFO in case it has ! comment been made a system file by the customer. ! comment ! FILE HPSWINFO.PUB.SYS=TPSWINFO.PATCHXL.SYS ! FILE NMCONFIG=NMCONFIG.PUB.SYS ! file TLISTEQ;nocctl ! listeq *TLISTEQ ! print TLISTEQ,out=*PLISTEQ;start=4 ! showjcw ! listeq ! listf @.patchxl.sys,2 ! comment ! comment Invoking SYSGEN to create an SLT from PATCOMS input file ! comment ! sysgen , , PATCOMS ! if jcw <> 0 or cierror <> 0 then ! tellop ! tellop ############################################ ! tellop # Patch Job FAILED !!! SYSGEN found one  # ! tellop # or more errors. Review last 300 lines # ! tellop # of output listing for details. Correct # ! tellop # cause then STREAM PATRECOV.PATCHXL.SYS. # ! tellop # PATRECOV will attempt to create the # ! tellop # patched SLT as built by PATINSTL.  # ! tellop ############################################ ! else ! comment ! comment Patch Successful. Modified HPSWINFO being ! comment copied back to HPSWINFO.PUB.SYS. ! comment ! copy TPSWINFO.PATCHXL.SYS,HPSWINFO.PUB.SYS ! if cierror <> 0 then ! tellop ! tellop NOTE: HPSWINFO was not correctly ! tellop updated after SYSGEN completed. ! tellop please check this job's output ! tellop to determine problem cause. ! else ! tellop ! tellop HPSWINFO.PUB.SYS updated successfully! ! endif ! tellop ! tellop ********************************************** ! tellop * Patch Job Completed! * ! tellop * Check Listing before UPDATEing System * ! tellop ********************************************** ! comment ! comment Perform LISTF,3 to a disc file if we need to check it later ! comment ! file patchlf3;dev=!hpoutclass,1 ! listf @.patchxl.sys,3;listfpat ! print listfpat,*patchlf3 ! comment ! comment Since Successful, we can purge PATCHXL.SYS ! comment ! altuser MANAGER.SYS;HOME=PUB ! chgroup PUB ! purgegroup PATCHXL.SYS ! altuser MANAGER.SYS;HOME=!hphgroup ! endif !eoj ============== RECOVERY template: start=EOF-mm, end=EOF-nn =========== !comment !comment TXLRECOV: PATRECOV job for recovery from SYSGEN errors. !comment !comment The PATRECOV job file is used for creating SLT. This allows !comment easier recovery if SYSGEN aborts with a correctable error. !comment !setvar HPAUTOCONT true !setvar HPPATH '!!hpgroup,pub.sys,pub' !setjcw jcw 0 !comment !comment Checking for an "empty" PLISTEQ file. If not at least 5 records !comment long, then the aborted patch install job never made it to SYSGEN. !comment This would invalidate any recovery effort made by this job. !comment !if finfo ("PLISTEQ",0) and finfo("PLISTEQ",19) > 3 then ! comment ! comment Executing PLISTEQ to activate file equations from the ! comment previously aborted PATINSTL job. ! comment ! XEQ PLISTEQ.PATCHXL.SYS ! listeq ! tellop ! tellop ------------------------------------------------ ! tellop Please mount scratch tape ! tellop Creating patch System Load Tape... ! tellop ------------------------------------------------ ! comment ! comment Invoking SYSGEN to create an SLT from PATCOMS input file ! comment ! sysgen , , PATCOMS ! if jcw <> 0 or cierror <> 0 then ! tellop ! tellop ############################################ ! tellop # PATRECOV recovery job FAILED !!!!  # ! tellop # SYSGEN encountered one or more errors. # ! tellop # Review Listing for Details. Correct # ! tellop # cause then STREAM PATRECOV.PATCHXL.SYS. # ! tellop # PATRECOV will attempt to create the # ! tellop # patched SLT as built by PATINSTL.  # ! tellop ############################################ ! else ! comment ! comment Patch Successful. Modified HPSWINFO being ! comment copied back to HPSWINFO.PUB.SYS. ! comment ! copy TPSWINFO.PATCHXL.SYS,HPSWINFO.PUB.SYS ! if cierror <> 0 then ! tellop NOTE: HPSWINFO was not correctly ! tellop updated after SYSGEN completed. ! tellop please check this job's output ! tellop to determine problem cause. ! else ! tellop ! tellop HPSWINFO.PUB.SYS updated successfully! ! endif ! file patchlf3;dev=!hpoutclass,1 ! listf @.patchxl.sys,3;listfpat ! print listfpat,*patchlf3 ! comment Since job completed successfully, we can PURGEGROUP PATCHXL.SYS. ! comment ! altuser MANAGER.SYS;HOME=PUB ! chgroup PUB ! purgegroup PATCHXL.SYS ! altuser MANAGER.SYS;HOME=!hphgroup ! tellop ! tellop ************************************************ ! tellop * PATRECOV Job Successfully Completed! * ! tellop * Check Listing of this file for completeness * ! tellop ************************************************ ! endif !else ! tellop ! tellop ################################################ ! tellop # Invalid attempt to use PATRECOV job because # ! tellop # PLISTEQ was never written to by the failed # ! tellop # PATINSTL job. PATINSTL failed due to another # ! tellop # problem that is not recoverable by PATRECOV. # ! tellop ################################################ !endif !eoj