SNAP (COBOL)
The SNAP statement requests a memory snap of the following areas:
idmscu
The SNAP statement requests a memory snap of the following areas:
- Task areas-- These areas include the associated resources, the task control element (TCE), and the dispatch control element (DCE) for the issuing task. The displayed information is formatted with headers.
- System areas– These areas include all tasks and CA IDMS internal control blocks. Task areas are not itemized separately. The displayed information is formatted with headers.
- Specified locations in memory-- These areas include one or more memory areas that are requested by location and length. The displayed informationis notformatted with headers.
The SNAP request writes the requested areas to the DC system log file. This log file is defined during system generation as a sequential data set or a data dictionary area.
Syntax
►►─── SNAP ─┬──────────────────┬─┬──────────┬─────────────────────────────────► └─ TITLE istitle─┘ ├─ ALL ────┤ ├─ SYSTEM ─┤ └─ TASK ───┘ ►─────┬───────────────────────────────────────────────────────────┬─ . ──────►◄ │ ┌───────────────────────────────────────────────────────┐ │ └─▼─ FROMbegin-snap-location─┬─ TOend-snap-location─┬─┴─┘ └─ LENGTHsnap-length───┘
Parameters
- TITLE istitleSpecifies the title to print at the beginning of each snap page. Specify the symbolic name of a user-defined field that contains the title. The title must contain 134 characters. The first character is reserved for use by CA IDMS, and the second character must be a valid ASA carriage control character (blank, 0, 1, +, or -).
- ALLWrites a snap of both task and system areas. The areas that are associated with the issuing task are formatted separately from the system areas. (Task areas are also included with the system areas but are not itemized by task.)
- SYSTEMWrites a snap of system areas.
- TASKWrites a snap of task areas.
- FROMbegin-snap-locationWrites a snap of the specified memory location. Specify the symbolic name of a user-defined field indicating the starting location of the area to be snapped.
- TOend-snap-locationSpecifies the end of the area to snap. Specify the symbolic name of a user-defined dummy byte field or a field containing a data item that is not associated with the requested area.
- LENGTHsnap-lengthDefines the length in bytes of the area to include in the snap. Specify the symbolic name of a user-defined field that contains the length of the data area, or the length itself expressed as a numeric constant.Ifsnap-lengthis greater than 100, some COBOL compilers can produce errors. In this case, use a symbolic name that contains the length, or use the FROM/TO verb form.
Example
The following example requests a memory snap of the specified memory location:
SNAP TITLE IS SNAP-TITLE FROM WS-START TO WS-END.
Status Codes
After completion of the SNAP function, the ERROR-STATUS field in the IDMS-DC communications block indicates the outcome:
Status code
| Meaning
|
0000 | The request has been serviced successfully. |
4032 | The derived length of the specified snap storage area is zero or negative. |