ISPF LMMDISP Updating ZLUDATA



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

ISPF LMMDISP Updating ZLUDATA

Postby Steve Coalbran » Thu Feb 15, 2018 3:04 pm

I have two problems with my memberlist display using LMMDISP.
  1. When I issue an "Error" message because an Invalid select code is
    entered, I wish the response to be the same as it would in VIEW.
    That is I want the Invalid select code to remain in ZLLCMD and the
    cursor to remain on this field.
    I actually tried to enter an ZLUDATA value of '*Error' too but, see 2.
  2. When I issue any message in ZLUDATA I wish for this to NOT be folded
    into uppercase.
REXX: Simplified version.
This is just the framework clearly.
I actually call ISPEXEC in a subrtn that checks the RC and issues messages via SETMSG if an error occurs like line-88-90 would actually be:
  CALL ISP 08,"LMMDISP DATAID(&MID)",
                       "PANEL(SPIGGOT) COMMANDS(ANY)",
                       "MEMBER("imn") STATS(YES)" cmd

/**REXX***************************************************************/
TRACE "O"
ADDRESS ISPEXEC
"CONTROL ERRORS RETURN"

/*-------------------------------------------------------------------*/
/* TEST with ...                                                     */
/*-------------------------------------------------------------------*/
ids = "'N472730.USER.EXEC'"
wds = "'N472730.BACK.EXEC'"
imn = "A*"

/*-------------------------------------------------------------------*/
/* initialize dataid and open                                        */
/*-------------------------------------------------------------------*/
title = STRIP(ids,,"'")
"LMINIT DATAID(MID) DATASET("wds") "
"LMOPEN DATAID(&MID) OPTION(INPUT) "

/*-------------------------------------------------------------------*/
/* maintain display of the library memberlist                        */
/*-------------------------------------------------------------------*/
"LMMDISP DATAID(&MID)",
                    "PANEL(SPIGGOT) COMMANDS(ANY)",
                    "MEMBER("imn") STATS(YES) "
cmd = ""
DO WHILE(RC=0)

   /*--------------------*/
   /* process selections */
   /*--------------------*/
   DO WHILE(RC<4)
      member = STRIP(zlmember)

      /*-------------------------*/
      /* process SELECT/unselect */
      /*-------------------------*/
      bev = WORDPOS(zllcmd,"B E V")
      SELECT
      WHEN( zllcmd='' )THEN NOP
      WHEN( zllcmd='/' )THEN NOP        /* where does the / come from*/
      WHEN( zllcmd='S' ,
          ! zllcmd='C' ) THEN
         zludata = "*Change"
      WHEN( zllcmd='U' ) THEN
         zludata = "*Undo"
      WHEN( bev>0 )THEN
         zludata = "*"WORD("*Browse *Edit *View",bev)
      WHEN( zllcmd='Q' ,
         !  zllcmd='?' )THEN
         zludata = "*QUERY"
      OTHERWISE DO
         CALL SAYMSG "Invalid select code",,
              'Invalid select code "'zllcmd'".',
              '§Use "S" to Select,',
              '"U" to Undo,',
              'or "Q"(or "?") to Query-changes.',
              '§Use "B", "E", or "V" to Browse, Edit or View.'
         zludata = "*Error"
         END
      END

      /*----------------------------------*/
      /* update and get the next selected */
      /*----------------------------------*/
      IF( TRANSLATE(zludata)="*ERROR" )THEN
         cmd = "CURSOR(ZLLCMD)"
      ELSE
         cmd = ""
      IF( zllcmd<>'/',
        & zllcmd<>'' )THEN DO
         "LMMDISP DATAID(&MID)",
                     "STATS(YES) OPTION(PUT)",
                     "MEMBER("member") ZLUDATA("zludata")" cmd
         IF( cmd<>"" )THEN DO
            imn = member
            LEAVE
            END
         ELSE NOP
         END
      ELSE NOP
      "LMMDISP DATAID(&MID)",
                  "STATS(YES) OPTION(GET) "
   END
   "LMMDISP DATAID(&MID)",
                       "PANEL(SPIGGOT) COMMANDS(ANY)",
                       "MEMBER("imn") STATS(YES)" cmd
END

"LMMDISP DATAID(&MID) OPTION(FREE) "
"LMCLOSE DATAID(&MID) "
"LMFREE DATAID(&MID) "

EXIT /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/

Panel: Pretty much ISRML000 without the ABC sections and with ZDSN
changed to TITLE.
(PCOMMS download has changed a couple of attribute characters:
14►'' & 16►' ')
)PANEL KEYLIST(ISRSPBC,ISR)
)ATTR DEFAULT(Š‹Œ) FORMAT(MIX)            /* ISRML000 - ENGLISH - 7.1 */
 0B TYPE(AB)
 0D TYPE(PS)
 2D TYPE(ABSL) GE(ON)
 2E TYPE(PT)
 28 TYPE(FP)
 0A TYPE(NT)
 13 TYPE(NEF) PADC(USER)
 16 TYPE(VOI) PADC(USER)
 26 AREA(DYNAMIC)
 08 TYPE(DATAOUT) PAS(ON) CSRGRP(99)
 09 TYPE(DATAOUT)
 29 AREA(DYNAMIC) EXTEND(ON) SCROLL(ON)
 01 TYPE(DATAIN) CAPS(ON) PADC(&ZMLPAD) PAS(ON)
 02 TYPE(DATAOUT) INTENS(&MLI2) SKIP(ON) COLOR(&MLC2) HILITE(&MLH2)
 03 TYPE(DATAIN) INTENS(&MLI5) CAPS(ON) COLOR(&MLC5) HILITE(&MLH5)
 04 TYPE(DATAOUT) INTENS(&MLI3) COLOR(&MLC3) HILITE(&MLH3)
 05 TYPE(DATAOUT)
 06 TYPE(DATAOUT) INTENS(LOW)
 14 TYPE(NEF) CAPS(ON) PADC(USER)
)BODY  CMD(ZCMD)
ˆMacEdit         TITLE                                  ˆRow Z      ˆof Z      Ž
ˆCommand ===>Z                                               ˆScroll ===>Z   Ž
 ZMLCOLD                                                                        
‰ZDATA                                                                         ‰
‰                                                                              ‰
)INIT
.ZVARS = '(ZMLCR ZMLTR ZCMD ZSCML)'
.HELP = ISR01130
.ATTR(ZMLCR)='JUST(RIGHT) PAD(''0'')'
.ATTR(ZMLTR)='JUST(RIGHT) PAD(''0'')'
&zds   = &zdsn
&zscr = 'OFF'
&zt = LENGTH(zds)
IF (&zt > 42)
  &zscr = 'ON'
VGET (MLC1 MLC2 MLC3 MLH1 MLH2 MLH3 ZMLPD ZSCML) PROFILE
VGET (ZGUI)
&ZMLPAD = 'USER'                     /* Init to user pad char OW18007*/
IF (&ZGUI = ' ')                     /* Not GUI mode          OW18007*/
  IF (&ZMLPD = ' ')                  /* User pad not wanted   OW18007*/
    &ZMLPAD = '.'                    /* Use default pad char  OW18007*/
ELSE                                 /* GUI mode              OW18007*/
  IF (&ZGUI NE 'CLIENT')             /* Not for Web                  */
    .ATTRCHAR(01) = 'TYPE(DATAOUT)'  /* Set to output         OW18007*/
IF (&MLC1 = ' ') &MLC1 = 'TURQ'
IF (&MLC2 = ' ') &MLC2 = 'BLUE'
IF (&MLC3 = ' ') &MLC3 = 'GREEN'
                                         /* Fill Scroll Vars if       */
IF (&ZSCML = ' ') &ZSCML = 'PAGE'        /* Blank with page.          */
)PROC
VPUT (ZSCML) PROFILE
IF (.CURSOR = ZDATA OR .CURSOR = ZMLCOLD) &ZMSCPOS = &ZCURPOS
ELSE &ZMSCPOS = '0000'
)FIELD
)PNTS
)END
FIELD(ZDSN) SCROLL(ZSCR)
/* 5650-ZOS     COPYRIGHT IBM CORP 1994, 2013 */
/* ISPDTLC Release: 7.1.  Level: PID                                  */
/* z/OS 02.01.00.  Created - Date: 12 Dec 2012, Time: 08:46           */

Actual result when I enter 'F' as a member selection code...
Spiggot         N472730.USER.EXEC                          Invalid select code
Command ===>                                                  Scroll ===> CSR
   Name     Prompt          Size    Created           Changed            ID
_ A                            1   2016/10/07   2016/10/07 12:18:23    N472730
. ABC                         27   2016/08/18   2017/02/09 10:49:00    N472730
. ABCD     *ERROR             27   2017/02/09   2017/02/09 10:50:00    N472730
. ABCDE                       27   2017/02/09   2017/02/09 11:20:00    N472730

Wished for result...
Spiggot         N472730.USER.EXEC                          Invalid select code
Command ===>                                                  Scroll ===> CSR
   Name     Prompt          Size    Created           Changed            ID
. A                            1   2016/10/07   2016/10/07 12:18:23    N472730
. ABC                         27   2016/08/18   2017/02/09 10:49:00    N472730
F ABCD     *Error             27   2017/02/09   2017/02/09 10:50:00    N472730
. ABCDE                       27   2017/02/09   2017/02/09 11:20:00    N472730

(cursor under invalid select code)
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time

Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post