• Aucun résultat trouvé

DFHKC TYPE~ENQ, ENQ ON SINGLE-SERVER RESOURCE *

Dans le document Program Product (Page 174-178)

DFHKC

TYPE~ENQ,

ENQ ON SINGLE-SERVER RESOURCE *

_ _ _ _ _ _ _

Q~DR=CSAWABA

_ _ _

~CIFY

SYMBOLI.£.,2\DDRESS _ _

Page of SH20-9003-2 Revised May 22, 1975 By TNL SN2o-9086

...---..

__ ._--_._----_._----_. __ ._. __

.

__ ._---_.

----_.-OR LA WORKREG,CSAWABA ST WORKREG,TCATCQA DFHKC TYPE=ENQ For ANS COBOL:

01 DFHCSADS COPY DFHCSADS.

02 CSAWABA PICTURE X(50).

MOVE ZEROS TO TCATCQA DFHKC TYPE=ENQ,

QARGADR=CSAWABA OR

DFHPC TYPE=COBADDR, LABEL=CSAWABA MOVE TCAPCLA TO TCATCQA.

DFHKC TYPE=ENQ For PL/I:

IINCLUDE DFHCSADS;

ENQ ON SINGLE-SERVER RESOURCE SPECIFY SYMBOLIC ADDRESS

DECLARE 1 DFHEXCSA BASED (CSACBAR), 2 FILLER CHAR (512),

2 CSAWABA CHAR (50);

DFHKC TYPE=ENQ,

QARGADR=CSAWABA OR

TCATCQA=ADDR(CSAWABA) ;

DFHKC TYPE=ENQ

ENQ ON SINGLE-SERVER RESOURCE SPECIFY SYMBOLIC ADDRESS

*

*

*

The following examples show how to enqueue upon a single-server

resource using method 2. The resource to be enqueued upon is identified by the nine-character social security number in a field labeled

SOCSECNO. Task control makes a copy of this field for its use in controlling the resource.

For Assembler language:

DFHKC TYPE=ENQ,

QARGADR=SOCSECNO, QARGLNG=9

OR

15q CICS/VS Application Programmer1s Reference Manual

* *

~--

- - - - - - - - --- - - - - - - - - - - - -

- -

- -

-LA WORKREG,SOCSECNO ST WORKREG,TCATCQA MVI TCATCQA,X'09'

DFHKC TYPE=ENQ

DFHKC TYPE=ENQ,

QARGADR=SOCSECNO, QARGLNG=9

DFHKC TYPE=ENQ,

QARGADR=SOCSECNO, QARGLNG=9

OR IINCLUDE DFHTCADS;

DECLARE 1 DFHEXTCA BASED (TCACBAR), 2 FILLER CHAR (20),

2 TCATCQAL BIT(S) ; TCATCQA=ADDR(SOCSECNO);

TCATCQAL='00001001'E;

DFHKC TYPE=ENQ

* *

* *

Substituting "DEQ" for "ENQ" in these examples illustrates the ways in which the application programmer can release single-server protection from a resource prier to termination of the associated task.

DECLARE THE PURGEABILITY OF A TASK ON SYSTEM OVERLOA£ (PURGE/NOPURGE) Certain overload conditions, where all of a given system resource (for example, main storage) has been allocated and where each task requires still more of that Desource, can occur in CICS/VS. The result i s a situation in which no task is able to continue processing and no new task can be initiated; the system stalls.

CICS/VS has the capability to detect certain system stall conditions and take corrective action. Corrective action consists, in part, of purging (deleting) the lowest priority task in the system that i's designated as stall purgeable.

A task is initially defined as purgeable or not purgeable in the program control table (PCT) entry associated with the transaction identification for that task. This entry is established by the system programmer at system generation. The application programmer can

dynamically change the purgeability status of a task by issuing the DFHKC TYPE=PURGE

macro instruction to indicate that the task is purgeable, or the DFHKC TYPE=NOPURGE

macro instruction to indicate that the task is not purgeable. The designated status remains in effect for that task until another change is initiated or until the task is terminated. For example, a

long-running task may issue a DFHKC TYPE=NOPURGE macro instruction prior to critical processing, then issue a DFHKC TYPE=PURGE macro instruction after that processing is completed. This ensures that the task is not stall-purged during the critical processing.

JOURNAL SERVICES

Journal management provides facilities for creating and managing special-purpose sequential data sets, called 'journals,' during real-time CICS/VS execution. Journals may contain any and all data the user needs, to facilitate subsequent reconstruction of events or data changes. For example, a journal might act as an audit trail, a change-file of data-base updates and additions, or a record of

transactions passing through the system (often called a 'log').

In addition to the output services described in this section, journal management also provides sup~ort for:

• Operational control and dispOSition of volumes (see the CICS/VS Operations Guide [DOS/VS ] or the CICS/VS Operations Guide rOS/VS 1)

• requests to switch volumes and/or read journal data sets during real-time CICS/VS execution (see the CICS/VS System Programmer's Reference Manual)

Requests for journal output services are made by issuing the journal control macro instruction (DFHJC), either directly from a user task or from a CICS/VS management program on behalf of a user task. Data may be directed to any journal data set specified in the journal control table (JCT), which defines the journals available during a particular CICS/VS execution. The JCT may define one or more journals on tape or direct access storage. Each journal is identified by a number known as the journal file identification. This number may range from 2 to 99; the value of 1 is reserved for a journal known as the system log.

All buffer space and other work areas needed for journal data set physical operations are acquired and managed by the journal control program (JCP). The user task supplies only the address and length of the data to be output. The data is moved to journal buffer space by JCP when building a journal record. The user task retains the use and control of the data and its CICS/VS storage area.

Journal output requests are serviced by JCP. Journal records are built into blocks compatible with standard variable-blocked format.

JCP uses the host operating system's sequential access method to write the blocks to external storage devices.

Each logical journal record begins with the standard fullword length field, a user-specified identifier, and a system-supplied prefix. This data is followed in the journal record by any user-supplied prefix data

(optional), and finally by the user-specified data. Journal control is designed so that the application programmer requesting output services need not be concerned further with the detailed layout and precise contents of journal ~cords. He needs to know only which

journal to use, what user data to specify, and what unique

user-identifier to supply. Normally, he obtains this information from the application system analyst or the person(s) responsible for programs 156 CICS/vS Application Programmer's Reference Manual

Dans le document Program Product (Page 174-178)