Executing CLISTs. To execute a CLIST, use the EXEC command. From an ISPF command line, type TSO in front of the command. In TSO/E EDIT or TEST mode. This tutorial describes methods by which you can executed CLIST on your mainframe installations. The CLIST language enables you to work more efficiently with TSO/E. You can write programs, called CLISTs, that perform given tasks or.
|Published (Last):||11 July 2011|
|PDF File Size:||2.1 Mb|
|ePub File Size:||1.87 Mb|
|Price:||Free* [*Free Regsitration Required]|
It is basically a list of other TSO commands. Get it, C List, where C stands for Command. You can also make up your own symbolic variables, assign them default values, reassign the values during execution, and insist that the user specify values on the command line at execution time when they run your CLIST. That is to be the topic of a separate post, right after this one. Hence you can devise elaborate systems, but do yourself a favor and keep it simple: Before we go any further into the syntax and structure of your CLIST itself, you probably want to know where to house your CLIST so that the system will be able to find it when you want to run it.
How to set your Cut-and-paste keys. Find the emulator-specific choice bar that should be at the very top of your TSO emulation window.
Get to a dropdown menu from that bar by clicking the sequence. That should show you a map of the keyboard. You can overtype the values shown, or select new values from one of the lists shown near the bottom left of the screen. Your own best choice will depend on the layout of your keyboard, of course. End of Digression on setting Cut-and-paste mainfrrame.
Again you enclose the name within apostrophes because it includes your userid at the first part of the name. Capture that new DSN in your mainfrmae clipboard, for later use. With the new DSN on the clixt, and having Allocate selected as your chosen action, you press the enter key again.
The same attribute display screen should be reshown, this time pairing your new DSN with the attributes from the other dataset. Press enter and your new dataset should be created.
What is a CLIST?
Amend the DSN so the maincrame name is in parentheses: On the next few lines put something super simple like — well, like the lines shown below. Save it and end the edit cliist. Now you might reasonably ask: Are you still in edit, ISPF option 2? Then go immediately into Logon again, but stop at the Logon screenbefore you get into TSO — stop at the screen where you put clsit your password.
Look down near the bottom of that screen. If the Command field is already occupieddo the following otherwise skip this paragraph. Note we said Copy, not Cut. Open Notepad on mainnframe PC and Paste that command into it for safekeeping. As you may know, TSO adds the three-asterisk line at the end when it finishes writing to the screen in line mode rather than full screen mode. You just press enter whenever TSO displays the three-asterisk line.
You are happy that the CLIST runs — whoopee — but disappointed that the text came out entirely upper case. Okay, so now you see how you can specify an optional parameter. Save the member and again execute it, from the command line right there in Edit:. You can write in full screen mode rather than line mode by using ISPF Dialog Serviceswhich we do not ij in this introductory article.
A link to the IBM manual on that is included at the end of this article, however, if you want to look it up there.
How do you know if the name is already in use? There are hundreds, probably thousands, of names already in use, so here is a quick test: If you get any other response, then it probably found something called XYZ and tried to execute it, minframe you should pick a different name. Caveat — right, always with the caveats — mainrfame this one is pretty unlikely, so feel free to skip this paragraph — there are some special command tables that are probably not being used at your location, but possibly might be — there’s a slight chance — and in such command tables the person responsible for their setup can set it up such that command XYZ is only valid if it comes from some particular source or is invoked in some particular way.
Just thought Cllst mention it, because it can be a real puzzler in the exceedingly rare cases where it happens. There is a link to the IBM manual at the end of the article, if you need more. mainfrxme
EXECUTE CLIST CODE ON MAINFRAMES
You can end a line with a hyphen minus sign or a plus sign if you want to continue the line onto the next line. The difference is that using the plus sign causes the removal of any leading blanks on the second line, whereas using the traditionally English-like hyphen leaves the blanks intact when the lines are stitched together.
According to the manual, the maximum total length of a statement is characters altogether. CLIST statement names, if any exist, have to be capitalized. A statement label is an alphanumeric string up clisy 31 characters long starting with a letterwith a colon: The label has to have an actual statement on the same line right after the label or, of course, on the following clisf if the first line ends with a plus or a minus continuation character after the colon.
It looks sort of like the upper right hand corner of a square, or like a hyphen with a small vertical bit hanging down at the end of it. Without parentheses to change the order, exponentiation is done first, then multiplication and division, then addition and subtraction again, like real math.
Comparisons are done after the math has been evaluated. This has the benefit of being easier for a person reading your code to understand the meaning without ambiguity.
So if you use parentheses, it reduces the chance that someone updating your CLIST in the future will mess up the calculation. It has two cousins.
In other words, the cursor remains at the end of the line, right after whatever is written, making it look as though it is waiting for input. Instead of specifying zero, you specify the number of required parameters, followed by their parameter names. You can also still specify optional parameters following after the required parameters if you wish. If the user executes TRY2, they need to specify two parameters on the same line.
For example, from the ISPF command line, a user might say:. The standard prompt tells the user the name of the parameter that is missing, whatever name you have chosen. So choose names that are descriptive of what the user is expected to enter, so that, when prompted, they can guess what is wanted.
On with the terminal userstarting on page For example, the following lines could be used as maknframe awkward method for writing the word South:. The following maihframe would find the positions of the first three vowels in the alphabet:.
It is left as an exercise for the reader to locate the other vowels in the alphabet; or just pretend you did, and keep reading. The default is MSG, meaning messages are displayed. For example, if you invoke the FREE command to free a dataset that happens not to be currently allocated, it issues a message telling you so.
The default, CAPS, causes character strings to be converted to uppercase. These are pretty much what they look like. You also have the TO and BY construction, but you can look that up yourself if you want to use it. This, too, is just what it looks like. The target of GOTO has to be the label of a statement that has a label. A label ends with a colon: You use these to read input from the user and write lines to the screen, as already shown. I just wanted you to know that this capability exists.
Remember that not all of these variables are populated if you did not specify the relevant optional parameters as mentioned in the preceding paragraph Shown below are some of the variables where your information comes back after you invoke LISTDSI. Run faster by minimizing the use of the FREE command. REUSE is also an extension to the original syntax.
Consolidate many FREE invocations into one 1. Do not be beguiled by the ease and allure of copying! As usual you do not need to take my word for this. The difference in run time is so stunning you can detect it without measuring it.
Try running each one in turn. Go ahead and try it for yourself. Links to IBM doc: In this case I’m also showing you a link to the read-it-online IBM Knowledge Center version, which has the advantage of being easy to navigate online: Updated slightly May 3rdand again May 10th. Skip to content Skip to main menu Resources Disclaimer. How to set your Cut-and-paste keys Find the emulator-specific choice bar that should be at the very top of your TSO emulation window.
So you can set it up to run every time you Logon TSO. First, however, observe whether there is already a command there. You can use parentheses in expressions, just like in regular math.
Getting Input from the User: For example, cliist the ISPF command line, a user might say: For example, the following lines could mainfraame used as an awkward method for writing the word South: The following lines would find the positions of the first three vowels in the alphabet: Some of the features you can specify, and their meanings, are: GOTO This, too, is just what it looks like.
Builtin variables you can use: Do the following instead: