× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



El Tue, 29 Nov 2016 15:13:37 -0600
Jon Sinder <thewoodshopguy@xxxxxxxxx> escribió:
Bryan, thanks for the response,

I don't see the exit program that I'm looking for I'm working in UIM
building a new menu Panel. I was looking for an example of the
CHKPGM("*LIBL/program") expression

Thanks

Jon


On Tue, Nov 29, 2016 at 11:19 AM, Bryan Dietz <bdietz400@xxxxxxxxx> wrote:

I found an example in Carsten's utility for Netserver:
http://iprodeveloper.com/print/rpg-programming/apis-example-
server-support-apis-providing-netserver-management-facilities

Looks like that code will get you started.

Bryan

ps. I do not think UIM is not "old school :-)




Jon Sinder wrote on 11/29/2016 11:44 AM:

I’m going old school today

Does anyone have an example an exit program that gets called with the
CHKPGM condition expression in a UIM menu.

I have executed several searches on the web but have been unsuccessful.

Any help would be appreciated

Thanks

Jon

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


Very old code. Hope it helps.

QPNLSRC.BUDGET This is the menu: (Only showing the relevant sections)

:PNLGRP ENBGUI=yes.
.* -----------------------------------------------------------------
.* Start of menu source
.* -----------------------------------------------------------------
.*
:COND NAME=admin
EXPR='chkpgm("BUDGETV")'.
...

.* .... This group of options is only visible if the user is an administrator:

:MENUGRP COND=admin.Administration

:MENUI OPTION=71
ACTION='cmd YR10CM'
HELP=genhlp.
Year and master files setup YR10CM
:MENUI OPTION=72
ACTION='cmd SE20CM'
HELP=genhlp.
User security SE20CM
... etc
:EMENUGRP.

.....
:EHELP.
.* -----------------------------------------------------------------
.* End of menu source
.* -----------------------------------------------------------------
:EPNLGRP.

QRPGLESRC.BUDGETV: This is the exit program that will set the condition either true or false. It is only a few lines.

H/TITLE
H DFTNAME(BUDGETV)
H ACTGRP(*CALLER) DFTACTGRP(*NO) BNDDIR('BUDGET')
H ALWNULL(*USRCTL)
* - -
/COPY QPRSRC,SECU
* - -
D USRNAM S 10 INZ(*USER)
* - -
D SLEVEL S 9B 0
D NADA1 S 8
D TYPCAL S 9B 0
D HANDLE S 8
D OBJNAM S 10
D LIBNAM S 10
D OBJTYP S 10
D HLPNAM S 32
D PNLNAM S 10
D CNDNAM S 10
D RTNCOD S 1
* - -
D SDS
D PGMNAM *PROC
* - -
C *ENTRY PLIST
C PARM TYPCAL
C PARM HANDLE
C PARM OBJNAM
C PARM LIBNAM
C PARM OBJTYP
C PARM HLPNAM
C PARM PNLNAM
C PARM CNDNAM
C PARM RTNCOD
* - -
C IF PNLNAM='BUDGET' and
C CNDNAM='ADMIN'
C EVAL RTNCOD=IsAdmin(USRNAM)
C ELSE
C EVAL RTNCOD=*OFF
C END
* - -
C SETON LR

QPRSRC.SECU: The prototype showing that the procedure returns a data type "N"
(like an RPG indicator [*ON or *OFF]).
...
* - - Returns *ON if USRID is an administrator
D IsAdmin PR N
D USRID 10 CONST
* - -
...



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.