@echo off
rem !/bin/sh
rem 
rem $Header: trcfmt 2001300.18 95/11/08 11:41:09 smaring Osd<unix> $ trcfmt.sh 
rem Copyright (c) Oracle Corporation 1996.  All rights reserved.
rem
rem remgenerates a .txt file out of the binary oracle trace .cdf and .dat files
rem given the .cdf file name.
rem For otrcfmt, the -h suppresses the per message header, the -p puts all
rem of the messages in one process .txt rather than in several bundles and
rem the -s suppresses the timestamp and event types. if you want to see the time
rem stamp, then just execute otrcfmt -h -p name.cdf on your own.
 
rem if no cdf file name then prompt them to re-enter it with the name.
rem
rem ===============================================================
rem WIN32COMMON
rem ===============================================================
rem For Windows NT/95, the file should be renamed as trcfmt.cmd when it
rem is released as part of the SQL*NET product. It should be placed in
rem $ORACLE_HOME\bin
rem 
if "%1" == "" goto usage
if not exist %1 goto notexist
otrcrep -h -p -s %1
echo "Your oracle trace file is formatted into a yyy_Pxxx.txt file."
echo "Where yyy is the trace file name."
echo " and  xxx is the process id of the process traced."
goto end
:notexist
echo file %1 does not exist.
:usage
echo Usage: trcfmt cdf_filename
echo        where the cdf_file can be found in your trace directory
echo        with file extension ".cdf".
:end
