Even Qshell may be confused by the unusual characters. However in this case, there is a solution. That is you may quote the name. The easiest way to delete the problem file is to navigate into its directory using cd and then delete it by using the rm command. Enter the file name in double quotation marks to prevent Qshell being confused by any special characters, for example:
rm “c:\OrderManagement\log\OrderManagement.log”
If you want to use the file, then you can use Qshell commands. It may be easier, however, to rename it to a normal name and go back to familiar techniques. Oddly the UNIX command for rename is mv (it is also the move command), for example:
rm “c:\OrderManagement\log\OrderManagement.log” OrderManagement.log
6.2.2 The touch and setccsid commands
These touch and setccsid Qshell commands are occasionally useful.
touch is a
An OS/400 enhancement to the touch command makes it more useful. It has an optional parameter
touch
Further data written to the file by OS/400 commands should be translated to the specified code page. This should enable the data to be easily read on a PC using a mapped drive (if it is textual data).
If the file already exists, then the code page is not changed. You can use the setccsid command instead. But it may be appropriate to delete the file and create it again empty using the touch command. You can delete the file by using the rm command.
The setccsid command changes the CCSID of a stream file to a specified value. Note that the syntax is a little different. The command is followed by the desired code page and then the file name as shown in this example:
setccsid 819 /OrderManagement/log/jms.log
This command does not translate any data already in the file. If the file already exists and contains data that you cannot read on a PC, then this command will not help. In fact, it can make the situation worse, since after the command, the data may be misinterpreted on the iSeries server.
6.2.3 Viewing an iSeries stream file using the Qshell tail command
There are a number of Qshell commands for viewing files.
cat: Displays the contents of the file in Qshell.
head: Displays the first few lines of a file.
tail: Displays the last few lines of a file.
These commands are rarely useful. However, there is an option in the tail command that can be useful. If you specify the option
Chapter 6. Tips and techniques 149