[MUSIC] The word parse, means to resolve or divide something into its component parts, this is usually applied in language to a sentence or a phrase. The Rexx parse instruction is used to accept input data from a variety of sources, break that data up into pieces or its component parts, and assign the pieces as the values of variables. There are several sources of input data, and there are many ways, in which the data may be parsed and assigned to variables. Let's take a look, it's often desirable to prompt the user of a program for some input, the parse instruction accepts data from a number of different sources, one of those input sources is the terminal keyboard. In Rexx, a sate instruction can be used to prompt the use of an input and the parse instruction can be used to read that input, the parse instruction keyword that causes parse to read from the keyboard is pull. The parse pull instruction, will cause the exec to stop executing, and wait for the user to type something at the keyboard, when the user presses the Enter key, the data that was typed is intercepted by parse and is assigned to variables according to the rules in the variable template. The key word upper, automatically translate the input data into upper case before assigning it to variables, coding simply pull is a shorthand form of parse upper pull, to leave the input data in mixed case, you must code parse pull dropping the keyword upper. The simplest variable template is just a string of variable names, the words in the input data are assigned to the variables one by one, the first word of input becomes the value of the first variable, the second word of input is assigned to the second variable and so forth. So if I say parse pull val1, val2, val3, and I input the words Monday, Tuesday, Wednesday, then var1 will be Monday, val2 will be Tuesday and val3 will be Wednesday, three words of input 4, 3 variables. How tidy, if I only entered two input words of Monday and Tuesday, then pull var3 has no input data to be populated by and is assigned a null value, and if I were to input all seven days of the week, var3 would read Wednesday, Thursday, Friday, Saturday, Sunday. Many programs accept parameters, which are coded on the command line following the program name. Rexx has the capability to accept input arguments from the command line as well, again, by using the parse instruction, the parse instruction, keyword that allows parse to accept command line arguments is Arg. An argument string parse into the Rexx exec from the command line is placed in a buffer in storage, the parse are construction that reads that buffer, the instruction remains intact for the life of the exec. So the parse Arg instruction can be coded over and over again, in the same exec, so that, you can reparse the same data, as many times and in as many ways as you wish. Once again, the key word upper translates the incoming arguments to uppercase before parse assigns the data to variables, just as pull coded by itself, is short for parse upper pull. Coding Arg is shorthand for parse upper Arg, to lead the empathy to in mixed case, you must code parse Arg. Let's assume that, several words of information that are being passed to a parse Paul or Pawsox statement, but also, assume that we simply don't care about one or more of those words. So how can we ignore part of the input data and pass the rest of the input data? Well, one thing we can do is, code a dummy variable to accept the word that we're not interested in, and then, we just don't use that variable in the rest of the exec. That method would work but it does waste the variable name and causes Rexx to go through some unnecessary overhead, so instead, we can use the pausing placeholder. Coding a blank delimited period, in place of a variable name in a variable template, will cause the parse instruction to ignore any data, that would have been assigned to a variable in that position. So if the instruction parse pull var1, var2 period, were to appear in a Rexx exec, then, the first word of input would be assigned to var1, the second word to var2 and every other word of input, well, it would be ignored. The trace instruction is typically used to debug a Rexx exec, tracing an executive means that, you want Rexx to show you the instructions of the exact on the screen before they're executed, and perhaps, some information about how Rexx is executing the programme code. There is a lot more direct tracing than the options shown here, though, this is just a simple introduction of the most useful features, so you can get started, using trace in the lab exercises, the rest of the features of the trace instruction, where we'll discuss those later. Now, when coding the trace instruction in your Rexx execs, you can type the entire option name if you wish, but you only need to type the first character of the option. The trace instruction is often found at or near the beginning of an exec, but trace options, may be set wherever and wherever you want. Okay, Rexxtry, Rexxtry is a public domain executive, that allows you to interactively execute Rexx instructions. Once, you start Rexxtry, anything you type out the terminal will be executed by the Rexx interpreter, it's an excellent tool for experimenting and testing, and prototyping your code. You'll be using Rexxtry periodically, throughout the course and it's a great way to test out all the instructions that we've covered so far. [MUSIC]