Exclude task from SM2 task statistics
| Component: | openSM2 | 
| Functional area: | Program control | 
| Domain: | PROGRAM | 
| Privileges: | all privileges bar  | 
Function
The STOP-TASK-MEASUREMENT command allows users to exclude their tasks from SM2 task statistics (see the START-TASK-MEASUREMENT command). Withdrawal of authorization for task monitoring by the SM2 primary administrator (MODIFY-USER-ADMISSION TASK=*INHIBIT) and unloading of SM2 (STOP-SUBSYSTEM SUBSYSTEM-NAME=SM2) also terminate any current user task measurements.
Privileged functions
Privileged users (SW-MONITOR-ADMINISTRATION privilege) can terminate monitoring for any task (see TSN operand).
Format
| STOP-TASK-MEASUREMENT | 
| TSN = *OWN / <alphanum-name 1..4> | 
Operands
TSN =
Specifies the task for which monitoring is to cease.
TSN = *OWN
Monitoring of the task calling the command is terminated.
TSN = <alphanum-name 1..4>
Monitoring of the task with the specified TSN is terminated. The nonprivileged user can only terminate SM2 monitoring for tasks running under his own user ID. 
Return codes
| (SC2) | SC1 | Maincode | Meaning | 
|---|---|---|---|
| 0 | CMD0001 | No error | |
| 32 | NPS0050 | System error in SM2 modules. Command rejected | |
| 64 | NPS0044 | No authorization to monitor task. Command rejected | |
| 64 | NPS0045 | Task already being monitored by SM2 | |
| 64 | NPS0046 | Task monitoring not initiated by START-TASK-MEASUREMENT. Command rejected | |
| 64 | NPS0047 | Specified task does not exist | |
| 64 | NPS0051 | Specified task cannot be monitored by the user | |
| 64 | NPS0065 | No further tasks can be monitored | |
| 64 | NPS0066 | Invalid file attributes on the user-specific SM2 output file | |
| 64 | NPS0067 | DMS code ‘(&00)’ on macro call ‘(&01)’ for the user-specific SM2 output file |