Let's move on to some basic REXX syntax. Comments in REXX execs, begin with the character string slash asterisk, and they end with the string asterisk slash. When REXX encounters the beginning sequence slash asterisk, it scans until it finds the ending sequence asterisk slash, and essentially ignores what lies between. Comments may appear almost anywhere within an exec, on lines by themselves, as well as on a line with an instruction. The comment may precede or follow the instruction on the same line, though the latter is much more common. Comments may span multiple lines and may actually be very long. They may also be nested inside other comments. This makes it easy to disable, or comment out blocks of code that contained comments themselves. Now, one thing to note, there are various rules regarding comments depending upon which platform the exec is being run, and how the exec is being executed. For example, on z/VM systems, the rule is that all execs must begin with a comment. In TSO, sometimes you do need to start with a comment that contains the word REXX, and sometimes you don't depending upon factors like where the exec lives. My tip is, if you stick to the most restrictive rules for comments, then it won't matter where the exec lives or how it's been executed, you'll be safe in all cases. Therefore, you should always begin your execs, with a comment containing the string REXX, on the first line of the first comment. I always begin my execs with forward slash asterisk REXX, to get this rule right out of the way up front. Now, multiple REXX instructions may be encoded on the same line, or they may be continued onto multiple lines. Let's have a look at how this is done. The semicolon character is the instruction termination character. It's not necessary, nor is it even recommended to code them after each instruction, because REXX assumes this character at the end of every line in the exec. It may be used to code multiple instructions on the same line, as noted in the first example above. This saves a bit of space, but it makes your exec code harder to read and maintain. If a REXX instruction won't fit on a single line, it may be continued by using a comma, as the continuation character. When REXX sees the comma at the end of the line, it won't assume a semicolon, instead, the next line of code is joined with the previous line, and the comma is replaced with a single blank. Instructions may span as many lines as you wish. You'll notice that indentation is supported by REXX. REXX doesn't care if you indent instructions, or clauses within an exec or not, but you know what? I do? Indentation is strictly for readability purposes and it really does help to make your code easier to read, understand, and maintain. You'll especially want to adopt indentation to help with subordinate clauses, things like loops and if, then, else structures. It helps a great deal, in making your code more readable. Next up, we'll look at how REXX handles variables.