Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to define a ISPF panel with uncertain lines

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed May 04, 2011 10:47 am    Post subject: How to define a ISPF panel with uncertain lines
Reply with quote

I want to create a panel and it displays the user search results

I use stem.n to keep the results and n is uncertain as the user search.

How should I define a panel to display the results ?

thanks all !
Back to top
View user's profile Send private message

prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Wed May 04, 2011 11:41 am    Post subject:
Reply with quote

This has nothing to do with REXX or CLIST. Next time post in the ISPF forum.

Use a dynamic area.

Let's be generous for a change, code comes from another forum that is currently defunct, so I cannot properly attribute it, sorry.
Code:

/* REXX exec to show use of ISPF dynamic areas                        */
parse source source
parse value source with . . moi .

call load_dynlib

"ispexec libdef ispplib library id("dynlib") stack"

"ispexec control display save"

/***********************************************************************
* Example 1, scrollable dynamic area                                   *
***********************************************************************/
red      = '01'x                            /* Assign colors to       */
blue     = '02'x                            /*  Attribute bytes       */
green    = '03'x                            /*   found in the data    */
white    = '04'x
maxlines = 600                              /* max number of lines    */
dyndata  = ''                               /* initialize data        */

do a = 1 to maxlines by 3                   /* Create dummy data      */
  dyndata = dyndata || white ||,
            left('This is'red   || 'red  'white || a,     29)
  dyndata = dyndata || white ||,
            left('This is'blue  || 'blue 'white || a + 1, 29)
  dyndata = dyndata || white ||,
            left('This is'green || 'green'white || a + 2, 29)
end

/***********************************************************************
* Add a bottom of data maker to the end of the data                    *
***********************************************************************/
dyndata   = dyndata || blue ||,
            center(green || 'BOTTOM' || blue, 29, '*')

curline = 1                                 /* set current line #     */

/***********************************************************************
* Loop until end of error                                              *
***********************************************************************/
do until disprc > 0
  dynarea = substr(dyndata,1+(curline-1)*30)  /* set dynamic variable */
  size = length(dynarea)                    /* Set a scalar variable  */

  "ispexec display panel(dynpanel)"         /* Display the data       */
  disprc = rc                               /* save return code       */

  "ispexec vget (zverb,zscrolla,zscrolln)"  /* get scroll values      */

  select                                    /* Process scrolling      */
    when zverb = 'UP' then                  /* Scroll up              */
      if zscrolla = 'MAX' then              /*  if scroll was max     */
       curline = 1                          /*    scroll to top       */
      else                                  /*  else a number is known*/
       curline = max(1, curline - zscrolln) /* (maximum is top)       */

    when zverb = 'DOWN' then                /* Scroll down            */
      if zscrolla = 'MAX' then              /*  if scroll was max     */
       curline = maxlines                   /*    scroll to bottom    */
      else                                  /*  else a number is known*/
       curline = min(maxlines, curline + zscrolln)   /* max is bottom */

    otherwise                           /* could use left & right too */
  end
end                                         /* End of display loop    */
exit

/***********************************************************************
* LOAD_DYNLIB:                                                         *
*                                                                      *
* This procedure loads the via EPANQ generated panel, message and/or   *
* skeleton code into a library. Note that there is no reason to use    *
* different libraries for any of these objects, as long as they are    *
* named differently|                                                   *
***********************************************************************/
load_dynlib:
dynlib = 'dyn'random(99999)
alloc  = "alloc fi("dynlib") rtdsn(sysdsname) "   ||,
                   "lrecl(80) blksize(0) dir(5) " ||,
                   "new delete reuse "            ||,
                   "space(1,1)"
rc = bpxwdyn(alloc)

if rc = 0 then
  ispdyn = sysdsname
else
  ispdyn = 'NOT FOUND'

"newstack"

member = 'DYNPANEL'

queue ')attr'
queue ' @  area(dynamic) scroll(on) extend(on)'
queue ' 01 type(dataout) color(red)'
queue ' 02 type(dataout) color(blue)'
queue ' 03 type(dataout) color(green)'
queue ' 04 type(dataout) color(white)'
queue ' $  type(text)    color(yellow)'
queue ')body expand(||)'
queue '%-|-|- Example for using a dynamic area -|-|-'
queue '%Command ===>_zcmd                                        ' ||,
      '    %Scroll ===>_AMT +'
queue '%'
queue '+ This area is fixed.   Size: &size'
queue '+'
queue '+ This is an input field%===>_somevar +'
queue '+'
queue '+This is extendable  @dynarea                     @'
queue ' '
queue '       $This should be at the bottom of the screen when in' ||,
      ' full screen.'
queue ')end'

put_object:
  tfil = 'tfil'random(9999)

  "alloc f("tfil") da('"ispdyn"("member")') shr reu"
  "execio" queued() "diskw "tfil" (finis"
  "free f("tfil")"

  "delstack"
return
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed May 04, 2011 12:12 pm    Post subject:
Reply with quote

Prino Thanks !!
although I don't understand the code , I'll keep reading.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed May 04, 2011 12:54 pm    Post subject:
Reply with quote

Or consider the use of ISPF tables
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Wed May 04, 2011 12:58 pm    Post subject:
Reply with quote

Keep in mid this is sample code, all my sample code is completely self-contained, under normal circumstances the panel would be in a library concatenated to ISPPLIB.

The dynamic generation of the panel allows me to take the code from site to site without having to worry about setting up libraries, other than allocating my lib to //SYSEXEC (or //SYSUEXEC)
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed May 04, 2011 1:37 pm    Post subject:
Reply with quote

prino wrote:
Keep in mid this is sample code, all my sample code is completely self-contained, under normal circumstances the panel would be in a library concatenated to ISPPLIB.

The dynamic generation of the panel allows me to take the code from site to site without having to worry about setting up libraries, other than allocating my lib to //SYSEXEC (or //SYSUEXEC)


OK, I see , really a good way .
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Wed May 04, 2011 1:37 pm    Post subject:
Reply with quote

expat wrote:
Or consider the use of ISPF tables


thanks expat !!
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Wed May 04, 2011 6:40 pm    Post subject: Reply to: How to define a ISPF panel with uncertain lines
Reply with quote

I think an ISPF table is preferable because, in addition to displaying the results, you can use a table to allow the user to select one of the found items for further action.

Yes, I know you can do the same with dynamic areas, but it is easier with a table.

Where dynamic areas have an advantage is in display rows with different colors than other rows.
Back to top
View user's profile Send private message
Peter Nancollis

New User


Joined: 15 Mar 2011
Posts: 47
Location: UK

PostPosted: Thu May 05, 2011 5:21 am    Post subject:
Reply with quote

Displaying and accessing search results [assume we are talking about SuperC] Jim Narramore's excellent SRCHLIST takes alot of beating.
Pops a list of members where something has been found - allowing review just the result /browse/edit ... a truely wonderful productivity aid [ may even now be in base code - i have never bothered to look ]
wrap a harness around it so that you can just use vs a dset from dslist
eg @srchfor / blah-de-blah
It has saved me hours, but as ever ymmv
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Thu May 05, 2011 6:54 am    Post subject: Re: Reply to: How to define a ISPF panel with uncertain line
Reply with quote

Pedro wrote:
I think an ISPF table is preferable because, in addition to displaying the results, you can use a table to allow the user to select one of the found items for further action.

Yes, I know you can do the same with dynamic areas, but it is easier with a table.

Where dynamic areas have an advantage is in display rows with different colors than other rows.


thanks for your explanation
I think I did not explain my request clearly , my search result is help characters for reference, so I have used the dynamic areas to complete it with color.

thanks all again !
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Thu May 05, 2011 10:28 am    Post subject:
Reply with quote

Peter Nancollis wrote:
Displaying and accessing search results [assume we are talking about SuperC] Jim Narramore's excellent SRCHLIST takes alot of beating.
Pops a list of members where something has been found - allowing review just the result /browse/edit ... a truely wonderful productivity aid [ may even now be in base code - i have never bothered to look ]
wrap a harness around it so that you can just use vs a dset from dslist
eg @srchfor / blah-de-blah
It has saved me hours, but as ever ymmv

I'm pretty sure that using SRCHFOR from the memberlist in edit and view now has more or less the same functionality.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Thu May 05, 2011 6:10 pm    Post subject:
Reply with quote

prino wrote:
Peter Nancollis wrote:
Displaying and accessing search results [assume we are talking about SuperC] Jim Narramore's excellent SRCHLIST takes alot of beating.
Pops a list of members where something has been found - allowing review just the result /browse/edit ... a truely wonderful productivity aid [ may even now be in base code - i have never bothered to look ]
wrap a harness around it so that you can just use vs a dset from dslist
eg @srchfor / blah-de-blah
It has saved me hours, but as ever ymmv

I'm pretty sure that using SRCHFOR from the memberlist in edit and view now has more or less the same functionality.
I can confirm that. You can use SRCHFOR on a member list and also tell it to filter the search results so that only the members with 'hits' are displayed. From there you can Browse/Edit etc the member or do another SRCHFOR on the remaining subset.

The product SimpList , a favorite of mine, has had this capability for many years. www.soft-center.com One advantage that it has over SRCHFOR is that after performing several consecutive searches on a member list you can back your way up the results chain by hitting PF3. This makes it very easy to fix mistakes without having to start all over again.
Back to top
View user's profile Send private message
Peter Nancollis

New User


Joined: 15 Mar 2011
Posts: 47
Location: UK

PostPosted: Sun May 08, 2011 3:19 am    Post subject:
Reply with quote

@ don
Quote:
The product SimpList , a favorite of mine,

How wonderful to work somewhere that investments in quality tools--- very envious, but agree with the sentiments
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Sun May 08, 2011 4:43 am    Post subject:
Reply with quote

Peter Nancollis wrote:
@ don
Quote:
The product SimpList , a favorite of mine,

How wonderful to work somewhere that investments in quality tools--- very envious, but agree with the sentiments
I wish. That was my former shop. I am presently working for a company that doesn't have SimpList, and I am still mourning the loss. icon_sad.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 6 Fri Dec 02, 2016 9:47 am
No new posts VSAM define for large file jerryte JCL & VSAM 9 Wed Oct 05, 2016 1:51 am
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm
No new posts I am unable to use SWAPBAR ON command... mrsidhu12 TSO/ISPF 3 Thu Sep 01, 2016 1:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us