REFRESH SUBSYSPROC command

From m204wiki
Revision as of 01:05, 28 February 2013 by Alex (talk | contribs) (Automatically generated page update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

The 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 the Rocket Model 204 System Manager's Guide, "Generating success messages" and "Generating error messages".

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.