Page 1 of 2

ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 11:15 am
by Quasar
Hello -

I am writing an EDIT Macro "PEEK", that allows the user to Peek into a copy-book or sub-program, without having to go through DSLIST Menu 3.4. The Rexx EXEC searches through my Site's default libraries, and finds a matching member-name. If a match is found, the MEMBER(Copy-book or sub-program) is to be displayed in VIEW Mode, in a small Panel(20 rows x 35 cols).

/* REXX SCRIPT TO PEEK DATA FROM DATASETS */
ADDRESS ISREDIT "MACRO (PARMSTR) PROCESS"
TRACE ON

/**************************/
/* Display PEEK Popup     */
/**************************/
parse var PARMSTR type name
PGMNAME = NAME
SRCLIB  = 'CP81000.PSOURCE.COBOL'
COPYLIB = 'CP81000.PCOPYLIB.COBOL'
SEGLIB  = 'CP81000.PSEGMENT.COBOL'
PSBLIB  = 'CP81000.PPSB.ASM'
DBDLIB  = 'CP81000.PDBD.ASM'
MFSLIB  = 'CP81000.PMFS.ASM'

ADDRESS ISPEXEC "ADDPOP"
ADDRESS ISPEXEC "DISPLAY PANEL(PEEKP)"

/**************************/
/* Search in Library      */
/**************************/
if type = "PROG"
then do
 ADDRESS ISPEXEC "LMINIT DATAID(MEMBERID) DATASET('"SRCLIB"') ENQ(SHR)"
   SAY 'Srclib : ' SRCLIB
   SAY 'Return code : ' rc
   ADDRESS ISPEXEC "LMOPEN  DATAID(&MEMBERID) OPTION(INPUT)"
   ADDRESS ISPEXEC "LMMFIND DATAID(&MEMBERID) MEMBER("PGMNAME")"
   Say 'Return code = ' rc

   if rc = 0 then do
      ADDRESS ISPEXEC
      "VIEW DATAID(&MEMBERID) MEMBER("PGMNAME") PANEL(VIEWP)"
   end
end
ADDRESS ISPEXEC "REMPOP"

EXIT
"ALLOC F(INDD) SHR DS("INPUT")"
"EXECIO * DISKR INDD (FINIS STEM IN."
"FREE F(INDD)"
SAY 'COUNT = ' IN.0
EXIT


My Problem
When I call the ISPEXEC 'VIEW' Service, it displays the dataset in the default 24 Rows x 80 Columns mode.

If I specify the additional PANEL Name using PANEL(XXX), it displays the dataset, but doesn't show up properly. Moreover, I can't even scroll down, when I do that.

Thank you very much.

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 12:35 pm
by BillyBoyo
This is nothing to do with your problem in any way, but "PEEK" exists in VM/CMS for viewing "spooler output" (basically printouts). I always thought it a dumb name for something like that, but maybe the letters mean something. Feel free to use the word (nice aren't I :-) ) but you might run across someone who moans about it.

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 12:54 pm
by mongan
BillyBoyo - peek is an english word and is not an abreviation - peek - throw a glance at; take a brief look at
Quasar, I have no idea why you would want to do that, why do you need to invest your time to develop something like that? Why not just use view or browse?

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 1:45 pm
by BillyBoyo
I always equated "peek" with "peep" (an English(!) word). Peep has connotations, at times, of something illicit and short. I always wondered why someone chose peek for the name. Perhaps it doesn't carry the same loading "over there"?

I haven't looked at the code. I used split screen in ISPF for this sort of thing (pre rexx-available days, I guess). Give me XEDIT any day.

It may not be strictly necessary, but can be good for practising. Sometimes your own requirements you set yourself are not of the same rigour as others. For instance, I once did a cobol program to read the index of a PDF. Wasn't supposed to be doing it, and the techies liked to sit on the documentation. It ended up horrible, but working. For all I know, we already had something that did it (for the purpose I wanted) but I had no way of finding out (wasn't supposed to be doing it, was supposed to be doing a delivery system).

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 2:29 pm
by Quasar
Hello -

BillyBoyo wrote:For all I know, we already had something that did it (for the purpose I wanted) but I had no way of finding out (wasn't supposed to be doing it, was supposed to be doing a delivery system).

Is there some tool out there, which already does this?

mongan wrote:Quasar, I have no idea why you would want to do that, why do you need to invest your time to develop something like that? Why not just use view or browse?

Well, coz I hate going to ISPF Menu 3.4, Typing the library name, then opening it and locating my member. Sometimes I also runout of sessions(9 Sessions, each time I do a START 3.4). So, I thought of developing a Macro, which would give us a small VIEW of the dataset in a smaller panel.

Thank you very much.

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 3:26 pm
by NicC
So don't start 3.4 each time you want to use it - start it once the swap to it either by pf9 several times or using SWAP LIST and selecting the session you want.

When you have your mini-panel up type in keys or pfshow and see if your scroll keys are set.

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 6:03 pm
by BillyBoyo
[quote="Quasar]

Is there some tool out there, which already does this?

[/quote]

Sorry, I have no idea. I was talking about reading the index of a PDS in Cobol, which I recently learned is properly possible, rather than the approach I was taking a while ago. I was trying to suggest that it might just be something you feel is worth doing, you'll learn from it, even if there is an available alternative (and if there isn't).

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 6:08 pm
by enrico-sorichetti
the net is full of such things...
google with ( for example )
EDIT MACRO TO (*) A MEMBER

(*) might be EDIT VIEW BROWSE

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 6:56 pm
by mongan
What do you EXACTLY want to do? We have a Macro that lets you place the cursor on a data set name and then, when you press enter, goes to the data set. If you are in a PDS/PDSE member you can show another member by entering view member name. I have modified the 3.4 and combined it with the reflist, I get a panel full of all the data sets that I last visited. So, what do you want to do? Look at the length of this thread - we are trying to help but are guessing what you want/need.

Re: ISPF VIEW Dataset in small panel

PostPosted: Fri Mar 18, 2011 10:57 pm
by Quasar
Hello -

Sorry about this folks, I guess you all were at sixes and sevens and trying to guess, what I wanna achieve using this EDIT Macro. So, I made it a point to just show you snapshots of how my EDIT Macro should work.

STEP 1
Type PEEK PROG GRAP224B (PEEK <prog|copy|seg|dbd|..> member)

Image

I built a Panel, which will confirm the order of libraries to be searched, for this member called GRAP224B.

Image

When the user hits enter, the contents of this member GRAP224B, should be displayed the same small panel(20 rows x 40 cols) shown in the 2nd screenshot. However, my whole screen gets messed up, when I issue VIEW. Also, it refits and stretches to 24 rows x 80 cols, as you can see below.

Image

Are you folks getting it, what I am trying to put across. Kindly let, if there's still a communication gap.

Thank you very much.