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
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.