How to list all saved custom filters in Control-M? - mainframe

Assume you created some, eg 3, custom filters saved with filter names A,B, C, using Control-M's ISPF client in zOS (mainframe). Using such custom filters, you can easily switch between the list of jobs to be shown in the Active Jobs File, using primary ISPF commands like:
s A
s B
s C
If you only have like 3 such filters, and with names like A, B or C, it's a piece of cake to remember them all. However, if you have like a dozen of names, each with up to (say) a length 8 (XYZ10000, PQR123, etc), it's pretty much impossible to remember them all.
So is it somehow possible to bring up a list of all available filters (similar to an ISPF memberlist)? If not, where to go find all such filters that are defined, maybe in some ISPF profile dataset member?

If you want to see a list of filters all you need to do is type SHOW ? in the command line and it will bring up a list of save filters.
Put an S beside the one you want to select it.

Rather accidentally, I discovered the correct (and complete) answer to my own question ...
The previous answer is a good start, i.e. you need to issue command show ? (or just s ?). But in my case just typing show ? still didn't show the filters (like A, B or C as in my question). The additional clue to really get it to work, at least in my case, is that I also have to press the PF8-key to perform a page down in that pop-up window (shown after first typing show ?). And without pressing the PF8-key, I only see a list of (vanilla) filters that come with Control-M.

Related

Separate search results panel for each search in sublime text 3?

When I press command + shift + f, I can search for all instances of a string in an entire project.
But when I do it a second time, it brings up the second search in the same panel. This gets very messy very quickly when conducting many searches.
Question: How can I bring up the second (and subsequent) search results in their own, new panel?
Example: 5 searches would result in 5 result sets each of their own panels (i.e. 5 panels total). Also, if possible, I'd like to set this as a default for future if it's simple to do so.
There is currently no way to have different search results buffer for different searches. All of the search results would be appended in the buffer with the name Find Results.
If you want different different search result tabs, then you will need to rename the current search result buffer with a different name than Find Results i.e. Find Results (1). This way, the next time, you perform a find in files, ST would create a new Find Results buffer.
It's actually quite simple to write a small plugin that uses View.set_name() to set the name of the current buffer and then you can bind it to a key (So that you can just change the Find buffer name in one stroke and have other search results in new buffers)

Writing an autocomplete plugin in Sublime Text

Within my company we have an XML-based notation. Among other features, it is possible to define references from one XML document into another. I would like to enable autocompletion in Sublime so that whenever I am adding a reference, the possible files (i.e. XML files within the same project) and link points (i.e. symbols within that file) get offered as recommendations.
So far, I have found a lot of plugins that enable autocomplete for, say, HTML, PHP or LaTeX. However, I have the feeling the code base is too complex for a somewhat simple task. Is there, for instance, some vanilla function that generates completions based on an arbitrary array received as parameter? I would create the logic to determine what is a symbol and derive said array, but the whole process seems somewhat cumbersome to me.
(As a note: I can program in Python and have fiddled with other Sublime features, such as snippets, but these packages seem to be much more complex than it feels necessary.)
The base to create the completions entry is not to complicated. You now need to fill the array with the correct values (this could be done via a project setting or parsing other files).
import sublime
import sublime_plugin
# Your array, which contains the completions
arr = ["foo", "bar", "baz"]
class MyCompletionsListener(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
loc = locations[0]
# limit you completions scope
if not view.score_selector(loc, "text"):
return
completions = [(v + "\tYour Description", v) for v in arr]
return completions
OP's note: The answer works as advertised. However, the integration is so seamless that I thought for a while that something was missing. If the Python script above is on the right folder, all of the completions returned by the completions array will be suggested (depending on Sublime settings, it might be necessary to trigger the completions menu with Ctrl+Space). Also worth noting:
The completions may be None, in which case they just don't add any completion option, or an array of 2-tuples, where the first element is the description (which will be shown in the drop-down menu and trigger the completion) and the second is the value (i.e. the text that will be input if the completion is selected).
The score_selector method can be used to determine if the cursor position is within a given scope.

Delimiting quick-open path with fullstops in Sublime Text 3?

I'm making the move to ST3, and I'm having some trouble. I'd like to be able to delimit the quick-open filepath (⌘ + T) with periods instead of slashes or spaces. However, I can't find the setting to do that.
For example:
component.biz_site_promotions.presentation
should be able to open the file that
component biz_site_promotions presentation
would.
Any help would be greatly appreciated!
There is no setting in Sublime that changes the way this works; the search term is always used to directly match the text in the list items (except for space characters).
Note however that the Goto Anything panel uses fuzzy matching on the text that you're entering, so in many cases trying to enter an entire file name is more time consuming anyway.
As an example, to find the file you're mentioning, you could try entering the text cbspp, which in this case is the first letters of all of the parts of the file name in question.
As you add to the search term, the file list immediately filters down to text that matches what you entered; first only filenames that contain a C, then only filenames that contain a C that is followed somewhere after by a B, and so on.
Depending on the complexity and number of files that you have in your project, you may need to add in a few extra characters to dial in better (e.g. comb_s_pp). Usually this search method will either end you up at the exact file you want, or filter the list so much that the file that you want will be easier to find and select.
Additionally, when you select an item and there was more than one possible match, Sublime remembers which item you selected for that particular search term and brings it to the top of the search results next time you do it, under the assumption that you want the same thing again.
As you use Sublime more (and with different projects) you will quickly get a handle on what partial search terms work the best for you.
In addition to finding files, you can do other things with that panel as well, such as jumping to a specific line and/or column or searching inside the file for a search term and jumping directly to it. This applies not only to the current file but also the one that you're about to open.
For more complete details, there is a page in the Unofficial Documentation that covers File Navigation with Goto Anything
As an extra aside, starting with Sublime Text build 3154, the fuzzy searching algorithm handles spaces differently than previous builds.
Historically, spaces in the search term are essentially ignored and the entire input is treated as one search term to be matched character by character.
Starting in build 3154, spaces are handled by splitting up a single search term into multiple search terms, which are applied one after the other.
This allows multiple search terms to hit out of order. For example, index doc in build 3154 will find doc/index.html, but it won't find it in previous versions because the terms aren't in the right order.
As such, assuming you're not currently using such a build (as of right now it's a development build, so only licensed users have access to it), moving forward if you continue to search the way you're searching in your question, you might start getting more results than you expected.

Sublime text multiple cursors?

Sublime Text is so damn advanced and this seems like such a stupid question, but...
I started writing a for loop in PHP (using SFTP), loved that it gave me a choice to auto-generate the loop. However, it enters this weird multi-cursor mode, which
1)I am not really sure how to use/exit without using the mouse;
2) it seems useless, seeing as all 3 type the same thing, even though I need to change, for example, the $i > x or $i = x.
Although Sublime does indeed support the idea of multiple cursors (which is an incredible time saver and useful as all get out, as we're about to see), what you're actually asking about here is a snippet which in this case happens to also include multiple cursors.
The general idea is that for code that you're likely to type many times (e.g. a for loop), you can create a snippet that will generate the bulk of the text for you in one shot, and then allow you to easily customize it as needed. In this case, the snippet in question is part of the default functionality of Sublime and is provided by the shipped PHP package.
To answer point #2 in your question first, this is far from useless. As seen here, I enter the text for and then press Tab to expand the snippet out. The first thing to notice here is that the status line says Field 1 of 4 to tell me that I'm in a snippet and that it contains four fields.
The first field is the name of the control variable for the loop, and all of them are selected so that as I change the name, all of them change at the same time because when there are multiple cursors, the text you type appears at all of them at the same time.
Once I'm done changing the name of the variable, I press Tab again to go to the next field, which allows me to easily change the point at which the loop starts. Another press of Tab takes me to the third field, where I can specify where the loop ends.
One last press of Tab exits the snippet and selects the text in the loop, so I can start writing my code (caveat: I am not a PHP developer).
At this point you can see Sublime offering another snippet for echo, which would expand out to an echo statement complete with quotes, then allow me to edit the text in the echo and skip to the end.
Circling back around to the first point in your question, you can use Esc at any point to jump out of a snippet and go back to regular editing. You can also use Tab or Shift+Tab to move through the fields in the snippet, and pressing Tab at the last field in the snippet exits it as well.
In this particular case, the first field in the snippet sets up multiple cursors, and so exiting the snippet while this field is active leaves multiple cursors in effect. You can jump back to a single cursor by pressing Esc one more time (this is true regardless of how you ended up with multiple cursors).

dialog/whiptail radiolist consistence

So basically I am trying to rewrite a bash script which uses dialog --radiolist for choosing locale,keyboard,time. At the moment the tag is a number that corresponds to a local (I created a hashtable for it). But because I have, and want to keep it that way for now, around 100 locales it gets messy at the end.
What I wanna achieve is to make it more compact without having to add or add an artificial, non visible item that might easily translate to its tag. (as a tag I would put the locale name)
What I have tried:
1. Noobish thing but I though that there might be some way to include empty like NULL in ASCII or 0, blank space etc, but dialog would always make it visible.
2. Exclude the item at all and finish on on/off but instead on/off takes place of item (not surprisingly if options are as follow --radiolist text height width list-height [ tag item status ])
3. Instead of letting the dialog on exit write to the output the name of the chosen locale I created an output statement myself.
I had red a lot about dialog and whiptail(http://linux.die.net/man/1/dialog, http://linuxcommand.org/lc3_adv_dialog.php) but always end up with having to add tag and an item. Would appreciate any suggestions and maybe some info if there is easily plug-gable dialog/whiptail compatible libs.
Thank You in advance
Perhaps you overlooked the --no-tags option (see manpage):
--no-tags
Some widgets (checklist, inputmenu, radiolist, menu) display a
list with two columns (a "tag" and "description"). The tag is
useful for scripting, but may not help the user. The --no-tags
option (from Xdialog) may be used to suppress the column of tags
from the display. Unlike the --no-items option, this does not
affect the data which is read from the script.
The question mentions whiptail and consistency, which could refer to consistency across dialog and whiptail. There is none, since
whiptail provides fewer options than dialog (inevitably, there will be differences, since there is no one-one mapping possible)
consistency as such between the two is done in dialog occasionally to help with compatibility (the reverse is not true).

Resources