User Tools

Site Tools


parsec_autogen.com_and_a_sample_execution

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
parsec_autogen.com_and_a_sample_execution [2019/10/23 18:28] mmacgregorparsec_autogen.com_and_a_sample_execution [2021/09/16 21:55] mmacgregor
Line 1: Line 1:
 ====== Information ====== ====== Information ======
  
-The following document is a more user friendly method of using AUTOGEN.COM and being able to easily visualize the proposed changes.+The following document is a more user friendly method of using AUTOGEN.COM and being able to easily visualize the proposed changes. Errors may occur during the copy/paste of this document, so test it in a safe place before using it in production.
  
 ====== Procedure ====== ====== Procedure ======
Line 8: Line 8:
 Create a command procedure with the following information: Create a command procedure with the following information:
  
-  $! My_autogen.com +$! My_autogen.com 
-  $! +$! 
-  $! This procedure executesautogen.com and displays the report to the user +$! This procedure executesautogen.com and displays the report to the user 
-  $! Along with a list of changed parameters +$! Along with a list of changed parameters 
-  $! If the system has been up 14 days or more, it will save feedback information +$! If the system has been up 14 days or more, it will save feedback information 
-  $! And use it, otherwise it will use previously saved feedback information. +$! And use it, otherwise it will use previously saved feedback information. 
-  $! +$! 
-  $ define /user_mode sys$output sys$scratch:params.inf_old +$! Check privs 
-  $ mcr sysgen +$! 
-    use active +$ privs_needed = "sysprv,cmkrnl,oper" 
-    show/all +$ svprv = f$setprv (privs_needed) 
-    show/special +$ cur_prv = f$privilege(privs_needed) 
-    use current +$ if cur_prv .eqs. "FALSE" 
-    write sys$scratch:vmssys.parsec +$ then 
-  $! +$    write sys$output "You have insufficient privileges for this procedure." 
-  $ call uptime +$    exit 
-  $ if uptime_days .ge. 14 +$ else 
-  $    then start = "savparams" +$    write sys$output "You have sufficient privileges to continue." 
-  $    else start = "getdata" +$ endif 
-  $    endif +$! 
-  $ if p1 .nes. "" then start = p1 +$! Block CNTL-Y 
-  $ if start .nes. "NONE" +$! 
-  $ then +$ type sys$input 
-  $       if p2 .eqs. "" then p2 = "setparams" + 
-  $       write sys$output "@sys$update:autogen ''start' ''p2' ''p3'" + 
-  $       svprv = f$setprv ("sysprv,cmkrnl"+      The CTRL-Y is being blocked in this procedure. Please be patient 
-  $       @sys$update:autogen 'start' 'p2' 'p3' +      and wait for the "Do you wish to keep these changes [Y]?" question 
-  $       svprv = f$setprv (svprv) +      and answer no. 
-  $ endif + 
-  $! +      This is being done to prevent accidental changes of the system 
-  $ define /user_mode sys$output sys$scratch:params.inf_new +      parameters that will affect the next reboot when you intended 
-  $ mcr sysgen +      to exit the procedure. 
-    use current + 
-    show/all + 
-    show/special +$ set nocontrol=y 
-  $! +
-  $ close /nolog in1 +$ define /user_mode sys$output sys$scratch:params.inf_old 
-  $ close /nolog in2 +$ mcr sysgen 
-  $ close /nolog out +  use active 
-  $ open /read in1 sys$scratch:params.inf_new +  show/all 
-  $ open /read in2 sys$scratch:params.inf_old +  show/special 
-  $ open /write out sys$scratch:params.inf_dif +  use current 
-  $ write out "Parameter name               Old value  New value Difference    Default+  write sys$scratch:vmssys.parsec 
-  $next_diff: +$! 
-  $ read in1 /end=done_diff rec1 +$ call uptime 
-  $ read in2 rec2 +$ if uptime_days .ge. 14 
-  $ if rec1 .eqs. rec2 then goto next_diff +$    then start = "savparams" 
-  $ if f$extract (2, 9, rec1) .eqs. "Parameter" then goto next_diff +$    else start = "getdata" 
-  $ rec1 = f$edit (rec1, "trim"+$    endif 
-  $ pname = f$element (0, " ", rec1) +$ if p1 .nes. "" then start = p1 
-  $ if pname .eqs. "internal" then goto next_diff +$ if start .nes. "NONE" 
-  $ mode = f$extract (f$length(rec1)-5, 5, rec1) +$ then 
-  $ if mode .eqs. "Ascii" +$       if p2 .eqs. "" then p2 = "setparams" 
-  $ then +$       write sys$output "@sys$update:autogen ''start' ''p2' ''p3'" 
-  $       pnew = f$edit (f$element (1, """", rec1), "trim"+$       svprv = f$setprv ("sysprv,cmkrnl"
-  $       pnew = f$extract (f$length(pnew), 10, "          " + pnew) +$       @sys$update:autogen 'start' 'p2' 'p3' 
-  $       pdef = f$edit (f$element (3, """", rec1), "trim"+$       svprv = f$setprv (svprv) 
-  $       pdef = f$extract (f$length(pdef), 10, "          " + pdef) +$ endif 
-  $       pold = f$edit (f$element (1, """", rec2), "trim"+$! 
-  $       pold = f$extract (f$length(pold), 10, "          " + pold) +$ define /user_mode sys$output sys$scratch:params.inf_new 
-  $       write out f$fao ("!24AS !10AS !10AS            !10AS", pname, pold, pnew, pdef) +$ mcr sysgen 
-  $ else +  use current 
-  $       rec1 = f$edit (rec1, "compress"+  show/all 
-  $       pnew = f$integer (f$element (1, " ", rec1)) +  show/special 
-  $       pdef = f$interer (f$element (2, " ", rec1)) +$! 
-  $       rec2 = f$edit (rec2, "trim,compress"+$ close /nolog in1 
-  $       pold = f$integer (f$element (1, " ", rec2)) +$ close /nolog in2 
-  $       diff = f$fao ("!10SL", f$integer(pnew) - f$integer(pold)) +$ close /nolog out 
-  $       write out f$fao ("!24AS !10UL !10UL !AS !10UL", pname, pold, pnew, diff,pdef) +$ open /read in1 sys$scratch:params.inf_new 
-  $ endif +$ open /read in2 sys$scratch:params.inf_old 
-  $ goto next_diff +$ open /write out sys$scratch:params.inf_dif 
-  $done_diff: +$ write out "Parameter name               Old value  New value Difference    Def 
-  $ close in1 +ault
-  $ close in2 +$next_diff: 
-  $ delete sys$scratch:params.inf_new;+$ read in1 /end=done_diff rec1 
-  $ delete sys$scratch:params.inf_old;+$ read in2 rec2 
-  $ close out +$ if rec1 .eqs. rec2 then goto next_diff 
-  $ if start .nes. "NONE" then - +$ if f$extract (2, 9, rec1) .eqs. "Parameter" then goto next_diff 
-    read sys$command recl/prompt="Press <RETURN> to review reports " +$ rec1 = f$edit (rec1, "trim"
-  $ type /page=save sys$scratch:params.inf_dif,sys$system:agen$params.report +$ pname = f$element (0, " ", rec1) 
-  $ if start .nes. "NONE" +$ if pname .eqs. "internal" then goto next_diff 
-  $ then +$ mode = f$extract (f$length(rec1)-5, 5, rec1) 
-  $       read sys$command recl/prompt="Do you wish to keep these changes [Y]? " +$ if mode .eqs. "Ascii" 
-  $       if recl .nes. "" .and. .not. recl +$ then 
-  $       then +$       pnew = f$edit (f$element (1, """", rec1), "trim"
-  $               mcr sysgen +$       pnew = f$extract (f$length(pnew), 10, "          " + pnew) 
-    use sys$scratch:vmssys.parsec +$       pdef = f$edit (f$element (3, """", rec1), "trim"
-    write current +$       pdef = f$extract (f$length(pdef), 10, "          " + pdef) 
-  $       endif +$       pold = f$edit (f$element (1, """", rec2), "trim"
-  $ endif +$       pold = f$extract (f$length(pold), 10, "          " + pold) 
-  $ delete sys$scratch:params.inf_dif;*,sys$scratch:vmssys.parsec;+$       write out f$fao ("!24AS !10AS !10AS            !10AS", pname, pold, pnew 
-  $ exit +, pdef) 
-  $! +$ else 
-  $! Support routine +$       rec1 = f$edit (rec1, "compress"
-  $uptime: +$       pnew = f$integer (f$element (1, " ", rec1)) 
-  $ subroutine +$       pdef = f$interer (f$element (2, " ", rec1)) 
-  $! UPTIME.COM +$       rec2 = f$edit (rec2, "trim,compress"
-  $! +$       pold = f$integer (f$element (1, " ", rec2)) 
-  $! This procedure gets system current uptime from a SHOW SYSTEM command +$       diff = f$fao ("!10SL", f$integer(pnew) - f$integer(pold)) 
-  $! And stores the value in some global symbols. +$       write out f$fao ("!24AS !10UL !10UL !AS !10UL", pname, pold, pnew, diff, 
-  $! +pdef) 
-  $ show system /output=uptime.dat +$ endif 
-  $ open /read /share=read inf uptime.dat +$ goto next_diff 
-  $!OpenVMS V6.2-1H3  on node PARIS   4-FEB-1999 10:11:36:.03  Uptime  10 18:48:48 +$done_diff: 
-  $ read inf upt +$ close in1 
-  $ close inf +$ close in2 
-  $ delete /nolog uptime.dat;+$ delete sys$scratch:params.inf_new;
-  $ x = f$locate ("Uptime", upt) +$ delete sys$scratch:params.inf_old;
-  $ upt = f$extract (x+7, 9999, upt) +$ close out 
-  $ uptime == f$edit (upt, "trim,compress"+$ if start .nes. "NONE" then - 
-  $ uptime_days == f$integer (f$element (0, " ", uptime)) +  read sys$command recl/prompt="Press <RETURN> to review reports " 
-  $ x = f$element (0, ":", uptime) +$ type /page=save sys$scratch:params.inf_dif,sys$system:agen$params.report 
-  $ uptime_hours == uptime_days * 24 + f$integer (f$element (1, " ", x)) +$ if start .nes. "NONE" 
-  $ if p1 .nes. "" then - +$ then 
-  write sys$output "''f$getsyi("nodename")' has been up ''uptime'" +$       read sys$command recl/prompt="Do you wish to keep these changes [Y]? " 
-  $ exit +$       if recl .nes. "" .and. .not. recl 
-  $ endsubroutine+$       then 
 +$               mcr sysgen 
 +  use sys$scratch:vmssys.parsec 
 +  write current 
 +$       endif 
 +$ endif 
 +$ delete sys$scratch:params.inf_dif;*,sys$scratch:vmssys.parsec;
 +$ exit 
 +$! 
 +$! Support routine 
 +$uptime: 
 +$ subroutine 
 +$! UPTIME.COM 
 +$! 
 +$! This procedure gets system current uptime from a SHOW SYSTEM command 
 +$! And stores the value in some global symbols. 
 +$! 
 +$ show system /output=uptime.dat 
 +$ open /read /share=read inf uptime.dat 
 +$!OpenVMS V6.2-1H3  on node PARIS   4-FEB-1999 10:11:36:.03  Uptime  10 18:48:48 
 +$ read inf upt 
 +$ close inf 
 +$ delete /nolog uptime.dat;
 +$ x = f$locate ("Uptime", upt) 
 +$ upt = f$extract (x+7, 9999, upt) 
 +$ uptime == f$edit (upt, "trim,compress"
 +$ uptime_days == f$integer (f$element (0, " ", uptime)) 
 +$ x = f$element (0, ":", uptime) 
 +$ uptime_hours == uptime_days * 24 + f$integer (f$element (1, " ", x)) 
 +$ if p1 .nes. "" then - 
 +write sys$output "''f$getsyi("nodename")' has been up ''uptime'" 
 +$ exit 
 +$ endsubroutine 
      
 This is a sample run of the procedure: This is a sample run of the procedure:
  
   $ @PARSEC_AUTOGEN   $ @PARSEC_AUTOGEN
-  @sys$update:autogen savparams setparams + You have sufficient privileges to continue
-  %AUTOGEN-I-BEGIN, SAVPARAMS phase is beginning+ 
-  %AUTOGEN-I-FEEDBACK, Gathering feedback + 
-  %AUTOGEN-I-NEWFILE, A new version of SYS$SYSTEM:AGEN$FEEDBACK.DAT +      The CTRL-Y is being blocked in this procedurePlease be patient 
-        has been created. You may wish to purge this file+      and wait for the "Do you wish to keep these changes [Y]?" question 
-  %AUTOGEN-I-END, SAVPARAMS phase has successfully completed+      and answer no
-  %AUTOGEN-I-BEGIN, GETDATA phase is beginning. + 
-  %AUTOGEN-I-NEWFILE, A new version of SYS$SYSTEM:PARAMS.DAT has been created.+      This is being done to prevent accidental changes of the system 
 +      parameters that will affect the next reboot when you intended 
 +      to exit the procedure
 + 
 + 
 +@sys$update:autogen getdata setparams 
 +%AUTOGEN-I-BEGIN, GETDATA phase is beginning. 
 +%AUTOGEN-I-NEWFILE, A new version of SYS$SYSTEM:PARAMS.DAT has been created.
         You may wish to purge this file.         You may wish to purge this file.
-  %AUTOGEN-I-END, GETDATA phase has successfully completed. +%AUTOGEN-I-END, GETDATA phase has successfully completed. 
-  %AUTOGEN-I-BEGIN, GENPARAMS phase is beginning. +%AUTOGEN-I-BEGIN, GENPARAMS phase is beginning. 
-  %AUTOGEN-I-NEWFILE, A new version of SYS$MANAGER:VMSIMAGES.DAT has been created.+%AUTOGEN-I-NEWFILE, A new version of SYS$MANAGER:VMSIMAGES.DAT has been created.
         You may wish to purge this file.         You may wish to purge this file.
-  %AUTOGEN-I-NEWFILE, A new version of SYS$SYSTEM:SETPARAMS.DAT has been created.+%AUTOGEN-I-NEWFILE, A new version of SYS$SYSTEM:SETPARAMS.DAT has been created.
         You may wish to purge this file.         You may wish to purge this file.
-  %AUTOGEN-I-END, GENPARAMS phase has successfully completed. +%AUTOGEN-I-END, GENPARAMS phase has successfully completed. 
-  %AUTOGEN-I-BEGIN, GENFILES phase is beginning. +%AUTOGEN-I-BEGIN, GENFILES phase is beginning. 
-  Computed size: 25165800;  current size: 1404604 + 
-  %SYSGEN-I-EXTENDED, SYS$SYSROOT:[SYSEXE]PAGEFILE.SYS;1 extended +****************** 
-        . +%AUTOGEN-W-REPORT, Warnings were detected by AUTOGEN.  Please review the
-        Extending +
-            SYS$SYSROOT:[SYSEXE]PAGEFILE.SYS +
-        by 200000 blocks required 11 seconds.  This suggests that +
-        high-water marking is currently enabled for this volume.  AUTOGEN +
-        will not extend the file further at this time. +
-        . +
-        If your security environment allows you to temporarily disable +
-        high-water marking, the suggested commands are: +
-        . +
-        $ SET VOLUME/NOHIGH SYS$SYSTEM +
-        $ MCR SYSGEN CREATE SYS$SYSROOT:[SYSEXE]PAGEFILE.SYS /SIZE = 25165800 +
-        $ SET VOLUME/HIGH SYS$SYSTEM +
-        . +
-        The system must then be rebooted in order to use the extended file size. +
-  Computed size: 3298481;  current size: 3206816 +
-  %SYSGEN-I-EXTENDED, CLASS3$DKA100:[SYS0.SYSEXE]SYSDUMP.DMP;3 extended +
-  Computed size: 102000;  current size: 124000 +
-  %SYSGEN-I-CREATED, SYS$SYSROOT:[SYSEXE]SWAPFILE.SYS;2 created +
-  . +
-  ****************** +
-  %AUTOGEN-W-REPORT, Warnings were detected by AUTOGEN.  Please review the+
         information given in the file SYS$SYSTEM:AGEN$PARAMS.REPORT         information given in the file SYS$SYSTEM:AGEN$PARAMS.REPORT
-  ****************** +****************** 
-  . + 
-  %AUTOGEN-I-REPORT, AUTOGEN has produced some informational messages which+%AUTOGEN-I-REPORT, AUTOGEN has produced some informational messages which
         have been stored in the file SYS$SYSTEM:AGEN$PARAMS.REPORT.  You may         have been stored in the file SYS$SYSTEM:AGEN$PARAMS.REPORT.  You may
         wish to review the information in that file.         wish to review the information in that file.
-  . + 
-  %AUTOGEN-I-END, GENFILES phase has successfully completed. +%AUTOGEN-I-END, GENFILES phase has successfully completed. 
-  %AUTOGEN-I-BEGIN, SETPARAMS phase is beginning. +%AUTOGEN-I-BEGIN, SETPARAMS phase is beginning. 
-  %AUTOGEN-I-SYSGEN, parameters modified +%AUTOGEN-I-SYSGEN, parameters modified 
-  %AUTOGEN-I-END, SETPARAMS phase has successfully completed. +%AUTOGEN-I-END, SETPARAMS phase has successfully completed. 
-  . +Press <RETURN> to review reports 
-  Press <RETURN> to review reports+
   Parameter name            Old value  New value Difference    Default   Parameter name            Old value  New value Difference    Default
   GBLSECTIONS                    1620       1570        -50       1024   GBLSECTIONS                    1620       1570        -50       1024
parsec_autogen.com_and_a_sample_execution.txt · Last modified: 2021/10/12 17:58 by mmacgregor

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki