JACKIE's Forum OS/400's

lthough the term “” is A common use of is to redirect more well-known by your input device from the keyboard to Aand Linux programmers it is an a disk . Basically you are telling the environment that most of us are familiar shell to read a disk file and with. A shell is, quite simply, a command process it. Piping allows you to use the Jackie Jansen interpreter. In the UNIX or Linux worlds output from one command as input to a there are multiple shell environments, second command. In this way you can two of the most common are the KORN string a set of commands together each shell and the Bourne Again SHell (). one potentially filtering or modifying In addition to the standard UNIX In the PC world we are all familiar the data to get the results you are looking commands OS/400 supports commands with COMMAND.COM. In the iSeries for. to access “native” functionality. The world, although we rarely use the same shell command “liblist” shows you your terminology, we are very experienced Qshell gives you access to many current library list. The shell utility “db2” with using command entry or QCMD different UNIX or Linux commands can be followed by a db2 statement in which is our shell. to work with the IFS. You can also use quotes that references DB2/400 tables. Qshell to develop Java applications. Many years ago IBM announced support The Java Development toolkit includes Earlier today I was looking on the internet for POSIX standards in OS/400. One of many UNIX style utilities for use in for some information and happened the capabilities that this gave us, was Java application development. IBM uses upon a sample CL program used to support for a UNIX or Linux shell Qshell is applications such as WebSphere the size of an object in the IFS. Another called “Qshell”. If you STRQSH (Start to gain cross platform compatibility. alternative to this CL program would Qshell) you are in have been to use the Qshell command. an environment very Qshell gives you the The command “strqsh -l | -c 39-50” similar to command capability of creating an would first list the files in your directory entry. Qshell allows archive file similar to a and then pipe or send this list to the us to execute powerful save file or a zip file on cut command which would extract the commands and utilities, a pc. When developing characters containing the object length. most of which work Java applications, you The output would be a list of all objects with files in the IFS. often want to create sizes in the directory. a JAR file or a Java The shell commands Archive file. The “jar” Although Qshell is part of OS/400 and has can either be run command will either been for a very long while, it is an optional interactively or through create the archive file component and not installed by default. a . A shell or extract files from the “GO LICPGM” (Go Licensed Program) script is simply a text archive file depending and check if OS/400 option 30, the Qshell file that contains shell commands, much on the options specified. This is similar interpreter, has been installed. TG like a CL program or jobstream contains to performing a SAVOBJ to a save file CL commands. and then running RSTOBJ. In a UNIX or For more information on Qshell visit Linux environment creating a (Tape the iSeries Info Centre at http://publib. Qshell is a program that reads some input, Archive) file is very common. In Qshell boulder.ibm.com/html/as400/infocenter. interprets the command and then produces the “tar” command again allows you to html. output. By default the standard input and either create the TAR archive file or to output devices are the keyboard and the extract files from it based on command Jackie Jansen is a Senior Consulting display. Qshell allows for capabilities line options. IT Specialist. She currently works known as redirection and piping. These in the IBM Americas Advanced may be familiar to many of you from past One of the more popular shell commands Technical Support Solutions Centre. DOS days even if you aren’t familiar with is “greb”. Don’t you just love UNIX Jackie is a frequent speaker at UNIX. Redirection allows you to change style command names? “greb” allows iSeries Technical Conferences and where the input comes from and where you to search for a pattern or a string of User Group meetings. Contact her at the output goes to. characters within a file. [email protected].

24 TORONTO USERS GROUP for Midrange Systems – July 2004