We all know, we use NEWCOPY to refresh the program however if module is in use i.e rescount is not equal to 0. NEWCOPY will fail and that's why we have PHASE-IN which performs a REFRESH PROGRAM function to inform the loader domain that a new version of the program is cataloged and that this version of the named program must be used in all future ACQUIRE requests. Now when I can live happily with PHASE-IN why NEWCOPY still exits?
You would have to do a bit of a research before getting into it as IBM has documented everything on this here.
quick is newcopy has to be issued in the same region where program resides but for PHASEIN you tell cics which cicsplex to go and cpsm will take further and does newcopy.
Thanks for the reply. When the cics region is part of CICSPlex then to perform any function we need to set context and scope which tells which cicsplex and cics region the required function need to perform so for newcopy as well you need to tell. And the doc you shared is for TX series. I am asking for z/os platform
From CICS TS 5.2 System Programming Reference (SC34-7294-00):
Specifies that a new copy of the program is to be used the next time that the
module is requested. LINK, XCTL, LOAD, ENABLE, and BMS commands can cause a
module request. You can choose to refresh the module only if it is not currently
in use (NEWCOPY), or to phase in the new version of the module for all
future requests (PHASEIN).
You cannot specify the COPY option for any module that is currently loaded
with the HOLD option, or for any program that is defined as remote.
CICS does not load the module at the time you issue the command, but it does
ensure that a copy is available. If you specified the SHARED option and the
module is in the link-pack area, the LPA copy satisfies this requirement.
Otherwise, CICS searches the DFHRPL or dynamic LIBRARY concatenations,
and returns an IOERR exception if it cannot locate a copy there.
For Java programs that run in a JVM server, you cannot use the NEWCOPY or
PHASEIN options of this command to refresh the program. To implement a
new version of the program, replace the old version of the CICS bundle with
an updated version. For more information, see Updating OSGi bundles in a
For PROGRAM resources that were defined and installed in a CICS bundle,
you cannot use the NEWCOPY or PHASEIN options of this command to
refresh the program. To implement a new version of the program, replace the
old version of the CICS bundle with an updated version. If the CICS bundle
was deployed as part of an application or with an application binding, update
the whole application.
This option has the following CVDA values:
The module is to be refreshed only if it is not currently in use;
otherwise CICS returns an INVREQ exception instead. You can
determine whether a module is in use from the RESCOUNT option in
an INQUIRE PROGRAM command. A value of zero means that the program
is not in use.
The refresh is to occur whether or not the module is in use. If it is, the
copy or copies in use remain until they are no longer in use. All
requests that occur after the refresh use the new copy.