CL commands: Affecting only local pieces of a distributed file with DB2 Multisystem
Some CL commands, when run, affect only the piece of the distributed file that is located on the local system (the system from which the command is run).
These CL commands are as follows:
- Apply Journaled Changes (APYJRNCHG). See Journaling considerations with DB2® Multisystem for additional information about this command.
- Display Object Description (DSPOBJD)
- Dump Object (DMPOBJ)
- End Journal Access Path (ENDJRNAP)
- Remove Journaled Changes (RMVJRNCHG). See Journaling considerations with DB2 Multisystem for additional information about this command.
- Restore Object (RSTOBJ)
- Save Object (SAVOBJ)
- Start Journal Access Path (STRJRNAP)
You can use the Submit Remote Command (SBMRMTCMD) command to issue any CL command to all of the remote systems associated with a distributed file. By issuing a CL command on the local system and then issuing the same command through the SBMRMTCMD command for a distributed file, you can run a CL command on all the systems of a distributed file. You do not need to do this for CL commands that automatically run on all of the pieces of a distributed file.
The Display File Description (DSPFD) command can be used to display node group information for distributed files. The DSPFD command shows you the name of the node group, the fields in the partitioning key, and a full description of the node group. To display this information, specify *ALL or *NODGRP for the TYPE parameter on the DSPFD command.
The Display Physical File Member (DSPPFM) command can be used to display the local records of a distributed file; however, if you want to display remote data as well as local data, you should specify *ALLDATA on the from record (FROMRCD) parameter on the command.
When using the Save Object (SAVOBJ) command or the Restore Object (RSTOBJ) command for distributed files, each piece of the distributed file must be saved and restored individually. A piece of the file can only be restored back to the system from which it was saved if it is to be maintained as part of the distributed file. If necessary, the Allocate Object (ALLOBJ) command can be used to obtain a lock on all of the pieces of the file to prevent any updates from being made to the file during the save process.
The system automatically distributes any logical file when the file is restored if the following conditions are true:
- The logical file was saved as a nondistributed file.
- The logical file is restored to the system when its based-on files are distributed.
The saved pieces of the file also can be used to create a local file. To do this, restore the piece of the file either to a different library or to a system that was not in the node group used when the distributed file was created. To get all the records in the distributed file into a local file, restore each piece of the file to the same system and then copy the records into one aggregate file. Use the Copy File (CPYF) command to copy the records to the aggregate file.
Parent topic:
How CL commands work with distributed files
Related concepts
System activities after the distributed file is created
Journaling considerations with DB2 Multisystem
CL commands: Affecting all the pieces of a distributed file with DB2 Multisystem