[MUSIC] Hi, my name is Mackenzie Manor and IBM Redbooks project leader specializing in IBMZ. When you enter a shell session, you're appointed to a particular directory in the file system hierarchy. This directory is called the current working directory or CWD. The value of the current working directory is initially assigned as your home directory as found in the OMVS segment of your user security profile, and the ZOF security system like raqa. Your home directory is a directory that belongs to you. It is where you place your personal files and subdirectories, your CWD is a directory which you happen to be pointed to at any given time. The environment variable $ sign home holds the value of your home directory. Your home directory never changes and neither does the value of $ sign home. But your current working directory might change from time to time. Many shell commands allow you to specify a path name or a directory name. If you do not specify the path name or directory name, the command often defaults to your current working directory. When you enter the ISHELL, you do not have a current working directory. You can asign yourself a CWDN ISHELL, and once asigned you can change it whenever you want. Path names that are entered in the UNIX environment are either absolute or relative path names. Absolute path names always begin with the slash, and that leading slash indicates the root directory. Therefore an absolute path name always begins at search at the redirectory. Relative path names never begins with a slash. A relative path name always begin with a search at the current working directory. The CWD is the directory that you are pointing to at any given time. In the shell, you can point to another directory that is changed your CWD by using the shell cd command change directory. To assign or changes CWD and ISHELL, type the directory that you want to assign and the path name field on the main menu. Then, go to the directory action bar item and press enter to pull down the directory menu. Finally, select the option Set Working Directory. All right, let's get into a whole bunch more commonly used SHELL commands. The shell cd command allows you to, you know this from a few minutes back, change your working directory. The cd command produces no output, but the CWD is changed and the environment variable $ sign pwd is updated to reflect that change. You can specify either a relative path name or an absolute path name on the cd command. When any directory is created, it contains two entries created by UNIX. These entries are commonly called dot and dot dot. The dot entry type it as a single period represents the directory itself. This is useful when you want to execute a file in the current working directory, and that directory is not specified in your $ sign path variable. Simply type ./ file name, where file name is the name of the file to be executed. There are also many commands which require a path name to be entered, for example, the CP command. If you wish to use the current working directory as a path name, simply type the dot rather than typing the absolute path name of the CW date. The shell mkdir command make directory creates a directory for you. As with the cd command, you can type either an absolute, or relative path name to specify the directory that you want to create. You can also create multiple directories at the same time by specifying multiple path names with a single make directory command. A directory cannot be created if there is no path to the directory. In other words, if you were to type mkdir/u/tsa0011/dI/dira/dirb and dira did not exist, then dirb cannot be created. It was for this reason that the ability to create a directory tree structure was developed by using the -p option of make directory. Typing make directory /p/u/tsa0011/dira/dirb creates the necessary directories in the tree. So the dirb is successfully created. If dira did not exist, it is created under tsa0011, and then dirb is created under dira. The SHELL chmod command allows you to change the permission bits or mode of files or directories. As before you can enter an absolute, or relative path name to identify the files to be changed. Only a super user or the owner of a file can issue chmod against that file. You can change multiple files to the same mode by typing multiple path name arguments in the chmod command. Using the -r note this is an uppercase R option, which stands for recursive allows you to specify a directory and change not only in the mode of that directory, but also all files and subdirectories below that directory. There's another form of chmod called the symbolic form. With the symbolic form, you specify exactly which permission bits you want to change. The rest of the permission bits are left unchanged. Who can use the chmod command? Users with read access to UNIX preferred class profiles super user.filesis.change curves can use the chmod command to change the permission bits of any file. A super user with a UID equals zero, or that has read access to the rap f facility class. Bpx that superuser and the owner. The shell sort command sort of input data in many different ways. The default sort order is an SP ascending sore against the first field of the file. A field is a string of characters delimited by whitespace blanks or tabs. With other options, you can sort in numeric order dictionary order, ignoring case, month by month order, reverse or descending order and so forth. You can also select which fields to sort within the file. That is what the -k option does. The start POS starting position keyword identifies the field by number against which to start the sort. Entering sort -k3 my file sorts the file called my file in ASCII ascending order, beginning at the third field of each record in the file. The shell cat command stands for concatenate, which means to join together. The cat command joins an input file with an output file. The first argument passed the the cat is assumed to be an input file path name, and the default output file is the terminal screen. Therefore, cat can be used to display file content on the screen. The file content to be displayed might be more than fits on one screen. In that case, the shell or command might be more appropriate. The cat command can also be used to copy a file. The all caps OEDIT in all caps OBROWSE commands are both TSL commands, but they also have UNIX SHELL counterparts. Know that the shell OEDIT and OBROWSE commands are both lowercase is. The OEDIT an uppercase and oedit lowercase commands invoke the ISPF editor against a UNIX file. If the file does not exist, it is created dynamically were placed into a true ISPF edit session. When you save your changes or additions, the data is written into the UNIX file you specified on the command. When you invoke the TSO oedit command, you should specify an absolute path name and close to the single quotes. The OBROWSE uppercase and obrowse lowercase commands invoke ISPF browse, not ISPF view against the UNIX file. Again, this is a true ISPF browse session. If you invoke any of these four commands without specifying a path name, you're presented with an ISPF panel where you can enter the path name of the target file. The output command copies one sequential data set or one member of a partitioned data set into an HFS file. The target file that you specify might not be a directory, and the file is created if it does not already exist. The OPUTX command copies all members of a partition data set to files in a specified directory. The OGET command copies one HFS file to a sequential data set, or to a member of a partitioned data set. If you are copying to a partitioned data set member, you must specify the member name, as well as the data set name. The OGETX command copies all of the files from a specified directory to members of a partitioned data set. The member names are the uppercase equivalents of the HFS file name. If a file name to be copied is longer than eight characters, or uses characters that are not allowed in a ZOS data set name, that file is not copied. There are various operands you can use on these commands to specify that the data to be copied is binary data, text data. That data conversion should take place. For example, from the IBM-1047 to the IBM-037, or ASCII code pages. And there we go a whole bunch of shell commands that you'll likely be able to make good use of. In the next module we'll be working with the SHELL. [MUSIC]