Franz Karl
10-10-12, 10:06
Wie kann man auf der Iseries ein Benutzermenü anlegen - den APD gibt es wohl im OS Release V6R1M0
Möchte egtl. nur das ich ein Startmenü für die Anwendungen mir erstelle für die es noch keine PC-Clientsoftware gibt.
Z.B: STRPZW - Befehl um die Zeitwirtschaft zu starten als Menüpunkt
Danke für die Hilfe
tfroehlich
10-10-12, 11:28
Hallo,
über STRSDA und anschließend über Auswahl 2 kannst Du Dir ein As400-Menü erstellen.
Gruss
Thomas
Franz Karl
10-10-12, 12:14
Danke - probiere dann mal
Hallo,
hier eine kleine Hilfestellung, aber halt in Englisch.
Back to Basics: Designing iSeries Menus
by Kevin Vandever
The other day, a programmer told me he was using CL to write a menu that would allow his users to easily run some of their more common tasks. I asked him why he wasn't using screen design aid, or SDA, instead of writing CL. "Huh?" was all that he could muster. So that got me thinking, maybe there are others out there who aren't aware there is such a thing as SDA.
What's the Big Deal?
Hey, don't get me wrong. I have nothing against CL programming. CL is a very powerful language, and it comes in handy under many circumstances. But if you are using it to create menus for your users or IT staff, you're working too hard. And you won't even gain anything by that extra work, because by using SDA to design and create your menus, you will still produce very flexible, full-functioning, error-free menus. Pretty cool, huh?
Let's Get Started
From an iSeries command line, start SDA by typing the command STRSDA. You should see a display like the one in the following figure:
From this menu, select option 2, Design menus. You should then be presented with the Design Menus screen, asking you for a source file, a library, and a menu name. You can use any source file you like, but I usually use a source file called QMNUSRC.
After entering the appropriate information, press Enter to get to the Specify Menu Functions screen. On this screen, you will be allowed to select whether you want to work with the actual menu and commands and whether you want to work with menu help. For now, let's just work with the actual menu. I'm not going to cover help text in this article; however, feel free to play with it and see how it works.
Now you are ready to design your menu. You should see the semi-blank test menu screen. You have menu options 1 through 10 already positioned for you to enter text, but there is no text next to these options. Go ahead and type something. You can type text without any single quotation marks ( ' ) around it, but that will cause each word to be its own constant and may cause you problems later. What I like to do is to put single quotation marks around each option's description. Give it a try. A word of caution: Be careful when using the Delete and Insert keys. Doing so will mess up the positioning of your menu options and text. Those of you who are familiar with SDA because you use it with display files may already know what I'm talking about.
Now that you have some text next to your menu options, it's time to add some logic behind those options. There are two ways to do this. The first way is to press F10, which will give you a menu command entry screen. From here, you can simply type the command. If you place a question mark (?) in front of the SNDMSG command, next to option 10, this will prompt the command when the user selects that menu option. Notice that you aren't limited to the 10 menu options you started with. That was just a starting point. You can have up to 99 options, placed anywhere on the page, and in any order. My standard is to use option 99 to SIGNOFF. Oh, yeah, one more thing about this screen: By pressing F11, you will be left with only the menu options for which you've entered commands. This is an easy way to see what options have commands associated with them.
Now go back to the menu design screen by pressing Enter. The other way to enter a command is to press F13. This will present you with three lines at the bottom of your screen. The first line allows you to position to a specific menu option, and the second and third lines are for you to enter a command for that specific option. You can scroll through the menu options one at a time and place commands in the ones you want. The position-to option lets you get to a particular option quickly. It also works in conjunction with F10. For example, if you have a group of commands placed in menu options 81 through 90, you could position to position 81, then press F10, and the list on the next screen will start at menu option 81. Is this just getting cooler as we go, or what?
Now that we've designed a couple of menu options and placed commands behind those options, it's time to compile our menu. To do this, press Enter on your design screen. This will save all your changes. Next, press F3. If you press F3 before you've pressed Enter after making changes, you will be told that new data will be lost and that you can press F3 or F12 to continue to exit. Press Enter to get back to the screen, to ensure your changes are saved. Now you can press F3 again and return to the Specify Menu Functions screen. Here, you have the chance to go a back into your design or, if you leave both parameters 'N,' you will be given a compile screen.
The information on this screen is pretty basic. It asks you if you want to save the menu, where you want to save it, and whether or not you want to replace what's already there. It also asks if you want to create the menu objects. I almost always take the defaults to update my source and create my menu objects. There is one parameter that I sometimes like to change to 'Y' from its default of 'N.' That is the Prompt for Parameters parameter. Selecting a 'Y' on that parameter will present you with a screen where you can provide further information about the menu, such as whether or not to display function keys and what type of command line you want your menu to have. The options for the latter parameter are *LONG, *SHORT, or *NONE. This parameter will help you control what the users can do from their menu, other than select menu options.
Press Enter on this screen, and your menu should get saved and compiled cleanly the first time--something our CL programs don't always do. Now you will be back at the design menu screen. Press F3 to get back to a command line, and test your menu out by using the GO command followed by the menu name.
CL, SCHML
Not bad, huh? You can see how easy it is to create consistent, full-featured menus without writing one line of CL code. Be careful, though. You can overdo it. I've seen folks go crazy and create menus for everything. Next thing you know, your users are entering menu options just get to more menu options where they can decide which menu to go to. If you can control the urge to go crazy, you can go along way toward turning out happier and more productive users, and isn't that what we all want?