|
|
(9 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| <!-- Page name: SirLib programmer's reference-->
| | <p class="caption" style="width:550px">SirPro procedure list screen</p> |
| | |
| <p class="caption" style="width:550px">SirPro Procedure List screen</p> | |
| <p class="figure">[[File:SlibProcList.png|550px]]</p> | | <p class="figure">[[File:SlibProcList.png|550px]]</p> |
|
| |
|
Line 7: |
Line 5: |
| programmer in the <var class="product">SirLib</var>-controlled environment. | | programmer in the <var class="product">SirLib</var>-controlled environment. |
| This screen, and others like it, provide access to all procedure activity | | This screen, and others like it, provide access to all procedure activity |
| in <var class="product">Model 204</var>. | | in <var class="product">Model 204</var>. |
| Details on the use of <var class="product">SirPro</var>, including managed update commands, are | | Details on the use of <var class="product">SirPro</var>, including managed update commands, are contained in the [[SirPro]] pages. |
| contained in the [[SirPro]] pages. | | Managed update prefix commands are the only part of <var class="product">SirPro</var> discussed in this document. |
| Managed update prefix commands are the only part of <var class="product">SirPro</var> discussed in | | |
| this document. | | <p class="note"><b>Note:</b> You access a similar procedure list in [[RKWeb]] by selecting <code>Build > Edit</code> and clicking the <b>Open Procedure List</b> button. Prefix commands are not available in RKWeb, however, and require the SirPro TN3270 interface. </p> |
| | | |
| The <var>X</var>, <var>Q</var>, <var>N</var>, <var>K</var>, and <var>Z</var> prefix commands are used to generate "working," | | The <var>X</var>, <var>Q</var>, <var>N</var>, <var>K</var>, and <var>Z</var> prefix commands are used to generate "working," |
| Base, and Sequenced copies of procedures and to generate updates from | | Base, and Sequenced copies of procedures and to generate updates from those copies. |
| those copies. | |
| The programmer types one of these managed update commands to the left of the | | The programmer types one of these managed update commands to the left of the |
| selected procedure and presses Enter. | | selected procedure and presses Enter. |
| <var class="product">SirPro</var> then presents one of the managed update screens to get further | | <var class="product">SirPro</var> then presents one of the managed update screens to get further details on the managed update. |
| details on the managed update. | |
| Those screens are shown in the following detailed sections. | | Those screens are shown in the following detailed sections. |
|
| |
| ==Q (SEQUENCE) command==
| |
| "Sequencing" is the managed update method by which programmers
| |
| make copies of procedures to work on.
| |
| In other systems, programmers make backup copies of procedures and then
| |
| work on the original.
| |
| In <var class="product">SirPro</var> programmers never alter the original program code, but execute
| |
| <var>Q</var> commands to get working and sequenced copies from which
| |
| update procedures can be generated.
| |
|
| |
| Updates must be done in a file other than the original, which is why
| |
| procedure groups are recommended for development apsys.
| |
|
| |
| <p class="caption" style="width:522px">SirPro screen for generating SEQ and working procedure copies</p>
| |
| <p class="figure">[[File:SlibSeqProc.png|522px]]</p>
| |
|
| |
| The <var>Q</var> command tells <var class="product">SirLib</var> to generate both a copy of the selected
| |
| procedure (the copy that the programmer will work on) and a "sequenced"
| |
| copy of the procedure (a copy containing sequence or line numbers), which
| |
| will later be used as comparison input for the <var>Xcompare</var> command.
| |
| Building these copies is always the first programming step in generating
| |
| a managed update.
| |
| The <var>Q</var> prefix command presents a screen (Sequence Procedure) with the
| |
| following input fields:
| |
| <table class="thJustBold">
| |
| <tr><th>Input procedure</th>
| |
| <td>The following two fields identify the source procedure, that is, the version of the procedure before it is changed. This information is copied from the entry on the SirPro procedure editor screen.
| |
| <table class="thJustBold">
| |
| <tr><th>Proc file</th>
| |
| <td>Name of the <var class="product">Model 204</var> file containing the source procedure.</td></tr>
| |
|
| |
| <tr><th>Procedure</th>
| |
| <td>Name of the source procedure. This is the procedure that was subject to a <var>Q</var> prefix command on the <var class="product">SirPro</var> Edit screen.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th>Output procedures</th>
| |
| <td><var class="product">SirLib</var> is designed to work in a <var class="product">Model 204</var> subsystem (APSY) context using procedure groups.
| |
| The <var>Q</var> command creates two output procedures that must be in a different file from the source procedure.
| |
| One of these procedures is used as a working copy, while the other procedure is used to determine any changes made to the working copy.
| |
| Both of these procedures are formed by applying any staged updates to the indentified source procedure.
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>Proc file</th>
| |
| <td>Name of the <var class="product">Model 204</var> file to contain the two procedures produced by the <var class="product">SirLib</var> <var>Q</var> command.</td></tr>
| |
|
| |
| <tr><th>Password</th>
| |
| <td>If a password is required for update access to the file it must be entered here.</td></tr>
| |
|
| |
| <tr><th>Unsequenced procedure</th>
| |
| <td>Name of the procedure that will become the working copy for developing and testing changes. This defaults to the name of the source procedure.</td></tr>
| |
|
| |
| <tr><th>Sequenced procedure</th>
| |
| <td>Name of the procedure that will contain a sequenced version of the working copy, <b>before</b> any changes have been made.
| |
| The sequenced procedure may be used by the <var class="product">SirLib</var> <var>X</var> command to prepare an update procedure reflecting any changes made to the working copy.
| |
| The default procedure name for sequenced procedures is the unsequenced procedure name prefixed with <code>SEQ.</code>:
| |
| <p class="code">SEQ.<i>unsequenced-procedure-name</i></p>
| |
| This default prefix may be overridden if it conflicts with local conventions.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th>Location of control and <br>update procedures</th>
| |
| <td><var class="product">SirLib</var> uses a naming convention to identify any updates that should be applied to the source procedure before generating a working copy.
| |
| FixFile is searched for a "Control Procedure" whose name must be the name of the input procedure file prefixed with <code>CONTROL.</code>:
| |
| <p class="code">CONTROL.<i>input-procedure-proc-file-name</i></p>
| |
| <p>
| |
| The Control Procedure identifies all projects with updates to procedures in the input procedure file. For each such project, FixFile is checked for Update Procedures that should be applied to the source procedure. </p>
| |
|
| |
|
| <table class="thJustBold">
| | {{Template:SirPro commands}} |
| <tr><th>FixFile</th>
| |
| <td>Name of <var class="product">Model 204</var> file containing control and update procedures used to build the output procedures. Default is <b>SIRLIBP</b>.</td></tr>
| |
|
| |
| <tr><th>Password</th>
| |
| <td>Read access is required for the control procedure any update procedures. If a password is required for read access it must be entered here.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th nowrap>Replace existing procedures?</th>
| |
| <td>Overlaying a working copy or sequenced copy of a procedure can cause updates in progress to be lost.
| |
| The default for this field is <code>N</code>, which directs the <var>Q</var> command to not overwrite an existing procedure.
| |
| If you want to overwrite existing procedures, set this indicator to <code>Y</code>.</td></tr>
| |
| </table>
| |
|
| |
| When the <var>Q</var> command is executed, <var class="product">SirLib</var> looks in the
| |
| source file for a procedure named <code>BASE.<i>procname</i></code>, where
| |
| <i>procname</i> is the name of the selected procedure.
| |
| If no such procedure is found, <var class="product">SirLib</var> copies the procedure into the
| |
| target procedure in the Output file.
| |
| In addition, <var class="product">SirLib</var> generates a sequenced copy of the procedure, named
| |
| whatever the programmer specified in the <b>Sequenced Copy</b> field on
| |
| this screen.
| |
| The sequenced copy of the procedure is identical to the unsequenced (or
| |
| working) copy, except that each line is prefixed with a sequence number.
| |
|
| |
| If <var class="product">SirLib</var> does find a <code>BASE.<i>procname</i></code> procedure, it
| |
| looks for the <code>CONTROL.<i>filename</i></code> procedure in the specified
| |
| FixFile.
| |
| A control procedure of the specified name must exist, or the <var>Q</var> command fails.
| |
| Noting the active projects in the control procedure, <var class="product">SirLib</var> finds all
| |
| update procedure names that match the pattern:
| |
| <p class="code"><i>file</i>.<i>project</i>.<i>procname</i>
| |
| </p>
| |
| Where:
| |
| <ul>
| |
| <li><var class="term">file</var> is the name of the input file for this operation.</li>
| |
|
| |
| <li><var class="term">procname</var> is the name of the selected input procedure.</li>
| |
|
| |
| <li><var class="term">project</var> is one of the identifiers in columns 1 to 8 of the control procedure.</li>
| |
| </ul>
| |
| All update procedure names that conform to this pattern are sorted by their
| |
| project and then by the sequence line numbers they affect.
| |
| This aggregate update is then applied to <code>BASE.<i>procname</i></code> to
| |
| produce the sequenced and unsequenced output procedures.
| |
| In other words, the programmer doesn't just get a copy of the procedure
| |
| they request, they get a generated procedure composed of the Base procedure
| |
| with all updates applied to it.
| |
|
| |
| If a project name is commented out in the control procedure, it is not
| |
| included in the resulting sequenced and unsequenced output procedures.
| |
| A Project name is commented out by placing an asterisk (<tt>*</tt>) in
| |
| front of it in the control procedure.
| |
| (This is how working versions of production procedures can be generated in
| |
| development regions if the development region has active projects that do
| |
| not exist yet in production).
| |
|
| |
| The sequenced version of a procedure should never be changed, as it is
| |
| the "before" image for the <var>XCOMPARE</var> that will eventually generate
| |
| the update procedure.
| |
| Sequence numbers should not concern programmers for the most part, though
| |
| there are a few times when it is worth knowing something about how they work.
| |
|
| |
| The <var>Q</var> command automatically begins sequencing at 10000 and
| |
| increments each line in the <code>BASE.<i>procname</i></code> procedure by 10000.
| |
| As changes are generated, the <var>XCOMPARE</var> function generates new line numbers
| |
| for lines of code being inserted and replaced.
| |
| The <var>XCOMPARE</var> algorithm attempts to number the first new line of code
| |
| beginning with a sequence number 1 greater than its starting point in the
| |
| existing sequence (this applies to Inserts and Replaces: it is irrelevant
| |
| for Deletes).
| |
| Subsequent new lines which are part of the same update are incremented by a
| |
| power of 10 less than the last sequence of numbers for the section of code.
| |
| Later changes that apply to the same section again begin numbering at their
| |
| starting sequence number plus 1, and continue to increment at the next
| |
| lowest available power of 10.
| |
|
| |
| Fortunately, the programmer doesn't have to understand any of this in
| |
| order for it to work.
| |
| The lower-order digit(s) of the sequence numbers in a <var>SEQ</var> procedure however
| |
| will indicate the number of times a section of code has been changed.
| |
| The sequence numbers themselves will indicate whether the <var>XCOMPARE</var> will be
| |
| able to "fit" changes into the same section of code again.
| |
| For example, a section of code with sequence numbers like the following
| |
| indicates that changes will still "fit" in the hundreds and tens columns:
| |
| <p class="code"><nowiki>003451001
| |
| 003452001
| |
| 003453001
| |
| </nowiki></p>
| |
| If an update procedure attempts to insert three lines of code
| |
| after line 003452001, the resulting code is numbered like this:
| |
| <p class="code"><nowiki>003451001
| |
| 003452001
| |
| 003452102
| |
| 003452202
| |
| 003452302
| |
| 003453001
| |
| 003454001
| |
| </nowiki></p>
| |
|
| |
| Replace (<code>./R</code>) commands operate slightly differently than
| |
| Insert, but the outcome looks very similar.
| |
| When changes no longer "fit" within the sequence numbers <var>XCOMPARE</var>
| |
| will still generate an update procedure for this section of code, but the
| |
| update procedure will be unnecessarily long and <var class="product">SirLib</var> might lose its
| |
| ability to detect update collisions.
| |
| In this case, a
| |
| Resequence is required, as described later in this page.
| |
|
| |
| Once an initial update has been coded and the update procedure saved in
| |
| the FixFile, all subsequent <var>Q</var> commands against the same
| |
| procedure will generate copies containing the update, and sequence
| |
| numbers in output sequenced versions of the procedure will reflect the
| |
| insertion of the update code.
| |
|
| |
| ==X (XCOMPARE) command==
| |
| Prefixing a procedure by an <var>X</var> in <var class="product">SirPro</var> tells the <var class="product">SirLib</var> system
| |
| to compare the specified procedure against a matching "sequenced"
| |
| procedure, generating another procedure that containing the differences
| |
| between the two.
| |
| The <var>X</var> prefix command presents an <var>XCOMPARE</var> screen:
| |
|
| |
| <p class="caption" style="width:527px">SirPro XCOMPARE screen</p>
| |
| <p class="figure">[[File:SlibXcompare.png|527px]]</p>
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th nowrap>Unsequenced input procedure</th>
| |
| <td>Identifies the procedure to be examined for changes, which was the object of an <var>X</var> command from a <var class="product">SirPro</var> procedure list screen.
| |
| <table class="thJustBold">
| |
| <tr><th>Proc file</th>
| |
| <td>Protected field showing name of input procedure.</td></tr>
| |
|
| |
| <tr><th>Procedure</th>
| |
| <td>Protected field showing name of unsequenced input procedure.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th>Sequenced input procedure</th>
| |
| <td>Identifies the sequenced version of the input procedure, showing its contents prior to any changes.
| |
| <table class="thJustBold">
| |
| <tr><th>Proc file</th>
| |
| <td>Name of <var class="product">Model 204</var> file containing the sequenced input procedure. Deafults to the same file as the input unsequenced procedure.</td></tr>
| |
|
| |
| <tr><th>Password</th>
| |
| <td>Read access is required for the sequenced input procedure. If the file is not already open with sufficient privileges and a password will be required, it should be entered here.</td></tr>
| |
|
| |
| <tr><th>Procedure</th>
| |
| <td>Name of the procedure containing a sequenced representation of the unsequenced input procedure before any changes were applied. Defaults to the name of the unsequenced input procedure with a prefix of
| |
| <code>SEQ.</code>.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th nowrap>Output update procedure</th>
| |
| <td>Identifies the location and name of an update procedure that will contain the changes that have been made to the sequenced version of the source procedure.
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>FixFile</th>
| |
| <td>Name of <var class="product">Model 204</var> file to contain the update procedure produced by this invocation of <var>XCOMPARE</var>.</td></tr>
| |
|
| |
| <tr><th>Password</th>
| |
| <td>Write access is required for the output update procedure. If the file is not already open with sufficient privileges and a password will be required, it should be entered here.</td></tr>
| |
|
| |
| <tr><th nowrap>Project name</th>
| |
| <td>This is the 8-character project name to which this update should be linked.
| |
| <p>
| |
| The file administrator may have required that updates for this file only be linked to existing projects, in which case the entered project name is checked to make sure it exists in the control procedure.
| |
| If this setting is not on, updates may be created, and the project entered in the control procedure later.</p></td></tr>
| |
|
| |
| <tr><th>Target File</th>
| |
| <td>This is the production file containing the base procedure against which this update will apply.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th>Replace existing update</th>
| |
| <td>Entering <var>Y</var> in this field allows the user to overwrite an existing version of the update procedure with the latest changes.
| |
| Programmers are always permitted to overwrite update procedures created under their userid when this switch is set to <var>Y</var>.
| |
| The file administrator may have specified in the Administration options that programmers may not overwrite each other's update procedures either in this file or within the entire system.
| |
| If this option is set, and an update procedure exists of the same name as the one being created in the target file, and the userid who created the update procedure (or last updated it) is not the same as the current user's ID, the generation of the update is not permitted.</td></tr>
| |
|
| |
| <tr><th nowrap>Enter Editor for update</th>
| |
| <td>Entering <var>Y</var> in this prompt places the generating user into an edit session on the new update procedure. The update procedure will have already been stored before the edit session is invoked,
| |
| so PF3 or Quit may be used to exit the edit session without losing the update procedure.</td></tr>
| |
|
| |
| <tr><th>Synchronization count</th>
| |
| <td>This field allows programmers to set the number of lines that will be compared before the sequenced and unsequenced versions of the procedures are considered to be back in sync,
| |
| and further lines are no longer to be generated to the output update procedure (at least until the next mis-match). The default sync count value is 2, and this will work well for the vast majority of cases.
| |
| <p>
| |
| Increasing the sync count may reduce the number of difference lines found, resulting in smaller update procedures, or it may have no effect at all beyond a minor performance penalty in the <var>XCOMPARE</var> operation.
| |
| In a very few cases it may produce larger output procedures.
| |
| An entered value of <code>*</code> tells <var>XCOMPARE</var> to repeat the compare operation, increasing the sync count from 1 until it hits a value that nolonger produces a smaller output procedure.
| |
| This is the worst-performing option for running <var>XCOMPARE</var>, but will almost always generate the smallest possible output procedure.
| |
| Unless changes are massive and many, the size of the output procedure is fairly irrelevant, and playing with the sync count has little utility.</p></td></tr>
| |
|
| |
| <tr><th>Unlock this procedure?</th>
| |
| <td>Entering <var>Y</var> in this field makes the procedure available to other programmers in systems or files where procedures are locked to one updating user at a time.
| |
| Any value but <var>Y</var> allows the programmer to generate an update procedure but will retain the exclusive lock on the procedure (such as when a test integration is being run,
| |
| and the programmer doesn't wish to relinquish control of the procedures being updated). If procedure locking is not turned on, the lock/unlock information is still maintained for historical reporting, but this switch has no actual effect in locking procedures. See [[Administration options for Procedure Locking options]].</td></tr>
| |
| </table>
| |
|
| |
| ==N (NEW) command==
| |
| Prefixing a procedure by an N in the <var class="product">SirPro</var> edit screen tells the
| |
| system to generate an update procedure, similar to that produced by X,
| |
| but containing <i>all</i> lines of the specified procedure, because
| |
| it is a new procedure to the system.
| |
| The <var>N</var> prefix command presents a Create New Procedure screen:
| |
|
| |
| <p class="caption" style="width:524px">Generating a New update procedure</p>
| |
| <p class="figure">[[File:SlibCreateNew.png|524px]]</p>
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>New procedure name</th>
| |
| <td>Identifies the new procedure, which was the object of an <var>N</var> command from a <var class="product">SirPro</var> procedure list screen.
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>Proc file</th>
| |
| <td>Name of <var class="product">Model 204</var> file containing the new procedure.</td></tr>
| |
|
| |
| <tr><th>Procedure</th>
| |
| <td>Name of the new procedure.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th nowrap>Output update procedure</th>
| |
| <td>Identifies the location and name of an update procedure that will represent the creation of a new procedure.
| |
| <table class="thJustBold">
| |
| <tr><th>FixFile</th>
| |
| <td>Name of <var class="product">Model 204</var> file to contain the update procedure.</td></tr>
| |
|
| |
| <tr><th>Password</th>
| |
| <td>Write access is required for the output update procedure. If the file is not already open with sufficient privileges and a password will be required, it should be entered here.</td></tr>
| |
|
| |
| <tr><th nowrap>Project name</th>
| |
| <td>This is the 8-character project name to which this update should be linked. The file administrator may have required that updates for this file only be linked to projects previously defined in the control procedure.
| |
| In this case the project entered is verified to see that it exists before the update is generated. Otherwise the project name is used to determine the name for the update procedure.</td></tr>
| |
|
| |
| <tr><th>Target File</th>
| |
| <td>This is the production file containing the base procedure against which this update will apply.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th>Replace existing update</th>
| |
| <td>Entering <var>Y</var> in this field allows the user to overwrite an existing version of the update procedure with the latest changes.
| |
| Programmers are always permitted to overwrite update procedures created under their userid when this switch is set to <var>Y</var>.
| |
| The file administrator may have specified in the Administration options that programmers may not overwrite each other's update procedures either in this file or within the entire system.
| |
| If this option is set, and an update procedure exists of the same name as the one being created in the target file, and the userid who created the update procedure (or last updated it) is not the same as the current user's ID, the generation of the update is not permitted.</td></tr>
| |
|
| |
| <tr><th nowrap>Enter Editor for update</th>
| |
| <td>Entering <var>Y</var> in this prompt places the generating user into an edit session on the new update procedure. The update procedure will have already been stored before the edit session is invoked,
| |
| so PF3 or Quit may be used to exit the edit session without losing the update procedure.</td></tr>
| |
| </table>
| |
|
| |
| ==K (KLOBBER) command==
| |
| Prefixing a procedure with a <var>K</var> command in the <var class="product">SirPro</var> edit
| |
| screen directs <var class="product">SirLib</var> to generate an update procedure that
| |
| will cause the deletion of the indicated procedure.
| |
| Managed update deletes are always logical deletes, allowing deleted
| |
| procedures to be recovered at any time when the file is reconfigured.
| |
| For this reason, an empty (zero-line) version of the deleted procedure
| |
| is left in the file, and should not be physically deleted.
| |
| The <var>K</var> prefix command presents a <b>Klobber Procedure</b> screen:
| |
|
| |
| <p class="caption" style="width:526px">Generating a logical delete of a procedure in SirPro</p>
| |
| <p class="figure">[[File:SlibKlobber.png|526px]]</p>
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>Procedure to erase</th>
| |
| <td>Identifies the procedure to be erased, which was the object of a <var>K</var> prefix command from a <var class="product">SirPro</var> procedure list screen.
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>Proc file</th>
| |
| <td>Name of <var class="product">Model 204</var> file containing the procedure.</td></tr>
| |
|
| |
| <tr><th>Procedure</th>
| |
| <td>Name of procedure to be deleted.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th nowrap>Output update procedure</th>
| |
| <td>Identifies the location and name of an update procedure that will represent deletion of the procedure.
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>FixFile</th>
| |
| <td>Name of <var class="product">Model 204</var> file to contain the update procedure.</td></tr>
| |
|
| |
| <tr><th>Password</th>
| |
| <td>Write access is required for the output update procedure. If the file is not already open with sufficient privileges and a password will be required, it should be entered here.</td></tr>
| |
|
| |
| <tr><th nowrap>Project name</th>
| |
| <td>This is the 8-character project name to which this update should be linked. The file administrator may have required that updates for this file only be linked to projects previously defined in the control procedure.
| |
| In this case the project entered is verified to see that it exists before the update is generated. Otherwise the project name is used to determine the name for the update procedure.</td></tr>
| |
|
| |
| <tr><th>Target File</th>
| |
| <td>This is the production file containing the base procedure against which this update will apply.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th>Replace existing update</th>
| |
| <td>Entering <var>Y</var> in this field allows the user to overwrite an existing version of the update procedure with the latest changes.
| |
| Programmers are always permitted to overwrite update procedures created under their userid when this switch is set to <var>Y</var>.
| |
| The file administrator may have specified in the Administration options that programmers may not overwrite each other's update procedures either in this file or within the entire system.
| |
| If this option is set, and an update procedure exists of the same name as the one being created in the target file, and the userid who created the update procedure (or last updated it) is not the same as the current user's ID, the generation of the update is not permitted.</td></tr>
| |
|
| |
| <tr><th nowrap>Enter Editor for update</th>
| |
| <td>Entering <var>Y</var> in this prompt places the generating user into an edit session on the new update procedure. The update procedure will have already been stored before the edit session is invoked,
| |
| so PF3 or Quit may be used to exit the edit session without losing the update procedure.</td></tr>
| |
| </table>
| |
|
| |
| ==Z (RESEQUENCE) command==
| |
| The sequence numbers generated by <var class="product">SirLib</var> are for the most part of no
| |
| concern to SOUL programmers.
| |
| However, if a large number of update procedures are generated which
| |
| effect the same areas of code in a procedure, further changes to the
| |
| same areas may result in unnecessarily large update procedures.
| |
| In addition, the process of untangling overlapping updates with
| |
| <var class="product">SirLib</var> will become more complex.
| |
| This is should be a rare event, however if it does occur, a manager need
| |
| only generate a resequence procedure by using the <var>Z</var> prefix command.
| |
| The <var>Z</var> command presents a <b>Resequence Procedure</b> screen:
| |
|
| |
| <p class="caption" style="width:527px">Resequencing a procedure in SirPro</p>
| |
| <p class="figure">[[File:SlibResequence.png|527px]]</p>
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>Resequence procedure</th>
| |
| <td>Identifies the procedure to be resequenced, which was the object of a <var>Z</var> prefix command from a <var class="product">SirPro</var> procedure list screen.
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>Proc file</th>
| |
| <td>Name of <var class="product">Model 204</var> file containing the procedure.</td></tr>
| |
|
| |
| <tr><th>Procedure</th>
| |
| <td>Name of procedure.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th nowrap>Output update procedure</th>
| |
| <td>Identifies the location and name of an update procedure that will cause resequencing of the procedure.
| |
|
| |
| <table class="thJustBold">
| |
| <tr><th>FixFile</th>
| |
| <td>Name of <var class="product">Model 204</var> file to contain the update procedure.</td></tr>
| |
|
| |
| <tr><th>Password</th>
| |
| <td>Write access is required for the output update procedure. If the file is not already open with sufficient privileges and a password will be required, it should be entered here.</td></tr>
| |
|
| |
| <tr><th nowrap>Project name</th>
| |
| <td>This is the 8-character project name to which this update should be linked. The file administrator may have required that updates for this file only be linked to projects previously defined in the control procedure.
| |
| In this case the project entered is verified to see that it exists before the update is generated. Otherwise the project name is used to determine the name for the update procedure.</td></tr>
| |
|
| |
| <tr><th>Target File</th>
| |
| <td>This is the production file containing the base procedure against which this update will apply.</td></tr>
| |
| </table></td></tr>
| |
|
| |
| <tr><th>New starting number</th>
| |
| <td>The default is to begin renumbering with 10000.</td></tr>
| |
|
| |
| <tr><th>New increment</th>
| |
| <td>The default is to renumber in increments of 10000.</td></tr>
| |
|
| |
| <tr><th>Replace existing update</th>
| |
| <td>Entering <var>Y</var> in this field allows the user to overwrite an existing version of the update procedure with the latest changes.
| |
| Programmers are always permitted to overwrite update procedures created under their userid when this switch is set to <var>Y</var>.
| |
| The file administrator may have specified in the Administration options that programmers may not overwrite each other's update procedures either in this file or within the entire system.
| |
| If this option is set, and an update procedure exists of the same name as the one being created in the target file, and the userid who created the update procedure (or last updated it) is not the same as the current user's ID, the generation of the update is not permitted.</td></tr>
| |
|
| |
| <tr><th nowrap>Enter Editor for update</th>
| |
| <td>Entering <var>Y</var> in this prompt places the generating user into an edit session on the new update procedure. The update procedure will have already been stored before the edit session is invoked,
| |
| so PF3 or Quit may be used to exit the edit session without losing the update procedure.</td></tr>
| |
| </table>
| |
|
| |
|
| ==See also== | | ==See also== |
SirPro procedure list screen
The SirPro screen shown above is the main working environment for the
programmer in the SirLib-controlled environment.
This screen, and others like it, provide access to all procedure activity
in Model 204.
Details on the use of SirPro, including managed update commands, are contained in the SirPro pages.
Managed update prefix commands are the only part of SirPro discussed in this document.
Note: You access a similar procedure list in RKWeb by selecting Build > Edit
and clicking the Open Procedure List button. Prefix commands are not available in RKWeb, however, and require the SirPro TN3270 interface.
The X, Q, N, K, and Z prefix commands are used to generate "working,"
Base, and Sequenced copies of procedures and to generate updates from those copies.
The programmer types one of these managed update commands to the left of the
selected procedure and presses Enter.
SirPro then presents one of the managed update screens to get further details on the managed update.
Those screens are shown in the following detailed sections.
Q (Sequence): Create working copies of procedures
"Sequencing" is the managed update method by which programmers
make copies of procedures to work on.
In other systems, programmers make backup copies of procedures and then
work on the original.
In SirPro, programmers never alter the original program code: they execute Q commands to get working and sequenced copies from which update procedures can be generated.
Updates must be done in a file other than the original, which is why
procedure groups are recommended for development subsystems.
SirPro screen for generating SEQ and working procedure copies
The Q command tells SirLib to generate both a copy of the selected procedure (the copy that the programmer will work on) and a "sequenced" copy of the procedure (a copy containing sequence or line numbers), which will later be used as comparison input for the XCompare command.
Building these copies is always the first programming step in generating
a managed update.
The Q prefix command presents a screen (Sequence procedure) with the following input fields:
Input procedure |
The following two fields identify the source procedure, that is, the version of the procedure before it is changed. This information is copied from the entry on the SirPro procedure editor screen.
Proc file |
Name of the Model 204 file containing the source procedure. |
Procedure |
Name of the source procedure. This is the procedure that was subject to a Q prefix command on the SirPro Edit screen. |
|
Output procedures |
SirLib is designed to work in a Model 204 subsystem (APSY) context using procedure groups.
The Q command creates two output procedures that must be in a different file from the source procedure.
One of these procedures is used as a working copy, while the other procedure is used to determine any changes made to the working copy.
Both of these procedures are formed by applying any staged updates to the indentified source procedure.
Proc file |
Name of the Model 204 file to contain the two procedures produced by the SirLib Q command. |
Password |
If a password is required for update access to the file it must be entered here. |
Unsequenced procedure |
Name of the procedure that will become the working copy for developing and testing changes. This defaults to the name of the source procedure. |
Sequenced procedure |
Name of the procedure that will contain a sequenced version (each line prefixed by a sequence number) of the working copy, before any changes have been made. The sequenced procedure may be used by the X command (see next section) to prepare an update procedure reflecting any changes made to the working copy.
The default procedure name for sequenced procedures is the unsequenced procedure name prefixed with SEQ. :
SEQ.unsequenced-procedure-name
This default prefix may be overridden if it conflicts with local conventions. |
|
Location of control and update procedures |
SirLib uses a naming convention to identify any updates that should be applied to the source procedure before generating a working copy.
The FixFile is searched for a "control procedure" whose name must be the name of the input procedure file prefixed with CONTROL. :
CONTROL.input-procedure-proc-file-name
The control procedure identifies all projects with updates to procedures in the input procedure file. For each such project, the FixFile is checked for update procedures that should be applied to the source procedure.
FixFile |
Name of Model 204 file containing control and update procedures used to build the output procedures. The default file is SIRLIBP . |
Password |
Read access is required for the control procedure and update procedures. If a password is required for read access, it must be entered here. |
|
Replace existing procedures? |
Overlaying a working copy or sequenced copy of a procedure can cause updates in progress to be lost.
The default for this field is N , which directs the Q command to not overwrite an existing procedure. If you want to overwrite existing procedures, set this indicator to Y . |
Q command processing
This section's content provides a deeper understanding of how the command works; although knowing the processing details is not a requirement to use the product.
When the Q command is executed, SirLib looks in the
source file for a procedure named BASE.procname
, where
procname is the name of the selected procedure.
If no such procedure is found, SirLib copies the procedure into the
target procedure in the Output file.
In addition, SirLib generates a sequenced copy of the procedure, named whatever the programmer specified in the Sequenced Procedure field on this screen.
The sequenced copy of the procedure is identical to the unsequenced (or
working) copy, except that each line is prefixed with a sequence number.
If SirLib does find a BASE.procname
procedure, it looks for the CONTROL.filename
procedure in the specified FixFile.
A control procedure of the specified name must exist, or the Q command fails. Noting the active projects in the control procedure, SirLib finds all update procedure names that match the pattern:
file.project.procname
Where:
- file is the name of the input file for this operation.
- procname is the name of the selected input procedure.
- project is one of the identifiers in columns 1 to 8 of the control procedure.
All update procedure names that conform to this pattern are sorted by their project, then by the sequence line numbers they affect.
This aggregate update is then applied to BASE.procname
to produce the sequenced and unsequenced output procedures.
In other words, the programmer doesn't just get a copy of the procedure
they request, they get a generated procedure composed of the Base procedure with all updates applied to it.
If a project name is commented out in the control procedure, it is not
included in the resulting sequenced and unsequenced output procedures.
A Project name is commented out by placing an asterisk (*) in
front of it in the control procedure.
(This is how working versions of production procedures can be generated in
development regions if the development region has active projects that do
not exist yet in production).
The sequenced version of a procedure should never be changed, as it is
the "before" image for the XCompare that will eventually generate the update procedure.
Understanding the sequence numbers
Sequence numbers should not concern programmers for the most part, though there are a few times when it is worth knowing something about how they work.
The Q command automatically begins sequencing at 10000, and it
increments each line in the BASE.procname
procedure by 10000. As changes are generated, the XCompare function generates new line numbers for lines of code being inserted and replaced.
The XCompare algorithm attempts to number the first new line of code beginning with a sequence number 1 greater than its starting point in the existing sequence (this applies to Inserts and Replaces: it is irrelevant for Deletes).
Subsequent new lines that are part of the same update are incremented by a
power of 10 less than the last sequence of numbers for the section of code. Later changes that apply to the same section again begin numbering at their starting sequence number plus 1, and they continue to increment at the next lowest available power of 10.
The lower-order digit(s) of the sequence numbers in a SEQ procedure indicate the number of times a section of code has been changed. The sequence numbers themselves indicate whether the XCompare is able to "fit" changes into the same section of code again.
For example, a section of code with sequence numbers like the following
indicates that changes still "fit" in the hundreds and tens columns:
003451001
003452001
003453001
If an update procedure attempts to insert three lines of code
after line 003452001
, the resulting code is numbered like this:
003451001
003452001
003452102
003452202
003452302
003453001
003454001
Replace (./R
) commands operate slightly differently than
Insert, but the outcome looks very similar.
If changes no longer "fit" within the sequence numbers, XCompare still generates an update procedure for this section of code, but the update procedure is unnecessarily long, and SirLib might lose its ability to detect update collisions. In this case, a Resequence is required, as described later in this page.
Once an initial update is coded and the update procedure saved in
the FixFile, all subsequent Q commands against the same
procedure generate copies containing the update, and sequence
numbers in output sequenced versions of the procedure reflect the
insertion of the update code.
X (XCompare): Create an update procedure
Prefixing a procedure by an X in the SirPro procedure list tells the SirLib system to compare the specified procedure against a matching "sequenced" procedure, generating an update procedure that contains the differences between the two.
The X prefix command presents an XCompare screen:
SirPro XCompare screen
Unsequenced input procedure |
Identifies the procedure to be examined for changes; it was the object of an X command from a SirPro procedure list screen.
Proc file |
Protected field showing name of input procedure. |
Procedure |
Protected field showing name of unsequenced input procedure. |
|
Sequenced input procedure |
Identifies the sequenced version of the input procedure, showing its contents prior to any changes.
Proc file |
Name of Model 204 file containing the sequenced input procedure. Deafults to the same file as the input unsequenced procedure. |
Password |
Read access is required for the sequenced input procedure. If the file is not already open with sufficient privileges and a password will be required, enter it here. |
Procedure |
Name of the procedure containing a sequenced representation of the unsequenced input procedure before any changes were applied. Defaults to the name of the unsequenced input procedure with a prefix of
SEQ. . |
|
Output update procedure |
Identifies the location and name of an update procedure that will contain the changes that have been made to the sequenced version of the source procedure.
FixFile |
Name of Model 204 file to contain the update procedure produced by this invocation of XCompare. |
Password |
Write access is required for the output update procedure. If the file is not already open with sufficient privileges and a password will be required, it should be entered here. |
Project name |
This is the 8-character project name to which this update should be linked.
The file administrator may have required that updates for this file only be linked to existing projects, in which case the entered project name is checked to make sure it exists in the control procedure.
If this setting is not on, updates may be created, and the project entered in the control procedure later. |
Target File |
This is the production file containing the base procedure against which this update will apply. |
|
Replace existing update |
Entering Y in this field allows the user to overwrite an existing version of the update procedure with the latest changes.
Programmers are always permitted to overwrite update procedures created under their userid when this switch is set to Y .
The file administrator may have specified in the Administration options that programmers may not overwrite each other's update procedures either in this file or within the entire system.
If this option is set on, an update procedure exists of the same name as the one being created in the target file, and the ID of the user who created the update procedure (or last updated it) is not the same as the current user's ID, the generation of the update is not permitted. |
Enter Editor for update |
Entering Y in this prompt places the generating user into an edit session on the new update procedure. The update procedure will have already been stored before the edit session is invoked,
so PF3 or Quit may be used to exit the edit session without losing the update procedure. |
Synchronization count |
This field allows programmers to set the number of lines that are compared before:
- The sequenced and unsequenced versions of the procedures are considered to be back in sync.
- Further lines are no longer to be generated to the output update procedure (at least until the next mismatch).
The default sync count value is 2, which works well for the vast majority of cases.
Increasing the sync count may reduce the number of difference lines found, resulting in smaller update procedures, or it may have no effect at all beyond a minor performance penalty in the XCompare operation. In a very few cases it may produce larger output procedures.
An entered value of * tells XCompare to repeat the compare operation, increasing the sync count from 1 until it reaches a value that no longer produces a smaller output procedure.
This is the worst-performing option for running XCompare, but it almost always generates the smallest possible output procedure.
Unless changes are massive and many, the size of the output procedure is fairly irrelevant, and adjusting the sync count has little utility. |
Unlock this procedure? |
Entering Y in this field makes the procedure available to other programmers in systems or files where procedures are locked to one updating user at a time.
Any value but Y lets you generate an update procedure but retain the exclusive lock on the procedure (such as when a test integration is being run, and you don't want to relinquish control of the procedures being updated). If procedure locking is not turned on, the lock/unlock information is still maintained for historical reporting, but this switch has no actual effect in locking procedures. For more information about procedure locking, see View/Clear procedure locks. |
N (New): Create a new procedure from update deck
Preceding an N to the left of a procedure name in the SirPro procedure list screen tells the
system to generate an update procedure, similar to that produced by X, but containing all lines of the specified procedure (because it is a new procedure to the system).
The N prefix command presents a Create New proc screen:
Generating a new update procedure
New procedure name |
Identifies the new procedure, which was the object of an N command from a SirPro procedure list screen.
Proc file |
Name of Model 204 file containing the new procedure. |
Procedure |
Name of the new procedure. |
|
Output update procedure |
Identifies the location and name of the new update procedure.
FixFile |
Name of Model 204 file to contain the update procedure. |
Password |
Write access is required for the output update procedure. If the file is not already open with sufficient privileges and a password is required, enter it here. |
Project name |
The 8-character project name to which this update should be linked.
The file administrator may have required that updates for this file only be linked to projects previously defined in the control procedure.
In this case the project entered is verified to see that it exists before the update is generated. Otherwise the project name is used to determine the name for the update procedure. |
Target file |
The name of the production file that contains the base procedure against which this update will apply. |
|
Replace existing update |
Entering Y in this field lets you overwrite an existing version of the update procedure with the latest changes.
Programmers are always permitted to overwrite update procedures created under their user ID if this switch is set to Y .
The file administrator may have specified in the Administration options that programmers may not overwrite each other's update procedures in this file or within the entire system. If this option is set, and an update procedure exists of the same name as the one being created in the target file, and the ID of the user who created the update procedure (or last updated it) is not the same as the current user's ID, the generation of the update is not permitted. |
Enter Editor for update |
Entering Y in this prompt places the generating user into an edit session on the new update procedure. The update procedure will have already been stored before the edit session is invoked,
so PF3 or Quit may be used to exit the edit session without losing the update procedure. |
K (Klobber): Generate a logical procedure deletion
Placing a K to the left of a procedure name in the SirPro procedure list screen directs SirLib to generate an update procedure that
will cause the deletion of the indicated procedure.
Note: Managed update deletes are always logical deletes, allowing deleted procedures to be recovered at any time when the file is reconfigured. For this reason, an empty (zero-line) version of the deleted procedure is left in the file, and it should not be physically deleted.
The K prefix command presents a Klobber procedure screen:
Generating a logical delete of a procedure in SirPro
Procedure to erase |
Identifies the procedure to be erased, which was the object of a K prefix command from a SirPro procedure list screen.
Proc file |
Name of Model 204 file containing the procedure. |
Procedure |
Name of procedure to be deleted. |
|
Output update procedure |
Identifies the location and name of an update procedure that will represent deletion of the procedure.
FixFile |
Name of Model 204 file to contain the update procedure. |
Password |
Write access is required for the output update procedure. If the file is not already open with sufficient privileges and a password is required, enter it here. |
Project name |
This is the 8-character project name to which this update should be linked. The file administrator may have required that updates for this file only be linked to projects previously defined in the control procedure. In this case the project entered is verified to see that it exists before the update is generated. Otherwise, the project name is used to determine the name for the update procedure. |
Target File |
This is the production file containing the base procedure against which this update will apply. |
|
Replace existing update |
Entering Y in this field allows the user to overwrite an existing version of the update procedure with the latest changes.
Programmers are always permitted to overwrite update procedures created under their userid when this switch is set to Y.
The file administrator may have specified in the Administration options that programmers may not overwrite each other's update procedures, either in this file or within the entire system.
If this option is set, and an update procedure exists of the same name as the one being created in the target file, and the ID of the user who created the update procedure (or last updated it) is not the same as the current user's ID, the generation of the update is not permitted. |
Enter Editor for update |
Entering Y in this prompt places the generating user into an edit session on the new update procedure. The update procedure will have already been stored before the edit session is invoked,
so PF3 or Quit may be used to exit the edit session without losing the update procedure. |
Z (Resequence): Refresh internal sequence numbers
The sequence numbers generated by SirLib are for the most part of no concern to SOUL programmers.
However, if a large number of update procedures are generated that
effect the same areas of code in a procedure, further changes to the
same areas may result in unnecessarily large update procedures.
In addition, the process of untangling overlapping updates with
SirLib will become more complex and possibly compromised.
In case this rare event occurs, a manager need only generate a resequence procedure. By placing a Z to the left of the procedure name on the SirPro procedure list screen, the Resequence procedure screen is invoked:
Resequencing a procedure in SirPro
Resequence procedure |
Identifies the procedure to be resequenced; it was the object of the Z prefix command on the SirPro procedure list screen.
Proc file |
Name of Model 204 file containing the procedure. |
Procedure |
Name of procedure. |
|
Output update procedure |
Identifies the location and name of an update procedure that will contain the resequencing of the procedure.
FixFile |
Name of Model 204 file to contain the update procedure. |
Password |
Write access is required for the output update procedure. If the file is not already open with sufficient privileges and a password will be required, it should be entered here. |
Project name |
The 8-character project name to which this update should be linked. The file administrator may have required that updates for this file only be linked to projects previously defined in the control procedure.
In this case, the project entered is verified to see that it exists before the update is generated. Otherwise the project name is used to determine the name for the update procedure. |
Target file |
The production file containing the base procedure against which this update will apply. |
|
New starting number |
The default is to begin renumbering with 10000. |
New increment |
The default is to renumber in increments of 10000. |
Replace existing update |
Entering Y in this field allows the user to overwrite an existing version of the update procedure with the latest changes.
Programmers are always permitted to overwrite update procedures created under their user ID if this switch is set to Y .
The file administrator may have specified in the Administration options that programmers may not overwrite each other's update procedures either in this file or within the entire system. If this option is set, and an update procedure exists of the same name as the one being created in the target file, and the ID of the user who created the update procedure (or last updated it) is not the same as the current user's ID, the generation of the update is not permitted. |
Enter Editor for update |
Entering Y in this prompt places the generating user into an edit session on the new update procedure. The update procedure will have already been stored before the edit session is invoked,
so PF3 or Quit may be used to exit the edit session without losing the update procedure. |
U (Undo): Recover from a mistake
The U command performs the same operation as Q, but it may only be executed against a change deck. It results in a "working"
procedure and a sequenced copy of that procedure being created
in the user's selected development procedure file. However, the U command specifically includes the change deck against which it is executed in the code for the working procedure, but not in the code from the sequenced copy. In other words, it recreates
the state of the development procedures that created the change
deck against which the U command is executed.
Typically, the U command is used to recreate the state of development if you accidentally delete the procedures you were working on, either manually, or with the "Clean-up" switch on the Xcompare screen.
The control screen you are presented with after specifyng a U command is like the following. For information about the screen's fields, see the Q command fields above:
Recreating a working procedure
The U command is a special-use feature, and there are a number
of ways in which it fails to work: most notably, if the
selected change deck is somewhere in the middle of a series of
changes, and by excluding it from procedure creation, some code
dependency is missing. However, for its primary function —
recovering from a mistake that was made very recently, typically
as the most recent change to a procedure — it should always work.
Y (Refresh): Apply post-check-out updates
The Y command provides a special check-out
ability in which you can "refresh" your local working copy
of a procedure with changes that have been checked in by other
programmers since your working copy was originally taken from
the source procedure file.
When Y is applied against a working procedure (in the screen that contains the list of working copies of procedures), you are presented with a screen like the following:
Refreshing a working procedure
After the screen is processed, the result is both of these:
- A new working procedure with all checked-in updates applied and your current changes still in place
- A sequenced copy that has all updates applied, but your current changes not in place
In other words, the Y command is very much like a Q command, but it is done while changes are in progress, and it puts into place other changes that have occurred since the original
procedure check-out.
When you subsequently check in your changes to the file, your resulting change deck will include only your changes, but correctly integrated with the other programmers' changes.
The following input fields are available on the Refresh procedure screen:
(Input procedure) Proc file |
This non-editable field should display the original source file
for the procedure (probably not the file that contained the working copy). |
(Input procedure) Procedure |
This non-editable field is the name of the procedure to be refreshed. |
(Output procedure) Proc file |
This is the destination file for the sequenced and unsequenced copies. |
Password |
Password for the output procedure file. A blank should suffice here since the file is probably already open. |
Unsequenced procedure |
Generally this is the same as the name of the input procedure. |
Sequenced procedure |
This defaults to, and it is recommended to be left as, the name of the input procedure with a prefix of SEQ. . |
FixFile |
Enter the name of the file that contains the update procedures and the control procedure for the file being updated.
If the CONTROL.filename procedure is not found in the specified FixFile, SirPro cannot build the copies of the procedure. An error message is posted, and processing ceases. |
See also