You can use the SNAP macro to obtain a dump of some or all of the storage assigned to the current job step. You can also dump some or all of the control program fields. The SNAP macro causes the specified storage to be displayed in the addressing mode of the caller.
Both NUC and ALLVNUC are valid. Only ALLVNUC gives you the whole virtual nucleus. For more information about the SNAP macro, see z/OS MVS Programming: Assembler Services Guide.
The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Problem state and any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN=HASN=SASN |
AMODE: | 24- or 31-bit |
ASC mode: | Primary or AR Note: If your program is in AR mode
and you issue SNAP rather than SNAPX following SYSSTATE ASCENV=AR,
the system substitutes the SNAPX macro and issues a message telling
you that it made the substitution.
|
Interrupt status: | Enabled for I/O and external interrupts |
Locks: | No locks held, and no enabled, unlocked task (EUT) FRRs established |
Control parameters: | Must be in the primary address space |
Before issuing the SNAP(X) macro, the caller does not have to place any information into any register unless using it in register notation for a particular parameter, or using it as a base register.
Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after regaining control.
DSORG=PS,RECFM=VBA,MACRF=(W),BLKSIZE=nnn,LRECL=xxx,
and DDNAME=any name but SYSABEND, SYSMDUMP or SYSUDUMP
If the DD name for the SNAP dump has the XTIOT, UCB nocapture, or DSAB-above-the-line options of dynamic allocation, your DCB must point to a DCBE before you open the DCB. The DCBE must have the LOC=ANY option. You can code that even if the DD name does not have any of these dynamic allocation options. To point the DCB to the DCBE, code the DCBE operand on the DCB macro, or store into the DCBDCBE field if you also turn on the DCBH0 and DCBH1 bits. The DCBE can reside above the 16 MB line even if your program runs in 24-bit.
In order for the OPEN for the DCB to succeed, it is necessary for the NON_VSAM_XTIOT=YES option in the DEVSUPxx member of PARMLIB to be active.
For dynamic allocation, XTIOT option bit is S99TIOTEX, the UCB nocapture option bit is S99ACUCB, and the DSAB-above-the-line option bit is S99DSABA. These options are defined by the IEFZB4D0 macro. For more information about the XTIOT option for dynamic allocation of the dump data set, see S99PARMS programming interface in MVS Data Area Volume 6 from z/OS Internet Library.
If a standard dump of 120 characters per line is requested, BLKSIZE must be either 882 or 1632, and LRECL must be 125. A high-density dump printed on a 3800 Printing Subsystem has 204 characters per line. To obtain a high-density dump, you must code CHARS=DUMP on the DD statement describing the dump data set. The BLKSIZE= must be either 1470 or 2724, and the LRECL= must be 209. You can also code CHARS=DUMP on the DD statement describing a dump data set that will not be printed immediately. If you specify CHARS=DUMP and the output device is not a 3800, print lines are truncated and print data is lost. If you open a SNAP data set in a problem program that will be processed by the system loader, your problem program must close the data set.
The DCB and TCB must reside in 24-bit addressable storage. All other parameters can reside above 16 megabytes if the issuer is executing in 31-bit addressing mode.
If the program is in AR mode, issue SNAPX rather than SNAP; issue the SYSSTATE ASCENV=AR macro before SNAPX. SYSSTATE ASCENV=AR tells the system to generate code appropriate for AR mode.
None.
None.
The standard form of the SNAP macro is written as follows:
Syntax | Description |
---|---|
name | name: Symbol. Begin name in column 1. |
␢ | One or more blanks must precede SNAP. |
SNAP | |
␢ | One or more blanks must follow SNAP. |
DCB=dcb addr | dcb addr: A-type address, or register (2) - (12). |
,TCB=tcb addr | tcb addr: A-type address, or register (2) - (12). |
,ID=id nmbr | id nmbr: Symbol, decimal digit, or register (2) - (12). |
Value range: 0-255 | |
,SDATA=ALL | |
,SDATA=(sys data code) | sys data code: Any combination of the following, separated by commas. If you specify only one code, you do not need the parentheses. |
|
|
,PDATA=ALL | |
,PDATA=(prob data code) | prob data code: Any combination of the following, separated by commas. If you specify only one code, you do not need the parentheses. |
|
|
,STORAGE=(strt addr,end |
strt addr: A-type address, or register (2) - (12). |
Note: One or more pairs of addresses may be specified, separated by commas. For example: STORAGE=(strt addr,end addr, strt addr,end addr) | |
,STRHDR=(hdr addr) | hdr addr: A-type address, or register (2) - (12). |
,STRHDR=hdr list addr | Note: hdr addr is one or more addresses separated by commas. If you specify only one header address as an A-type address, you do not need the parentheses. If you specify one or more registers, then you must code double parentheses (one set enclosing each register and one set enclosing the list of registers). If STRHDR=(hdr addr) is specified, then STORAGE must also be specified. |
hdr list addr: A-type address, or register (2) - (12). |
|
,SUBPLST=sbp list addr | sbp list addr: A-type address, or register (2) - (12). |
The parameters are explained as follows:
Note: Subpools 229, 230, and 249 will be dumped only for the current task.
If other options are specified with SUM, the summary dump is dispersed throughout the dump.
If the STORAGE parameter was specified, the STRHDR (storage header) value must be one or more header addresses. The number of pairs of starting and ending addresses specified for STORAGE must be the same as the number of header addresses specified for STRHDR. If a header is not desired for a storage area, a comma must be used to indicate its absence.
If the LIST parameter was specified, the STRHDR value must be the address of a list of header addresses. The list of addresses must begin on a fullword boundary, and the high order bit of the fullword containing the last address of the list must be set to 1. The number of pairs of starting and ending addresses supplied with the LIST parameter must be the same as the number of addresses in the list supplied with STRHDR. If a header is not desired for a storage area, the STRHDR list must contain a zero address to indicate its absence.
Control is returned to the instruction following the SNAP macro. When control is returned, register 15 contains one of the following return codes:
Hexadecimal Code | Meaning |
---|---|
00 | Successful completion. |
04 | Data control block was not open, or an invalid page exception occurred during the validity check of the DCB parameters. |
08 | Task control block address was not valid, an invalid
page reference occurred during the validity check of the TCB address,
a subtask is a job step task, sufficient storage was not available,
or the READ for JFCB or JFCBE failed. In all cases, the dump is canceled.
(Message IEA997I is issued when the READ for JFCB or JFCBE fails.) Or, the ALET for SNAP parameter list or the ALETs for areas pointed to by the parameter list are not valid. |
0C | Data control block type (DSORG, RECFM, MACRF, BLKSIZE, or LRECL) was incorrect, or the DCB's BLKSIZE and/or LRECL were not compatible with the dump format options specified on the dump-related DD statement. |
10 | DEBCHK TYPE=VERIFY function failed. This may be due to DEBDCBAD not pointing to the DCB (or ACB) passed to DEBCHK. |
SNAP DCB=(8),TCB=(5),PDATA=ALL,SDATA=ALL,LIST=(9)
SNAP DCB=(8),TCB=(5),ID=4,LIST=(9),SDATA=(TRT,Q)
SNAP DCB=(8),STORAGE=(1000,2000,3000,4000), X
STRHDR=(,L1)
.
.
.
L1 DC AL1(L'HDR1)
HDR1 DC C'USER LABEL ONE'
SNAP DCB=(8),LIST=X,STRHDR=L1
.
.
.
X DC A(1000) Start address
DC A(1999) End address
DC A(3000) Start address
DC X'80' End of list indicator
DC AL3(3999) End address
L1 DC A(HDR1) Address of length label for
header one
DC X'80' End of list
DC AL3(HDR2) Address of length label for
header two
HDR1 DC AL1(L'HDR1A) Length of header one
HDR1A DC C'LABEL ONE' Header one
HDR2 DC AL1(L'HDR2A) Length of header two
HDR2A DC C'LABEL TWO' Header two
SNAP DCB=XYZ,TCB=0,SUBPLST=SUBADDR
.
.
.
SUBADDR DS OF Fullword boundary
DC X'0003' Number of entries in the list
DC X'0000' Subpool 0
DC X'0001' Subpool 1
DC X'0002' Subpool 2