如何撰寫類似 AS/400 的(Help key F1)畫面說明,並用於一般,應用系統中 ?
1. PF : CUSTPF
*==============================================================*
* Sample Customer File (Partial) *
*==============================================================*
*
A UNIQUE
A R CUSTPR TEXT('Customer Record')
*
A CUSTNO 7P 0 COLHDG('Customer' 'Number')
A TEXT('Customer number')
A CNAME 30A COLHDG('Customer name')
A TEXT('Customer name')
A CSTRT 30A COLHDG('Street address')
A TEXT('Street address')
A CCITY 20A COLHDG('City')
A TEXT('City')
A CSTATE 2A COLHDG('State')
A TEXT('State')
A CZIP 9A COLHDG('Zip code')
A TEXT('Zip code')
A CCONT 30A COLHDG('Customer contact')
A TEXT('Customer contact')
A CCTITL 30A COLHDG('Contact title')
A TEXT('Contact title')
A CPHONE 10P 0 COLHDG('Contact' 'Phone' 'Number')
A TEXT('Contact phone number')
A NOTES1 40A COLHDG('Notes 1')
A TEXT('Notes 1')
A NOTES2 40A COLHDG('Notes 2')
A TEXT('Notes 2')
A CLORDT 6S 0 COLHDG('Last order date')
A TEXT('Last order date')
A CBALNC 11P 2 COLHDG('Current' 'Balance')
A TEXT('Current balance')
A EDTCDE(J)
A CCRFLG 1A COLHDG('Good Credit Y/N?')
A TEXT('Credit Flag')
A VALUES('Y' 'N')
*
A K CUSTNO
2. PNLGRP: CUSTPG
:PNLGRP.
.*The following is the global help panel (extended help)
:HELP name=GLOBALHLP.Customer File Maintenance - Help
:P.This panel is used to maintain customer records
:EHELP.
.* The remaining panels are context sensitive panels (contextual help).
:HELP name=NUMBER.Customer Number - Help
:xh3.Customer Number field (CUNUMB)
:P.Use this field to enter the customer number you would like to maintain.
:EHELP.
.*________________________________________________________
:HELP name=NAME.Customer Name - Help:xh3.Customer Name field (CUNAME)
:P.Use this field to enter the customer name.
:EHELP.
.*________________________________________________________
:HELP name=ADDRESS.Customer Address - Help
:xh3.Customer Address field (CUADRS):P.Use this field to enter the
customer street address or Post Office box.
:EHELP.
.*________________________________________________________
:HELP name=CITY.Customer City - Help
:xh3.Customer City field (CUCITY)
:P.Use this field to enter the customer city.
:EHELP.
.*________________________________________________________
:HELP name=STATE.Customer State Code - Help
:xh3.Customer State Code field (CSTATE)
:P.Use this field to enter the customer code.
:EHELP.
.*________________________________________________________
:HELP name=ZIP.Customer Zip Code - Help
:xh3.Customer Zip Code field (CUZIP)
:P.Use this field to enter the customer zip code.
:EHELP.
.*________________________________________________________
:EPNLGRP.
3. DSPF: UIMHELP
A DSPSIZ(24 80 *DS3)
A CA03(03)
A CA12(03)
A HELP
A ALTHELP(CA01)
A HLPTITLE('Customer File -
A Maintenance - Help')
A HLPPNLGRP(GLOBALHLP CUSTPG)
A R MAINFMT
A H HLPARA(*FLD CUNUMB)
A HLPPNLGRP(NUMBER CUSTPG)
A H HLPARA(*FLD CUNAME)
A HLPPNLGRP(NAME CUSTPG)
A H HLPARA(*FLD CUADRS)
A HLPPNLGRP(ADDRESS CUSTPG)
A H HLPARA(*FLD CUCITY)
A HLPPNLGRP(CITY CUSTPG)
A H HLPARA(*FLD CUSTE)
A HLPPNLGRP(STATE CUSTPG)
A H HLPARA(*FLD CUZIP)
A HLPPNLGRP(ZIP CUSTPG)
A 2 28'Customer File Maintenance'
A 4 2'Customer Number . .'
A CUNUMB 5 I 4 23
A 6 2'Name . . . . . . .'
A CUNAME R B 6 23REFFLD(CUSTPR/CNAME *LIBL/CUSTPF)
A 7 2'Address . . . . .'
A CUADRS R B 7 23REFFLD(CUSTPR/CSTRT *LIBL/CUSTPF)
A 8 2'City . . . . . . .'
A CUCITY R B 8 23REFFLD(CUSTPR/CCITY *LIBL/CUSTPF)
A 9 2'State . . . . . .'
A CUSTE R B 9 23REFFLD(CUSTPR/CSTATE *LIBL/CUSTPF)
A 10 2'Zip . . . . . . .'
A CUZIP R D B 10 23REFFLD(CUSTPR/CZIP *LIBL/CUSTPF)
A 23 2'F3=Exit'
測試方法:CRTPNLGRP CUSTPG
CRTPF CUSTPF
CRTDSPF UIMHELP
STRSDA 選 option 3 Test Display file
A blog about IBM i (AS/400), MQ and other things developers or Admins need to know.
星期二, 10月 31, 2023
2000-03-27 如何撰寫類似 AS/400 的(Help key F1)畫面說明,並用於一般,應用系統中 ?
2000-03-08 如何在 AS/400 製作 UIM Menu?
如何在 AS/400 製作 UIM Menu?
AS/400 Menu 有用 DDS 格式指令撰寫, 有用 STRSDA 工具撰寫或利用
UIM 語法撰寫, AS/400 系統畫面均是 UIM Menu, 以上三種都要經過編譯才
能使用。在此提供一個 Sample 給大家參考.
.* ********************************************************************
.*
.* Menu - UIMMENU - UIM sample menu
.*
.* CRTMNU MENU(UIMMENU) TYPE(*UIM) SRCFILE(QPNLSRC) SRCMBR(UIMMENU)
.* ********************************************************************
:PNLGRP.
:COPYR.(C) Copyright 2000, VC Development.
.* --------------------------------------------------------------------
.*
.* Declare variables
.*
:VAR NAME=zlmtcpb.
:VAR NAME=zmenu.
.* --------------------------------------------------------------------
.*
.* Declare conditions
.*
:COND NAME=secofr EXPR='chkusrcls("*SECOFR")'.
:COND NAME=notsecofr EXPR='*NOT(chkusrcls("*SECOFR"))'.
:COND NAME=cmdlineok EXPR='*NOT(zlmtcpb="*YES")'.
.* --------------------------------------------------------------------
.*
.* Declare menu keys
.*
:KEYL NAME=menukeys HELP=keylist.
:KEYI KEY=F1 ACTION=help HELP=f1help.
:KEYI KEY=F3 ACTION='exit set' HELP=f3exit.F3=Exit
:KEYI KEY=F9 ACTION=cmdline COND=cmdlineok
HELP=f9command.F9=Command line
:KEYI KEY=F12 ACTION='cancel set' HELP=f12cancel.F12=Cancel
:KEYI KEY=HELP ACTION=help HELP=empty.
:KEYI KEY=ENTER ACTION=enter HELP=empty.
:EKEYL.
.* --------------------------------------------------------------------
.*
.* Describe menu
.*
:PANEL NAME=uimmenu HELP=menuhelp KEYL=menukeys
PANELID=zmenu ENTER='MSG CPD9818 QCPFMSG'
TOPSEP=sysnam.UIM Menu Samples
:MENU DEPTH='*' BOTSEP=space SCROLL=no.
:TOPINST.Select one of the following:
.* --------------------------------------------------------------------
.*
.* Describe menu options
.*
.* 1. Work with spooled files -----------------------------------------
:MENUI OPTION=1 ACTION='CMD wrksplf'
HELP=wrksplf.Work with spooled files
.* 2. Work with submitted jobs ----------------------------------------
:MENUI OPTION=2 ACTION='CMD wrksbmjob'
HELP=wrksbmjob.Work with submitted jobs
.* 3. Display messages ------------------------------------------------
:MENUI OPTION=3 ACTION='CMD dspmsg'
HELP=DSPMSG.Display messages
.* 4. Display system operator messages --------------------------------
:MENUI OPTION=4 ACTION='CMD dspmsg qsysopr'
HELP='dspmsg/qsysopr'.Display system operator messages
.* 5. Work with user profiles/Change your password --------------------
:MENUI OPTION=5 COND=secofr ACTION='CMD wrkusrprf *all'
HELP='wrkusrprf/all'.Work with user profiles
:MENUI OPTION=5 COND=notsecofr ACTION='CMD chgpwd'
HELP='chgpwd'.Change your password
.* 90. Sign off -------------------------------------------------------
:MENUI OPTION=90 ACTION='CMD signoff'
HELP=signoff.Sign off
.* --------------------------------------------------------------------
.*
.* End menu description
.*
:EMENU.
:OPTLINE.Selection
:EPANEL.
.* --------------------------------------------------------------------
.*
.* Help panels
.*
.* Function keys ------------------------------------------------------
:HELP NAME=keylist.Function Keys - Help
:XH3.Function keys
:EHELP.
.* F1=Help ------------------------------------------------------------
:HELP NAME=f1help.
:PARML.
:PT.F1=Help
:PD.Provides additional information about using the display
or a specific field on the display.
Pressing the Help key also invokes the help function.
To see help for a specific menu option, type the menu option, then
press F1 or Help.
:EPARML.
:EHELP.
.* F3=Exit ------------------------------------------------------------
:HELP NAME=f3exit.
:PARML.
:PT.F3=Exit
:PD.Ends the current task and returns to the display from which the
task was started.
:EPARML.
:EHELP.
.* F9=Command line ----------------------------------------------------
:HELP NAME=f9command.
:PARML.
:PT.F9=Command line
:PD.Displays a windowed command line which you can use to enter AS/400
system commands.
:EPARML.
:EHELP.
.* F12=Cancel ---------------------------------------------------------
:HELP NAME=f12cancel.
:PARML.
:PT.F12=Cancel
:PD.Returns to the previous menu or display.
:EPARML.
:EHELP.
.* Empty help ---------------------------------------------------------
:HELP NAME=empty.
:EHELP.
.* General help -------------------------------------------------------
:HELP NAME=menuhelp.N3X Menu - Help
:P.The N3X menu allows you to do a number of personalized tasks.
:EHELP.
.* 1. Work with spooled files -----------------------------------------
:HELP NAME=wrksplf.Work with spooled files - Help
:XH3.Option 1. Work with spooled files
:P.Select this option to display a list of all your spooled files.
You can choose to change, hold, delete, display, or release any or all
of the entries that are displayed.
:EHELP.
.* 2. Work with submitted jobs ----------------------------------------
:HELP NAME=wrksbmjob.Work with submitted jobs - Help
:XH3.Option 2. Work with submitted jobs
:P.Select this option to display a list of all your submitted jobs.
You can choose to change, hold, end, work with, or release any or all
of the entries that are displayed.
You can also display messages for the jobs on the list or work with
spooled files for the jobs on the list.
:EHELP.
.* 3. Display messages ------------------------------------------------
:HELP NAME=dspmsg.Display messages - Help
:XH3.Option 3. Display messages
:P.Select this option to display messages received at your workstation
message queue and/or your user profile message queue.
:EHELP.
.* 4. Display system operator messages --------------------------------
:HELP NAME='dspmsg/qsysopr'.Display system operator messages - Help
:XH3.Option 4. Display system operator messages
:P.Select this option to display messages received at the QSYSOPR
message queue.
:EHELP.
.* 5. Work with user profiles -----------------------------------------
:HELP NAME='wrkusrprf/all'.Work with user profiles - Help
:XH3.Option 5. Work with user profiles
:P.Select this option to display a list of all user profiles on your
computer.
You can choose to create a new profile, as well as to change, copy,
delete, display, or work with objects owned by any or all of the
profiles that are displayed.
:EHELP.
.* 5. Change your password --------------------------------------------
:HELP NAME='chgpwd'.Change your password - Help
:XH3.Option 5. Change your password
:P.Select this option to change your password.
:EHELP.
.* 90. Sign off -------------------------------------------------------
:HELP NAME=signoff.Sign off - Help
:XH3.Option 90. Sign off
:P.Select this option to end your interactive job.
:EHELP.
:EPNLGRP.
若欲更深入 UIM 語法撰寫請見
Application Display Programming V6R1--SC41-5715-02
Chapter 16. Introduction to the User Interface Manager
訂閱:
文章 (Atom)