Stop the GTF process using the z/OS Stop (P) command. In this example GTF was started using "S MFAGTF.MYGTF" where the .MYGTF is assigned as an identifier for the GTF process that is then specified in the Stop command.
P MYGTF
AHL006I GTF ACKNOWLEDGES STOP COMMAND
AHL904I THE FOLLOWING TRACE DATASETS CONTAIN TRACE DATA : 353
<hlq>.TRACE
IEF404I MFAGTF - ENDED - TIME=11.48.15
$HASP395 MFAGTF ENDED
$HASP250 MFAGTF PURGED -- (JOB KEY WAS B5A444E4)
The trace data set, <hlq>.TRACE in this example, now has the raw GTF data.