... and add 'PROC 0 DEBUG' at the start of the Clist and also add member
ZCOMMAN0 to your ISPPLIB:

/*-------------------------------------------------------------------*/
/* PANEL ZCOMMAN0 USED WITH CLIST ZCOMMAND                           */
/*                                                                   */
/*-------------------------------------------------------------------*/
 )ATTR
  ¢ TYPE(TEXT) INTENS(LOW)    SKIP(ON)            COLOR(BLUE)
  ! TYPE(TEXT) INTENS(HIGH)   SKIP(ON)            COLOR(RED)
  @ TYPE(TEXT) INTENS(HIGH)   SKIP(ON)            COLOR(YELLOW)
  _ TYPE(INPUT) INTENS(LOW)   CAPS(OFF)           COLOR(GREEN)
  | TYPE(INPUT) INTENS(HIGH)
)BODY EXPAND(//)
===>|ZCMD
 &ZTIME
@
@------------------- Add a new TSO Command -/-/-
@
¢Command mnemonic:_Z         ¢
¢Minimum length .:_Z¢
¢Description ....:_Z                                                   ¢
¢Command action .:_Z                                                   ¢
¢
¢
¢Overwrite the above definitions to create a new command.
¢
¢Hit the!<END>¢PFKey to add the new command.
¢
)INIT
  .ZVARS = '(ZCTVERB,ZCTTRUNC,ZCTDESC,ZCTACT)'
  &ZTDMARK = &MESSAGE              /* ALLOW USING VARIABLE MESSAGES */
)PROC
  &ZTRAIL = .TRAIL
  IF (.RESP=END)
    &RESP = QUIT
  &PFNUM = PFK(DOWN)
  IF (.PFKEY=&PFNUM)
    &ZCMD = DOWN
  &PFNUM = PFK(UP)
  IF (.PFKEY=&PFNUM)
    &ZCMD = UP
)END


On 03/12/2016 02:20, CM Poncelet wrote:
> A bit late in the day (some email authorization problems when I tried to
> post this), but the following would allow you to add ('A'), delete ('D')
> and edit ('S') TSO commands in your MACCMDS table. You would need also
> to add panel ZCOMMAND (shown further below) to your ISPPLIB concat for
> this to work.
> 
> BTW Bypass label 'COPYBACK:' if you do not want to overwrite your
> original MACCMDS.
> 
> Ignore the 'ZA' command at label 'EXECUTE_ZCOMMAND:' - it's my thing.
> 
> But try this Clist, after adjusting it to suit your own environment.
> 
> /*-------------------------------------------------------------------*/
> /* CLIST ZCOMMAND TO ADD/DISPLAY ENTRIES IN THE CMD TABLE            */
> /*                                                                   */
> /* 1996/07/19 CMP                                                    */
> /*-------------------------------------------------------------------*/
> CONTROL: +
>   CONTROL MAIN END(ENDO)
>   IF &DEBUG = DEBUG | &DEBUG = D THEN +
>     CONTROL LIST SYMLIST CONLIST MSG
>   ELSE +
>     CONTROL NOLIST NOSYMLIST NOCONLIST NOMSG
> 
> INITS: +
>   FREE FI(SYSIN)
>   FREE FI(SYSPRINT)
>   SET TABLEDSN = &SYSUID..ISPTLIB
>   SET TEMPTDSN = &SYSUID..TABLEST
> 
> COPYTO: +
>   ALLOC FI(SYSUT1) DA('&TABLEDSN(MACCMDS)') SHR KEEP
>   ALLOC FI(SYSUT2) DA('&TEMPTDSN(MACCOPY)') +
>     NEW CATALOG SPACE(15,15) RECFM(F B) TRACKS DIR(1) +
>     BLKSIZE(11440) LRECL(80)
>   ALLOC FI(SYSPRINT) SYSOUT(*)
>   ALLOC FI(SYSIN)    DUMMY
>   ISPEXEC SELECT PGM(IEBGENER)
>   FREE FI(SYSIN)
>   FREE FI(SYSPRINT)
>   FREE FI(SYSUT1)
>   FREE FI(SYSUT2)
> 
> PROCESS_DI: +
>   SET MATABLE = '&TEMPTDSN'
>   /* TABLE OUTPUT LIBRARY CHAIN */
>   ISPEXEC LIBDEF MATABLE DATASET ID(&MATABLE)
> 
>   ISPEXEC TBSTATS MACCOPY STATUS1(STATUS1) STATUS2(STATUS2)
>   IF &STATUS2 ¬= 1 THEN +
>     ISPEXEC TBCLOSE MACCOPY LIBRARY(MATABLE)
>   IF &STATUS1  = 1 +
>   OR &STATUS1  = 2 THEN +
>     ISPEXEC TBOPEN  MACCOPY WRITE LIBRARY(MATABLE)
> 
> WHILE_NOT_QUIT: +
>   DO WHILE &RESP ¬= QUIT
>     ISPEXEC ADDPOP
>     ISPEXEC TBDISPL MACCOPY PANEL(ZCOMMAND)
>     ISPEXEC REMPOP
> 
> SELECT_S: +
>     SELECT (&S)
>       WHEN (D) +
> DELETE_ZCOMMAND: +
>         DO
>         ISPEXEC TBDELETE MACCOPY
>         SET S =
>         ENDO DELETE_ZCOMMAND
>       WHEN (A) +
> ADD_ZCOMMAND: +
>         DO
>         DO WHILE &RESP ¬= QUIT
>           ISPEXEC DISPLAY PANEL(ZCOMMAN0)
>           ENDO
>         SET RESP =
>         SET S =
>         ISPEXEC TBADD MACCOPY MULT(10)
>         ENDO ADD_ZCOMMAND
>       WHEN (S) +
> EXECUTE_ZCOMMAND: +
>         DO
>         /* NOTE: WE AVOID INVOKING %ZCOMMAND RECURSIVELY VIA 'ZA' */
>         IF &ZCTVERB ¬= ZA THEN +
>           ISPEXEC &ZCTACT
>         SET S =
>         ENDO EXECUTE_ZCOMMAND
>       OTHERWISE +
> HOLD_POSITION: +
>         DO
>         SET S =
>         ISPEXEC TBSKIP MACCOPY ROW(&ZTDTOP) NOREAD
>         ENDO HOLD_POSITION
> 
>       ENDO SELECT_S
>     ENDO WHILE_NOT_QUIT
> 
>   ISPEXEC TBSAVE MACCOPY LIBRARY(MATABLE)
>   ISPEXEC TBEND  MACCOPY
> 
> COPYBACK: +
>   ALLOC FI(SYSUT1) DA('&TEMPTDSN(MACCOPY)') SHR KEEP
>   ALLOC FI(SYSUT2) DA('&TABLEDSN(MACCMDS)') SHR KEEP
>   ALLOC FI(SYSPRINT) SYSOUT(*)
>   ALLOC FI(SYSIN)    DUMMY
>   ISPEXEC SELECT PGM(IEBGENER)
>   FREE FI(SYSIN)
>   FREE FI(SYSPRINT)
>   FREE FI(SYSUT1)
>   FREE FI(SYSUT2)
> 
>   ISPEXEC LIBDEF MATABLE
> 
>   ALLOC FI(SCRATCH0) DA('&TEMPTDSN') OLD DELETE
>   ALLOC FI(SCRATCH1) DA('&TEMPTDSN') OLD UNCATALOG
>   FREE  FI(SCRATCH0,SCRATCH1)
> 
> EXIT: +
>   EXIT CODE(0)
> 
> 
> /*-------------------------------------------------------------------*/
> /* PANEL ZCOMMAND USED WITH CLIST ZCOMMAND                           */
> /*                                                                   */
> /*-------------------------------------------------------------------*/
> )ATTR
>   ¢ TYPE(TEXT) INTENS(LOW)    SKIP(ON)            COLOR(BLUE)
>   ! TYPE(TEXT) INTENS(HIGH)   SKIP(ON)            COLOR(RED)
>   @ TYPE(TEXT) INTENS(HIGH)   SKIP(ON)            COLOR(YELLOW)
>   _ TYPE(INPUT) INTENS(LOW)   CAPS(OFF)           COLOR(GREEN)
>   | TYPE(INPUT) INTENS(HIGH)
> )BODY EXPAND(//)
> ===>|ZCMD
>  &ZTIME
> @
> @------------------- Z Commands -/-/-
> @
> !?¢Command  ¢T¢Comment
> ¢   ¢Action
> ¢
> )MODEL
> |S|Z        _Z_Z
> ¢   |Z
> )INIT
>   .ZVARS = '(ZCTVERB,ZCTTRUNC,ZCTDESC,ZCTACT)'
>   &ZTDMARK = &MESSAGE              /* ALLOW USING VARIABLE MESSAGES */
>   &ZSCROLLD = CSR                  /* TABLE SCROLL SET TO CSR */
>   &ZTDMARK = '*------------- That''s all, folks ----------------------*'
> )PROC
>   &ZTRAIL = .TRAIL
>   IF (.RESP=END)
>     &RESP = QUIT
>   &PFNUM = PFK(DOWN)
>   IF (.PFKEY=&PFNUM)
>     &ZCMD = DOWN
>   &PFNUM = PFK(UP)
>   IF (.PFKEY=&PFNUM)
>     &ZCMD = UP
> )END
> 
> 
> On 29/11/2016 15:17, Brenton, Ren wrote:
>> We have a COMMAND TABLE (MADCMDS), with entries like this:
>>
>>          Verb       T     Action                       
>>       IPTOOLS   0  SELECT CMD(%AAA &ZPARM) 
>>       IPLIST        0  SELECT CMD(%BBBBBB &ZPARM) 
>>       ITAUTO    0  SELECT CMD(%CCCC &ZPARM) 
>>       ITCK          0  SELECT CMD(%DDD &ZPARM)   
>>
>> Is there any way to get this list into a dataset that I can edit/view?
>>
>> I’m trying to come up with a list of commands that can be invoked from this 
>> Command Table, (or any other of our command tables as well), to be used in 
>> another process (a REXX solution would be terrific).
>>
>> TIA
>>
>> Ren Brenton
>> MSP Home Equity 
>> Black Knight Financial Services
>> 601 Riverside Ave., 
>> Jacksonville, FL 32204
>> __________________________________________________
>> O: 904.357.1448 | M: 404.438.3868 | F: 904.357.1807
>> [email protected] || www.BKFS.com
>> The information contained in this message is proprietary and/or 
>> confidential. If you are not the intended recipient, please: (i) delete the 
>> message and all copies; (ii) do not disclose, distribute or use the message 
>> in any manner; and (iii) notify the sender immediately. In addition, please 
>> be aware that any message addressed to our domain is subject to archiving 
>> and review by persons other than the intended recipient. Thank you.
>>
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to [email protected] with the message: INFO IBM-MAIN
>>
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
> .
> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to