Hi everyone. My name is Kathy Lau and I study computer science at Columbia University. This summer, I'm an intern at IBM. We'll open up our discussion about z and OS UNIX shell commands by discussing how you can learn the syntax of any shell command and some of the code page considerations that you need to keep in mind. Shell commands are entered either at the shell command prompt when you're logged in directly to the shell through rlogin or telnet or at the bottom of the screen when you're logged into the shell through TSO using the OMVS command. When you're logged into the shell through TSO, the commands entered at the command line are echoed at the command prompt. If any output is generated by the command, it then appears on the terminal screen, following the command by default. When a command is entered, it's often followed by arguments. The delimiters between the command and the various arguments are spaces. At least one space is required but you can type more than one space as a delimiter. Anything other than spaces, however, are considered to be part of the command string itself. This makes sense because almost any character is valid as part of a pathname. There are many wildcard characters and metacharacters that UNIX can recognize. Commands often consist of just a few characters. For example, ls for the list command, cp for the copy command, and pwd for print working directory command. The format of z and OS UNIX shell commands in both the command entry and command syntax diagrams is the same as for other UNIX systems. Therefore, the ls command, for example, is entered in the same way as the same syntax, except for a few options that might be different on different systems and produce very similar results on z/OS UNIX and other UNIX systems. In syntax diagrams found in manuals or produced by the man command, brackets might appear around a list of like options. The values that appear inside the bracket are actually optional items and might or might not be entered. Any arguments outside of the bracket are required and must be entered. Speaking of documentation, the man command is the shell command which stands for manuals. It is the UNIX online help command. The man command displays sections from the online command reference manual describing the command in question. For example, typing man space ls produces the reference menu that describes the usage of the ls command. The output from the man command often consists of many lines of data. Much more of that appears on the screen. Normally, outputs sent to determine the screen scrolls across the screen until all of the output has been displayed but this is not the case with man. Output from the man command is formatted and display one screen at a time. Pressing the Enter key displays the next line of output, while pressing the Space key displays the next screen of output. To exit from the man output without displaying all of the screens, simply press the Q key for quit. When you're logged into the z/OS Unix shell from TSO using the OMVS command, there are often two different code pages being used. The default US English z/OS TSO code page is CP00037, and the default z/OS Unix code page is CP01047. There are two characters which are mapped differently in these two code pages, the left and right square brackets. These characters are used in command syntax diagrams and are displayed on the screen when using the man command. These two characters are not displayed correctly when coming into the shell through TSO. A code page for a character set determines the graphic character produced for each hexadecimal code. The code page is determined by the programs and the national languages being used. For most countries, z/OS uses one code page and the z/OS UNIX shell uses a different one. To complicate the matter even further, many users have workstations which use an ASCII-based code page. When moving data between these environments, the data might have to be converted between the code pages to maintain the same characters. This may result in different hexadecimal codes depending on the code pages being used. There are code page conversion tables located in SYS1.LINKLIB which can be used to convert between the z/OS code page and the shell code page for the national languages supported by the z/OS UNIX shell. The source for these code page tables can be found in SYS1.SAMPLIB. They can be used as samples for creating a new table if an installation has special requirements. The convert parameter on the OMVS command is used to set up a code page conversion table that handles input to z/OS UNIX and output displayed at the terminal in the shell environment. The table BPXFX111 is where translation between z/OS code page IBM037 and z/OS UNIX code page IBM-1047. This will be used by most shell users in the US. The other example is for a conversion table that's located in a PDS named UNIX.LINKLIB. If you're accessing the shell through the rlogin or telnet interface, automatic and correct conversion is provided. In order to properly displayed square brackets, you must use the right code page. Unfortunately, the 3270 emulator program cannot change the code page spontaneously but has easily addressed it. Simply log off and log on again when changing code pages. Instead of using the man command, you can also reach this z/OS manual entry from the UNIX shell by entering o help man. Note that the code page here is set to 0037 in the 3270 emulator program, so it fits the code page of z/OS TSO ISPF. Here, the code page is set to 1047 in the 3270 emulator program. It does not fit the code page of z/OS TSO ISPF but does fit the code page of the UNIX shell. To perform code page conversion, we can use OMVS CONVERT. The format is OMVS convert parentheses dataset parentheses member name. If dataset name is omitted, z/OS locates member name using the default search order for modules in the system library concatenations. The located member name is used as the character conversion table. For example, if you specify OMVS convert BPXFX111, the character conversion table is BPFX111 in the default module search order and the system library concatenations.