Hi Harold,
All versions of VM, from VM/370 through z/VM support the CP DUMP command.? This command dumps virtual machine storage to the virtual machine's printer.? The issuer of the command can specify an address and length to be dumped, including the entire virtual machine storage area.
Since the dump content is printed, it is in character form, not raw binary.? It is a formatted dump, in essence.? The format of the printed dump varies a bit for the different versions of VM to account for architecture differences (for example dumping 24 vs 31 bit addresses) but they are largely similar.
Since the dump is written to the virtual printer, the output of the CP DUMP command ends up in the VM spool.? You could read the spool file back into a virtual machine for manipulation using i/o commands to the virtual reader, or you could use the DIAGNOSE X'14' spool interface to read it (present in all versions), or you could read it back in using CMS and the READCARD command.
Since the dump is formatted and depending on your needs, you may have to reconvert the formatted data back into a binary form.? Not a difficult exercise but as you said, a separate problem for later.
If you wish to see what one of these dumps looks like, here is an example set of command to obtain a small dump, and read it back into the virtual machine so you can use CMS to review it.? Logon to a CMS userid and issue:
1. SPOOL PRT *
2. CP DUMP 0.2000
3. CLOSE PRT
4. READ DUMP OUTPUT
5. browse or edit the DUMP OUTPUT file to view the contents.
This will dump your virtual machine storage from location 0 for X'2000' bytes.? Just enough for a nice sample.
Regards,
Bob