sowie IBM in OS/400 mit UIM:
Liebe System i Freunde,
hier eine weitere Ausgabe unseres neuen Projekts speziell für System i Entwickler.
Auch im Kapitel 3 gilt wie immer: „Klein und mit wenig Aufwand große Effekte erzielen.“
V6R1 oder V7R1 sind dazu nicht notwendig, da diese Funktionen schon seit Langem möglich sind.
Vielen Dank auch für Ihr fachliches und nützliches Feedback. Ich freue mich besonders, dass viele Kollegen diese interessanten, seit Langem vorhandenen Möglichkeiten so gut gebrauchen können.
System i Menüs erstellen ohne SDA sowie IBM in OS/400 mit UIM:
Im nachfolgenden Beispiel wird gezeigt, wie solche „IBM like“ Menüs mit vielen automatischen Funktionen ebenso wie auch blätterfähig erstellt werden können.
Aufruf des Menüs mit „GO WS_UIM_TT“:
(Illu in PDF)
Alle BLAUEN Angaben sind feste Werte, die Teil des Schlüsselwortes sind oder zur Steuerung gehören. Alle ROTEN Angaben sind variable Werte und müssen auf die einzelnen Bedürfnisse angepasst werden.
Hierfür sollten Sie die PDF aufrufen!
Hier die UIM-Quelle Teil 1 (Menü-Steuerung) vom Menü: WS_UIM_TT UIM ist die von IBM verwendete Sprache um alle Anzeigen, Menüs, Bedienerhilfen und viele Ausdrucke zu steuern. Durch kurze Defi nition können ganze Funktionen automatisch zur Verfügung gestellt werden. Einige aktivieren sich sogar bei Bedarf. Zum leichteren Verständnis habe ich die Defi nitionen gruppiert um die Zusammengehörigkeit besser darzustellen. UIM ist ähnlich aufgebaut wie HTML. Man braucht nur eine UIM-Quelle zu erstellen und beim Kompilieren werden Aussehen und Steuerungen des Menüs automatisch generiert.
**************************** Datenanfang **************************** 0001.00 .************************************************** 0002.00 .* UIM – Beispiel - Menü * 0003.00 .************************************************** 0004.00 .* 0005.00 .* Enable access to OS/400 index search when help is displayed for 0006.00 .* this menu. 0007.00 .* --------------------------------------------- 0008.00 :PNLGRP SCHIDX=qhss1 0009.00 DFTMSGF=‘qcpfmsg‘. 0010.00 .* 0011.00 .* --------------------------------------------- 0012.00 .* Copyright statement appears when the menu is initially displayed. 0013.00 .* --------------------------------------------- 0014.00 :COPYR. 0015.00 SSS/OSI Software Lab. 2012. 0016.00 .* 0017.00 .* --------------------------------------------- 0018.00 .* UIM Z-variable to be used as the panel identifi er 0019.00 .* --------------------------------------------- 0020.00 :VAR NAME=ZMENU. 0021.00 .* 0022.00 .* --------------------------------------------- 0023.00 .* Declare conditions 0024.00 .* --------------------------------------------- 0025.00 .* 0026.00 .* --------------------------------------------- 0027.00 .* Defi ne keys for the menu 0028.00 .* --------------------------------------------- 0029.00 :KEYL NAME=menukeys 0030.00 HELP=keyl. 0031.00 :KEYI KEY=F1 0032.00 ACTION=HELP 0033.00 HELP=helpf1. 0034.00 :KEYI KEY=F3 0035.00 ACTION=‘EXIT SET‘ 0036.00 VARUPD=NO 0037.00 HELP=exit. 0038.00 F3=Verlassen 0039.00 :KEYI KEY=F4 0040.00 ACTION=PROMPT 0041.00 HELP=prompt. 0042.00 F4=Bedienerführung 0043.00 :KEYI KEY=F9 0044.00 ACTION=RETRIEVE 0045.00 HELP=retrieve. 0046.00 F9=Auff inden 0047.00 :KEYI KEY=F12 0048.00 ACTION=‘CANCEL SET‘ 0049.00 VARUPD=NO 0050.00 HELP=cancel. 0051.00 F12=Abbrechen 0052.00 :KEYI KEY=F24 0053.00 ACTION=MOREKEYS 0054.00 HELP=morekeys. 0055.00 F24=Weitere Tasten 0056.00 :KEYI KEY=ENTER 0057.00 ACTION=ENTER 0058.00 HELP=enter. 0059.00 :KEYI KEY=HELP 0060.00 ACTION=HELP 0061.00 HELP=help. 0062.00 :KEYI KEY=HOME 0063.00 ACTION=HOME 0064.00 HELP=home. 0065.00 :KEYI KEY=PAGEDOWN 0066.00 ACTION=PAGEDOWN 0067.00 HELP=pagedown. 0068.00 :KEYI KEY=PAGEUP 0069.00 ACTION=PAGEUP 0070.00 HELP=pageup. 0071.00 :KEYI KEY=PRINT 0072.00 ACTION=PRINT 0073.00 HELP=print. 0074.00 :EKEYL. 0075.00 .* 0076.00 .* --------------------------------------------- 0077.00 .* Defi ne Example Menu panel 0078.00 .* --------------------------------------------- 0079.00 :PANEL NAME=menupnl 0080.00 KEYL=menukeys 0081.00 ENTER=‘MSG CPD9817 QCPFMSG‘ 0082.00 PANELID=ZMENU 0083.00 TOPSEP=SYSNAM 0084.00 HELP=‘menu/help‘. 0085.00 Objekt basierend entwickeln wie IBM 0086.00 .* 0087.00 .* ------------------------------------- 0088.00 .* Defi ne the menu area 0089.00 .* ------------------------------------- 0090.00 :MENU DEPTH=‘*‘ 0091.00 SCROLL=NO 0092.00 BOTSEP=SPACE. 0093.00 :TOPINST.Auswahlmöglichkeiten: 0094.00 .* 0095.00 .* ------------------------------------- 0096.00 .* Specify the action to be taken for each option 0097.00 .* ------------------------------------- 0098.00 .* 0099.00 :MENUGRP. Objekt basierend entwickeln mit RPG, RPIs & UIM 0100.00 :MENUI OPTION=1 0101.00 ACTION=‘CMD strsldshw book(COMMON) chapter(OBSE_2003)‘ 0102.00 HELP=‘menu/option1‘. 0103.00 SlideShow - Präsentation 0104.00 .* 0105.00 :MENUI OPTION=2 0106.00 ACTION=‘CMD call MA_KND_F‘ 0107.00 HELP=‘menu/option1‘. 0108.00 WRK ... Pgm ausführen 0109.00 .* 0110.00 :MENUI OPTION=10 0111.00 ACTION=‘CMD wrkobjpdm Augel_TT ma*‘ 0112.00 HELP=‘menu/option1‘. 0113.00 MA* Objekte aus Bibliothek Augel_TT anzeigen 0114.00 :EMENUGRP. 0115.00 .* 0116.00 :MENUGRP. 0117.00 :EMENUGRP. 0118.00 .* 0119.00 :MENUGRP. 0120.00 :EMENUGRP. 0121.00 .* 0122.00 .* 0123.00 :MENUGRP. Popup-Window mit Select-Bar 0124.00 :MENUI OPTION=20 0125.00 ACTION=‘CMD call ddschoice‘ 0126.00 HELP=‘menu/option1‘. 0127.00 Choice-Window Beispiel 0128.00 .* 0129.00 :MENUI OPTION=21 0130.00 ACTION=‘CMD strseu augel_tt/source ddschoiced option(5)‘ 0131.00 HELP=‘menu/option1‘. 0132.00 Choice -DDS- Source anzeigen 0133.00 .* 0134.00 :MENUI OPTION=22 0135.00 ACTION=‘CMD strseu augel_tt/source ddschoice option(5)‘ 0136.00 HELP=‘menu/option1‘. 0137.00 Choice -PGM- Source anzeigen 0138.00 :EMENUGRP. 0139.00 .* 0140.00 :EMENU. 0141.00 .* 0142.00 .* ------------------------------------- 0143.00 .* Use a command line and allow commands and option numbers 0144.00 .* ------------------------------------- 0145.00 :CMDLINE SIZE=LONG. 0146.00 Auswahl oder Befehl 0147.00 .* 0148.00 :EPANEL. 0149.00 .* 0150.00 .*
Hier die UIM-Quelle Teil 2 (Bedienerhilfe Steuerung)
vom Menü: WS_UIM_TT
Mit diesen Angaben kann dem Menü eine cursorsensitive
Bedienerhilfe hinzugefügt werden. Diese ist optional
und ist nicht notwendig um ein Menü zu erstellen.
Auch hier sollte die Struktur leicht zu erkennen sein.
0151.00 .* --------------------------------------------- 0152.00 .* Defi ne help modules for the menu panel 0153.00 .* --------------------------------------------- 0154.00 :HELP NAME=keyl. 0155.00 Function Keys - Help 0156.00 :XH3.Function keys 0157.00 :EHELP. 0158.00 .* 0159.00 :HELP NAME=helpf1. 0160.00 :PARML. 0161.00 :PT.F1=Help 0162.00 :PD. 0163.00 Provides additional information about using the display or a 0164.00 specifi c fi eld on the display. 0165.00 :EPARML. 0166.00 :EHELP. 0167.00 .* 0168.00 :HELP NAME=exit. 0169.00 :PARML. 0170.00 :PT.F3=Exit 0171.00 :PD. 0172.00 Ends the current task and returns to the display from which the 0173.00 task was started. 0174.00 :EPARML. 0175.00 :EHELP. 0176.00 .* 0177.00 :HELP NAME=prompt. 0178.00 :PARML. 0179.00 :PT.F4=Prompt 0180.00 :PD. 0181.00 Provides assistance in entering or selecting a command. 0182.00 :EPARML. 0183.00 :EHELP. 0184.00 .* 0185.00 :HELP NAME=retrieve. 0186.00 :PARML. 0187.00 :PT.F9=Retrieve 0188.00 :PD. 0189.00 Displays the last command you entered on the command line and 0190.00 any parameters you included. Pressing this key once, shows the 0191.00 last command you ran. Pressing this key twice, shows the 0192.00 command you ran before that and so on. 0193.00 :EPARML. 0194.00 :EHELP. 0195.00 .* 0196.00 :HELP NAME=cancel. 0197.00 :PARML. 0198.00 :PT.F12=Cancel 0199.00 :PD. 0200.00 Returns to the previous menu or display. 0201.00 :EPARML. 0202.00 :EHELP. 0203.00 .* 0204.00 :HELP NAME=morekeys. 0205.00 :PARML. 0206.00 :PT.F24=More keys 0207.00 :PD. 0208.00 Shows additional function keys. 0209.00 :EPARML. 0210.00 :EHELP. 0211.00 .* 0212.00 :HELP NAME=enter. 0213.00 :PARML. 0214.00 :PT.Enter 0215.00 :PD. 0216.00 Submits information on the display for processing. 0217.00 :EPARML. 0218.00 :EHELP. 0219.00 .* 0220.00 :HELP NAME=help. 0221.00 :PARML. 0222.00 :PT.Help 0223.00 :PD. 0224.00 Provides additional information about using the display. 0225.00 :EPARML. 0226.00 :EHELP. 0227.00 .* 0228.00 :HELP NAME=home. 0229.00 :PARML. 0230.00 :PT.Home 0231.00 :PD. 0232.00 Goes to the menu that was shown after you signed on the system. 0233.00 This menu is either the initial menu defi ned in your user 0234.00 profi le or the menu you requested from the Sign-On display. 0235.00 :EPARML. 0236.00 :EHELP. 0237.00 .* 0238.00 :HELP NAME=pagedown. 0239.00 :PARML. 0240.00 :PT.Page Down (Roll Up) 0241.00 :PD. 0242.00 Moves forward to show additional information for this display. 0243.00 :EPARML. 0244.00 :EHELP. 0245.00 .* 0246.00 :HELP NAME=pageup. 0247.00 :PARML. 0248.00 :PT.Page Up (Roll Down) 0249.00 :PD. 0250.00 Moves backward to show additional information for this display. 0251.00 :EPARML. 0252.00 :EHELP. 0253.00 .* 0254.00 :HELP NAME=print. 0255.00 :PARML. 0256.00 :PT.Print 0257.00 :PD. 0258.00 Prints information currently shown on the display. 0259.00 :EPARML. 0260.00 :EHELP. 0261.00 .* 0262.00 :HELP NAME=‘menu/help‘. 0263.00 Example Menu - Help 0264.00 :P. 0265.00 The Example Menu shows an example of a menu created using the UIM. 0266.00 :XH3. 0267.00 How to Use a Menu 0268.00 :P. 0269.00 To select a menu option, type the option number and press Enter. 0270.00 :P. 0271.00 To run a command, type the command and press Enter. For assistance 0272.00 in selecting a command, press F4 (Prompt) without typing anything. 0273.00 For assistance in entering a command, type the command and press F4 0274.00 (Prompt). To see a previous command you entered, press F9 0275.00 (Retrieve). 0276.00 :P. 0277.00 To go to another menu, use the Go to Menu (GO) command. Type GO 0278.00 followed by the menu ID, then press the Enter key. For example, to 0279.00 go to the User Tasks (USER) menu, type GO USER and press the Enter 0280.00 key. The menu ID is shown in the upper left corner of the menu. 0281.00 For assistance in entering the GO command, type GO and press F4 0282.00 (Prompt). If you do not know the entire menu name you can use a 0283.00 generic name. For example, GO US* will show a list of all menus 0284.00 that start with US. 0285.00 :EHELP. 0286.00 .* ************************************************ 0287.00 .* 0288.00 .* ************************************************ 0289.00 :HELP NAME=‘menu/option1‘. 0290.00 Option - Help 0291.00 :XH3.Option - Help 0292.00 :P. 0293.00 Dies ist eine allgemeine Bedienerhilfe. 0294.00 :EHELP. 0295.00 .* ************************************************ 0296.00 .* 0297.00 .* 0298.00 .* --------------------------------------------- 0299.00 .* End of menu source 0300.00 .* --------------------------------------------- 0301.00 :EPNLGRP. **************************** Datenende ******************************
UIM kann Ihnen viel Arbeit ersparen, was DDS an einigen Stellen nicht bietet. Am Besten ist es, wenn DDS und UIM zusammen eingesetzt werden, jeweils dort, wo die Stärken und Möglichkeiten der jeweiligen Sprache liegen.
Ich selbst setze UIM schon seit über 20 Jahren erfolgreich ein und habe auch schon eine Menge Schulungen darüber gegeben. Zu dem Thema „UIM ist doch alt“, kann ich nur sagen, dass man 1988 schon gesagt hat: „RPG ist tot“. Also nicht gleich UIM beerdigen, ohne dessen Möglichkeiten mal getestet zu haben.
Nicht vergessen, Ihr Feedback ist wichtig! Senden Sie eine E-Mail, wie Ihnen die „Tipps & Tricks“ gefallen, was Sie verbessern würden, oder eigene Tipps aus Ihrer Trickkiste, einfach an: Augel@SSS-Software.de


