IBM SG24-6526-00 User Manual

Page of 184
148
 
Geac System21 commerce.connect: Implementation on the iSeries Server
prompt. DOS command screens commonly use the currently drive and directory name 
followed by a >. You can usually type additional commands before the current one has 
completed, but they may not appear until the current command has completed. 
The Qshell has a current directory that is similar to that of UNIX and OS/400. A DOS 
command session also has a current directory but one that Qshell does not have. The current 
directory is controlled with the 
cd
 command. This is similar to the OS/400 CD command, but 
you do not need the single quotation marks when you use qualified names. To check the 
current directory, use the 
pwd
 command. 
You can exit Qshell by pressing either F3 or F12. If you use F3, then your session is ended. 
Then if you use QSH again, you start another session. If you use F12, then your session is 
detached from the OS/400 job that started it and you can perform other OS/400 work. If you 
use QSH later again from the same OS/400 job, you resume the session where you left it. 
The STRQSH and QSH commands have an optional parameter. This can be a single Qshell 
command or several commands separated by a semi-colon (;). This is of little use interactively 
since it may be easier to start QSH normally and then type the command. However, it can be 
useful if you want to execute some Qshell commands inside a CL program. If the series of 
commands is not very simple, then it may be better to store them in a Qshell script and use 
the QSH command to execute this script. 
If you use the QSH command interactively with a parameter and the command generates 
some output, the QSH command display appears. You need to press Enter to proceed. If the 
command does not produce any output, then the screen is not shown. If you do not want QSH 
to stop, then make sure that your command does not produce any output, possibly by using 
redirection. 
6.2.1  Managing stream files with Qshell commands
You can use many UNIX-like commands in Qshell. Not many of these are useful unless you 
happen to be familiar with UNIX. In unusual circumstances, these commands can be useful. 
One such case is if you accidentally create a file with a character that has a special meaning 
to Windows but not to OS/400. Examples of such characters are the colon (:) and backslash 
(\). You may create a file with these characters in its name, but and this file may be difficult to 
access using Windows Explorer and even when using WRKLNK. 
An example is if you accidentally specify the log file as 
c:\OrderManagement\log\OrderManagement.log. This may cause a file of this name to be 
created in whichever directory was current at the time (probably specified as the working 
directory in the WebSphere application server properties). 
You can see this file in Windows Explorer, but you cannot delete, move, or rename it. When 
you try, you may see an error message telling you that the file does not exist. Worse still, you 
may process a local PC file that happens to have this name. 
The WRKLNK command also shows you the file but does not let you delete or process it. This 
is more surprising since the characters do not have a special meaning to OS/400. 
Note: QSH commands do not actually execute in your interactive job. When you start 
QSH, a job called QZSHSH is started. The commands are sent to this job for execution 
and the results are sent back. This job is ended by F3, but not by F12. Some commands 
may cause further jobs to be used. Some of these jobs may send completion messages to 
your user message queue. If this is set to break, they may interrupt your session.