REFRESH SUBSYSPROC command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Automatically generated page update)
 
m (remove Sys Man guide)
Line 6: Line 6:
<dd>You can replace and refresh procedures in an active subsystem and refresh that procedure in all active subsystems.
<dd>You can replace and refresh procedures in an active subsystem and refresh that procedure in all active subsystems.
</dl>
</dl>
==Syntax==
==Syntax==
<p class="syntax">REFRESH SUBSYSPROC procname  
<p class="syntax">REFRESH SUBSYSPROC <span class="term">procname</span>
   IN [GROUP | FILE] name
   IN [GROUP | FILE] <span class="term">name</span>
   [FROM [{[PERM | TEMP] GROUP}| FILE] name]
   [FROM [{[PERM | TEMP] GROUP}| FILE] <span class="term">name</span>]
</p>
</p>
<p>where:</p>
Where:
<p>procname specifies the name of the procedure you plan to replace.</p>
<ul>
<p><var>IN</var> clause specifies the <var class="product">Model&nbsp;204</var> group or file where the procedure will be replaced. </p>
<li><var class="term">procname</var> specifies the name of the procedure you plan to replace.</li>
<p>name specifies a specific group name or file name into which to put procname. If neither the GROUP or FILE keyword is specified, then REFRESH SUBSYSPROC looks for: </p>
 
<li><var>IN</var> clause specifies the <var class="product">Model&nbsp;204</var> group or file where the procedure will be replaced. </li>
 
<li><var class="term">name</var> specifies a specific group name or file name into which to put <var class="term">procname</var>. If neither the <var>GROUP</var> or <var>FILE</var> keyword is specified, then <var>REFRESH SUBSYSPROC</var> looks for:  
<ol>  
<ol>  
<li>
<li>An open permanent group with that name. </li>
<p>An open permanent group with that name. </p>
</li>
   
   
<li>
<li>If no open permanent group is found, then <var>REFRESH SUBSYSPROC</var> looks for an open file with that name.</li>
<p>If no open permanent group is found, then REFRESH SUBSYSPROC looks for an open file with that name.</p>
</ol></li>
</li>
 
</ol>
<li>The optional <var>FROM</var> clause specifies a specific, temporary or permanent group name or file name from which <var class="term">procname</var> is refreshed. However, the procedure is updated only when a <var>FROM</var> clause is specified.</li>
<p>The optional <var>FROM</var> clause specifies a specific, temporary or permanent group name or file name from which procname is refreshed. However, the procedure is updated only when a FROM clause is specified.</p>
</ul>
 
==Usage==
==Usage==
The REFRESH SUBSYSPROC consists of two operations:  
<var>REFRESH SUBSYSPROC</var> consists of two operations:  
<ul>  
<ul>  
<li>
<li><p>Updating the procedure</p></li>
<p>Updating the procedure</p>
</li>
   
   
<li>
<li><p>Causing the recompiling of the procedure</p></li>
<p>Causing the recompiling of the procedure</p>
</ul>
</li>
<p>
</ul>
A <var>STOP SUBSYS</var> command can override a <var>REFRESH SUBSYS</var> command. If an APSY subsystem procedure with the subsystem precompile prefix is compiled, and the procedure is found in an unlocked subsystem procedure file, the following message is issued:</p>
<p>A STOP SUBSYS command can override a REFRESH SUBSYS command. If an APSY subsystem procedure with the subsystem precompile prefix is compiled, and the procedure is found in an unlocked subsystem procedure file, the following message is issued:</p>
<p class="code">M204.0468: COMPILATION NOT SAVED - INCLUDE FROM UNLOCKED FILE
<p class="code">M204.0468: COMPILATION NOT SAVED - INCLUDE FROM UNLOCKED FILE
</p>
</p>
<p>See also the Rocket <var class="product">Model&nbsp;204</var> System Manager's Guide, "Generating success messages" and "Generating error messages".</p>
<p>
See also "Generating success messages" and "Generating error messages" in [[System requirements for Application Subsystems#Dynamically refreshing procedure compilation with the REFRESH SUBSYSPROC command|Dynamically refreshing procedure compilation with the REFRESH SUBSYSPROC command]].</p>
 
====Using the optional FROM clause====
====Using the optional FROM clause====
<p>If the FROM clause is not specified, the copy operation does not occur but the refresh operation does. It is useful to issue the REFRESH SUBSYSPROC command without the FROM clause when the included code in a procedure has changed, but the procedure itself has not. This forces the procedure to be recompiled, which in turn picks up the newly updated included code.</p>
<p>
<p>For example, suppose you change a procedure that is included in other precompiled procedures. Even though the other precompiled procedures have not changed, you would want to refresh them so that they get recompiled with the new included code. Whether or not the copy operation occurs, the refresh operation causes the procedure to be discarded and recompiled the next time it is invoked. </p>
If the FROM clause is not specified, the copy operation does not occur but the refresh operation does. It is useful to issue the REFRESH SUBSYSPROC command without the FROM clause when the included code in a procedure has changed, but the procedure itself has not. This forces the procedure to be recompiled, which in turn picks up the newly updated included code.</p>
<p>You must open the source and destination file (or groups) before issuing the command. Therefore, it is essential that LOCK FILE/GROUPS on the SUBSYSMGMT Operational Parameters screen is set to N. </p>
<p>
For example, suppose you change a procedure that is included in other precompiled procedures. Even though the other precompiled procedures have not changed, you would want to refresh them so that they get recompiled with the new included code. Whether or not the copy operation occurs, the refresh operation causes the procedure to be discarded and recompiled the next time it is invoked. </p>
<p>
You must open the source and destination file (or groups) before issuing the command. Therefore, it is essential that LOCK FILE/GROUPS on the SUBSYSMGMT Operational Parameters screen is set to N. </p>
 
==Examples==
==Examples==
====Update active subsystems simultaneously from a file====
====Update active subsystems simultaneously from a file====
<p>Procedure C-TEST is defined in active subsystem PRODSYS1 and PRODSYS2 in subsystem procedure file, PROCS. The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. Procedure C-TEST is copied from file DATA and replaced in subsystem file PROCS and is refreshed in every active subsystem in which the procedure is defined.</p>
<p>
Procedure C-TEST is defined in active subsystem PRODSYS1 and PRODSYS2 in subsystem procedure file, PROCS. The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. Procedure C-TEST is copied from file DATA and replaced in subsystem file PROCS and is refreshed in every active subsystem in which the procedure is defined.</p>
 
<p class="code">OPEN PROCS
<p class="code">OPEN PROCS
OPEN DATA
OPEN DATA
Line 54: Line 63:
M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS2
M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS2
</p>
</p>
====Updating an active subsystem from a group====
====Updating an active subsystem from a group====
<p>Procedure C-TEST is defined in active subsystem PRODSYS1 in subsystem procedure group PROCGRP. PRODSYS1 is defined with NUMLK=2. PROCGRP is created with TEMPPROC, PROCF1, PROCF2. C-TEST can be found in files TEMPROC and PROCF1. </p>
<p>
<p>The following command attempts to refresh procedure C-TEST in subsystem group PROCGRP from group TESTGRP. Procedure C-TEST is copied from the first file in group TESTGRP that contains procedure C-TEST and replaces procedure C-TEST in the file PROCF1 in group PROCGRP. The procedure is refreshed in every active subsystem in which the procedure is defined.</p>
Procedure C-TEST is defined in active subsystem PRODSYS1 in subsystem procedure group PROCGRP. PRODSYS1 is defined with NUMLK=2. PROCGRP is created with TEMPPROC, PROCF1, PROCF2. C-TEST can be found in files TEMPROC and PROCF1. </p>
<p>
The following command attempts to refresh procedure C-TEST in subsystem group PROCGRP from group TESTGRP. Procedure C-TEST is copied from the first file in group TESTGRP that contains procedure C-TEST and replaces procedure C-TEST in the file PROCF1 in group PROCGRP. The procedure is refreshed in every active subsystem in which the procedure is defined.</p>
<p class="code">OPEN PROCGRP
<p class="code">OPEN PROCGRP
OPEN TESTGRP
OPEN TESTGRP
Line 63: Line 75:
M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS1
M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS1
</p>
</p>
====Trying to refresh an inactive subsystem====
====Trying to refresh an inactive subsystem====
<p>Procedure C-TEST is not defined in any active subsystems. The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. The REFRESH command fails and the procedure is not copied or refreshed.</p>
<p>
Procedure C-TEST is not defined in any active subsystems. The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. The REFRESH command fails and the procedure is not copied or refreshed.</p>
 
<p class="code">OPEN PROCS
<p class="code">OPEN PROCS
OPEN DATA
OPEN DATA
Line 71: Line 86:
M204.2683 REFRESH COMMAND FAILED
M204.2683 REFRESH COMMAND FAILED
</p>
</p>
<p>If there are no active subsystems containing the procedure, you can issue the COPY PROC command to update the procedure.</p>
<p>
If there are no active subsystems containing the procedure, you can issue the COPY PROC command to update the procedure.</p>
 
====Trying to refresh a missing procedure====
====Trying to refresh a missing procedure====
<p>The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. However, procedure C-TEST does not exist in file DATA. The REFRESH SUBSYSTEM command fails and the procedure is not copied or refreshed.</p>
<p>
The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. However, procedure C-TEST does not exist in file DATA. The REFRESH SUBSYSTEM command fails and the procedure is not copied or refreshed.</p>
<p class="code">OPEN PROCS
<p class="code">OPEN PROCS
OPEN DATA
OPEN DATA
Line 80: Line 98:
M204.2683 REFRESH COMMAND FAILED
M204.2683 REFRESH COMMAND FAILED
</p>
</p>
====Trying to refresh a procedure that is in use====
====Trying to refresh a procedure that is in use====
<p>No other user may be running the procedure that is being refreshed, otherwise the following error is issued:</p>
<p>
No other user may be running the procedure that is being refreshed, otherwise the following error is issued:</p>
<p class="code">M204.2669: PROCEDURE procname IS IN USE BY SUBSYSTEM subsys-name
<p class="code">M204.2669: PROCEDURE procname IS IN USE BY SUBSYSTEM subsys-name
</p>
</p>
====Refreshing a procedure successfully====
====Refreshing a procedure successfully====
<p>Procedure C-TEST is defined in active subsystem PRODSYS1 in subsystem file PROCS. The following command attempts to refresh procedure C-TEST in subsystem file PROCS. </p>
<p>
Procedure C-TEST is defined in active subsystem PRODSYS1 in subsystem file PROCS. The following command attempts to refresh procedure C-TEST in subsystem file PROCS. </p>
<p class="code">OPEN PROCS
<p class="code">OPEN PROCS
REFRESH SUBSYSPROC C-TEST IN PROCS
REFRESH SUBSYSPROC C-TEST IN PROCS
M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS1
M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS1
</p>
</p>
<p>This form of the command is useful if a user wishes to recompile a procedure when the included code in that procedure has been modified.</p>
<p>
This form of the command is useful if a user wishes to recompile a procedure when the included code in that procedure has been modified.</p>
 
[[Category:Commands]]
[[Category:Commands]]

Revision as of 18:31, 31 October 2014

Summary

Privileges
Defined in the subsystem definition in the SUBSYSMGMT subsystem.
Function
You can replace and refresh procedures in an active subsystem and refresh that procedure in all active subsystems.

Syntax

REFRESH SUBSYSPROC procname IN [GROUP | FILE] name [FROM [{[PERM | TEMP] GROUP}| FILE] name]

Where:

  • procname specifies the name of the procedure you plan to replace.
  • IN clause specifies the Model 204 group or file where the procedure will be replaced.
  • name specifies a specific group name or file name into which to put procname. If neither the GROUP or FILE keyword is specified, then REFRESH SUBSYSPROC looks for:
    1. An open permanent group with that name.
    2. If no open permanent group is found, then REFRESH SUBSYSPROC looks for an open file with that name.
  • The optional FROM clause specifies a specific, temporary or permanent group name or file name from which procname is refreshed. However, the procedure is updated only when a FROM clause is specified.

Usage

REFRESH SUBSYSPROC consists of two operations:

  • Updating the procedure

  • Causing the recompiling of the procedure

A STOP SUBSYS command can override a REFRESH SUBSYS command. If an APSY subsystem procedure with the subsystem precompile prefix is compiled, and the procedure is found in an unlocked subsystem procedure file, the following message is issued:

M204.0468: COMPILATION NOT SAVED - INCLUDE FROM UNLOCKED FILE

See also "Generating success messages" and "Generating error messages" in Dynamically refreshing procedure compilation with the REFRESH SUBSYSPROC command.

Using the optional FROM clause

If the FROM clause is not specified, the copy operation does not occur but the refresh operation does. It is useful to issue the REFRESH SUBSYSPROC command without the FROM clause when the included code in a procedure has changed, but the procedure itself has not. This forces the procedure to be recompiled, which in turn picks up the newly updated included code.

For example, suppose you change a procedure that is included in other precompiled procedures. Even though the other precompiled procedures have not changed, you would want to refresh them so that they get recompiled with the new included code. Whether or not the copy operation occurs, the refresh operation causes the procedure to be discarded and recompiled the next time it is invoked.

You must open the source and destination file (or groups) before issuing the command. Therefore, it is essential that LOCK FILE/GROUPS on the SUBSYSMGMT Operational Parameters screen is set to N.

Examples

Update active subsystems simultaneously from a file

Procedure C-TEST is defined in active subsystem PRODSYS1 and PRODSYS2 in subsystem procedure file, PROCS. The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. Procedure C-TEST is copied from file DATA and replaced in subsystem file PROCS and is refreshed in every active subsystem in which the procedure is defined.

OPEN PROCS OPEN DATA REFRESH SUBSYSPROC C-TEST IN PROCS FROM DATA M204.2666 C-TEST REPLACED IN FILE PROCS M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS1 M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS2

Updating an active subsystem from a group

Procedure C-TEST is defined in active subsystem PRODSYS1 in subsystem procedure group PROCGRP. PRODSYS1 is defined with NUMLK=2. PROCGRP is created with TEMPPROC, PROCF1, PROCF2. C-TEST can be found in files TEMPROC and PROCF1.

The following command attempts to refresh procedure C-TEST in subsystem group PROCGRP from group TESTGRP. Procedure C-TEST is copied from the first file in group TESTGRP that contains procedure C-TEST and replaces procedure C-TEST in the file PROCF1 in group PROCGRP. The procedure is refreshed in every active subsystem in which the procedure is defined.

OPEN PROCGRP OPEN TESTGRP REFRESH SUBSYSTEM C-TEST IN PROCGRP FROM TESTGRP M204.2666 C-TEST REPLACED IN FILE PROCF1 IN GROUP PROCGRP M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS1

Trying to refresh an inactive subsystem

Procedure C-TEST is not defined in any active subsystems. The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. The REFRESH command fails and the procedure is not copied or refreshed.

OPEN PROCS OPEN DATA REFRESH SUBSYSPROC C-TEST IN PROCS FROM DATA M204.2668 C-TEST NOT FOUND IN ACTIVE SUBSYSTEM M204.2683 REFRESH COMMAND FAILED

If there are no active subsystems containing the procedure, you can issue the COPY PROC command to update the procedure.

Trying to refresh a missing procedure

The following command attempts to refresh procedure C-TEST in subsystem file PROCS from file DATA. However, procedure C-TEST does not exist in file DATA. The REFRESH SUBSYSTEM command fails and the procedure is not copied or refreshed.

OPEN PROCS OPEN DATA REFRESH SUBSYSPROC C-TEST IN PROCS FROM DATA M204.1158 CAN'T COPY PROCEDURE C-TEST M204.2683 REFRESH COMMAND FAILED

Trying to refresh a procedure that is in use

No other user may be running the procedure that is being refreshed, otherwise the following error is issued:

M204.2669: PROCEDURE procname IS IN USE BY SUBSYSTEM subsys-name

Refreshing a procedure successfully

Procedure C-TEST is defined in active subsystem PRODSYS1 in subsystem file PROCS. The following command attempts to refresh procedure C-TEST in subsystem file PROCS.

OPEN PROCS REFRESH SUBSYSPROC C-TEST IN PROCS M204.2665 C-TEST REFRESHED IN SUBSYSTEM PRODSYS1

This form of the command is useful if a user wishes to recompile a procedure when the included code in that procedure has been modified.