SET DOCTEMPLATE

Refresh the cached copy of a document template installed in your CICS® region, or phase in a new copy of a CICS program or exit program that is defined as a document template.

SET DOCTEMPLATE

Read syntax diagramSkip visual syntax diagramSET DOCTEMPLATE( data-value)COPY(cvda)NEWCOPY

Conditions: INVREQ, NOTFND, NOTAUTH

This command is threadsafe.

Description

The SET DOCTEMPLATE command operates on the specified CICS document template. The COPY(NEWCOPY) option is the only option available on this command.

For document templates in a partitioned data set, CICS file, z/OS®UNIX System Services zFS file, temporary storage queue, or transient data queue, the command deletes the copy of the document template which is currently cached by CICS, and replaces it with a new copy. (For templates in a partitioned data set, CICS first performs a BLDL (build list) to obtain the most current directory information, and then rereads the member.)

For document templates that reside in CICS programs (with PROGRAM specified in the DOCTEMPLATE resource definition), the command refreshes the program. It is equivalent to SET PROGRAM PHASEIN for the specified program. Document templates retrieved from programs are not cached by CICS.

For document templates generated by exit programs (with EXITPGM specified in the DOCTEMPLATE resource definition), the command refreshes the exit program. It is equivalent to SET PROGRAM PHASEIN for the specified exit program. When you issue the command, CICS deletes any cached copy of the document template, phases in the new copy of the program, and creates a new cached copy of the document template if the exit program specifies caching. The refreshed exit program can specify a different setting for whether or not caching should take place, and CICS honors the change.

Options

COPY(cvda)
refreshes the document template. The CVDA value is:
NEWCOPY
If a cached copy of the document template exists, it is to be deleted. If the document template resides in a CICS program or exit program, a new copy of the program is to be phased in. If caching is required for the document template, a new copy of the document template is to be loaded into the cache.
DOCTEMPLATE(data-value)
specifies the 1 to 8-character name of the DOCTEMPLATE resource definition which defines the document template.

Conditions

INVREQ
RESP2 values:
2
COPY is specified with an invalid CVDA value.
4
The new copy of the document template could not be loaded into the cache.
NOTFND
RESP2 values:
1
The DOCTEMPLATE resource definition was not found.
3
The member of the partitioned data set specified by the DOCTEMPLATE resource definition was not found.
5
The resource specified by the DOCTEMPLATE resource definition was not found.
NOTAUTH
RESP2 values:
100
The user associated with the issuing task is not authorized to use this command.
101
The user associated with the issuing task is not authorized to access this DOCTEMPLATE resource definition in the way required by this command.