Previous Topic: #SETIMENext Topic: #STAE


#SNAP

The #SNAP statement requests a memory snap of one or more of the following areas:

The information requested by the #SNAP is written to the DC/UCF log file. A user-supplied title can be displayed with any of these types of snaps.

Syntax

►►─┬─────────┬─ #SNAP ────────────────────────────────────────────────────────►
   └─ label ─┘

 ►─┬───────────────────────────┬──────────────────────────────────────────────►
   └─ FORMAT=( ─┬─ ALL ──┬─ ) ─┘
                ├─ SYS ──┤
                └─ TASK ─┘

 ►─┬────────────────────────────────────────┬─────────────────────────────────►
   └─ ,PLIST= ─┬─ SYSPLIST ◄ ─────────────┬─┘
               └─ parameter-list-pointer ─┘
 ►─┬────────────────────────┬─────────────────────────────────────────────────►
   └─ ,TITLE=title-pointer ─┘

 ►─┬────────────────────────────────────────────────────────────┬─────────────►
   │           ┌────────────────── , ─────────────────────┐     │
   └─ ,AREA=( ─▼─ data-area-pointer,data-length-register ─┴─ ) ─┘

 ►─┬──────────────────────┬───────────────────────────────────────────────────►◄
   └─ ,REGS= ─┬─ YES ◄ ─┬─┘
              └─ NO ────┘

Parameters

FORMAT=

Requests a formatted snap of system and/or task areas.

ALL

Requests that the system write a snap of both task and system areas. Areas associated with the issuing task are itemized and formatted separately from the system areas. The entire task control area is included as one item with a system snap.

SYS

Requests that the system write a snap of system areas.

Note: In most systems, this is a very large amount of memory; system snaps will impede system performance and should be reserved for special use.

TASK

Requests that the system write a snap of task areas and resources associated with the issuing task.

PLIST=

Specifies the location of the storage area in which the system builds the #SNAP parameter list.

SYSPLIST

(Default); is the symbolic name of the storage area in which the system builds the #SNAP parameter list.

parameter-list-pointer

A register that points to the area or the symbolic name of the area in which the system builds the #SNAP parameter list.

Calculate the size of the parameter-list area using this formula:

5 + 2P + T

where the following conditions are met:

  • P is the number of data-area-pointer,data-length-register pairs coded for the AREA parameter, described below.
  • T is equal to 0 if the TITLE parameter, described below, has not been specified, or 1 if the TITLE parameter has been specified.

For example, if four pairs are specified and the TITLE parameter is omitted, the length of this storage area is 13 fullwords.

TITLE=

Specifies the title to be printed at the beginning of the snap. If requested, the title can be, at most, 133 characters. The first character must be a valid ASA carriage control character (D, 0, 1, or +). In addition, there must be a 1-byte field defined prior to the ASA control character which designates the length of the title field. For example, this denotes a length of 133:

LEN DC AL1(133)
title-pointer

A register that points to the title, or the symbolic name of a user-defined field that contains the title.

AREA=

Requests a snap of the specified areas. The AREA parameter can be specified independently of or together with the FORMAT specification. The memory defined by the AREA parameter may or may not be included in the memory areas associated with task or system areas specified by the FORMAT parameter.

data-area-pointer

Specifies the area to be snapped. Data-area-pointer may be the symbolic name of the area, or a register that points to the area. Register 1 is reserved for internal use; any other register is valid.

data-length-register

Specifies the length, in bytes, of the area to be included in the snap. Data-length-register is a register that contains the length, the symbolic name of a user-defined halfword or fullword field that contains the length, or an absolute expression of the length of the data area.

REGS=

Specifies whether values contained in the register should be printed.

YES

(Default); specifies that the snap includes all register values.

NO

Specifies that the snap does not include register values.

Examples

The #SNAP statement shown below requests a snap of two specific task areas. The MAINSAVE area (80 bytes in length) is the area to be snapped. A title is printed at the top of each page of the snap.

#SNAP AREA=(MAINSAVE,80),TITLE=TITLE1
          .
          .
          .
     TITLE1   DC    AL1(L'TITLE+1)
     CC       DC    C'1'
     TITLE    DC    C'ABEND EXIT PROGRAM AND WORKAREA SAMPLE'

Status Codes

The #SNAP request is unconditional; any runtime error results in an abend of the issuing task.