View previous topic :: View next topic
|
Author |
Message |
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 220 Location: USA
|
|
|
|
Hi,
I have coded a rexx program for opening a member of a PDS in a new logical ISPF screen. This is the code I have used.
"ISPEXEC SELECT PGM(ISPSTRT)"
"ISPEXEC SELECT CMD(%ISREPDF '"dsn"' V)"
First it is opening a new logical ISPF screen and it stands still. If I close the screen then only the member of dsn is opened.
Looks like the 2nd command is executed after the screen is closed.
Could you anybody please help on this?
Regards
Amar |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
I believe that you will want
Code: |
address ispexec "SELECT PGM(ISPSTRT) PARM(VIEW 'HLQ.FOO')" |
instead. |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 220 Location: USA
|
|
|
|
Hi,
Thank you for the reply. I tried the code. It is standing still on the view screen like the below.
Have I done some mistake?
Code: |
Menu RefList RefMode Utilities Workstation Help
------------------------------------------------------------------------------
View Entry Panel
Command ===>
More: +
ISPF Library:
Project . . .
Group . . . . . . . . . . . . .
Type . . . .
Member . . . (Blank or pattern for member selection list)
Other Partitioned, Sequential or VSAM Data Set, or z/OS UNIX file:
Data Set Name . . +
Volume Serial . . (If not cataloged)
Workstation File:
File Name . .
Options
Initial Macro . . . . Confirm Cancel/Move/Replace
Profile Name . . . . . Browse Mode
Format Name . . . . . View on Workstation
Data Set Password . . / Warn on First Data Change
Record Length . . . . Mixed Mode
DSLIST -DSLIST *VIEW |
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
1. what does your script look like?
2. how are you invoking the script? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
When you say it is "standing still", what do you mean? Presumably PF3, PF4 take you out? What does PF1 do? What are you trying to achieve?
In general mainframe screens don't move about much, so I don't really know what you are trying to say. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
V S Amarendra Reddy wrote: |
Hi,
Thank you for the reply. I tried the code. It is standing still on the view screen like the below.
Have I done some mistake? |
Very probably, as it worked for me.
Cut and paste your command, using the Code tags. I suspect (but won't claim for certain) that you have munged the data set name so that the View doesn't recognize that you've supplied one. |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 220 Location: USA
|
|
|
|
The below is the code I have used.
Code: |
PGM_DSN = HLQ.COBOL(MEMBER)
"ISPEXEC "SELECT PGM(ISPSTRT) PARM(VIEW '"PGM_DSN"')""
|
Regards
Amar |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
V S Amarendra Reddy wrote: |
The below is the code I have used.
Code: |
PGM_DSN = HLQ.COBOL(MEMBER)
"ISPEXEC "SELECT PGM(ISPSTRT) PARM(VIEW '"PGM_DSN"')""
|
|
Well. I find that this code does not in fact run.
The first line is interpreted by Rexx as a call to the function HLQ.COBOL with an argument of MEMBER. What you want to do is to enclose that in quotes, single or double, thus:
Code: |
PGM_DSN = "HLQ.COBOL(MEMBER)" |
The second line ought not to be enclosed in double quotes, as that makes it:
- The string "ISPEXEC", passed as a command to the default environment.
- The command SELECT PGM(ISPSTRT) PARM(VIEW "PGM_DSN") passed to the default environment, and with PGM_DSN passed to VIEW as a literal.
Take off the enclosing double quotes, so that the line reads:
Code: |
ISPEXEC "SELECT PGM(ISPSTRT) PARM(VIEW '"PGM_DSN"')" |
I presume that you are using a fairly recent version of ISPF as your development environment. I therefore strongly urge you to add HILITE REXX to whatever profile you use for the libraries containing Rexx scripts; it will make these errors much easier to find. |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 220 Location: USA
|
|
|
|
keeping my rexx program aside, I just tried to open a member from the same pds which I am editing with a command VIEW MEMBER. Even then it goes and shows the same view entry panel I showed earlier.
Are there any defaults need to be overridden for this to achieve?
We use ISPF 6.1 release.
Regards
Amar |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
did You care to read the manual here
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispzdg70/4.10?ACTION=MATCHES&REQUEST=ispstrt&TYPE=FUZZY&SHELF=ISPZPM70.bks&DT=20080715202837&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
I do not know what You are expecting, I TESTED with
Code: |
****** ***************************** Top of Data ******************************
000001 /* rexx */
000002 ds = "enrico.ispf.exec"
000003 /*
000004 address ispexec "SELECT PGM(ISPSTRT) PARM(VIEW '"ds"')"
000005 */
000006 address ispexec "SELECT PGM(ISPSTRT) PARM(VIEW)"
000007 exit
****** **************************** Bottom of Data **************************** |
and in both cased a second screen was opened, but the reply was completely different from what You posted
Code: |
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Menu Utilities Compilers Options Status Help
——————————————————————————————————————————————————————————————————————————————
ISPF Primary Option Menu Invalid option
Option ===> VIEW
0 Settings Terminal and user parameters User ID . : ENRICO
1 View Display source data or listings Time. . . : 11:19
2 Edit Create or change source data Terminal. : 3278
3 Utilities Perform utility functions Screen. . : 3
4 Foreground Interactive language processing Language. : ENGLISH
5 Batch Submit job for language processing Appl ID . : ISR
6 Command Enter TSO or Workstation commands TSO logon : $$ISPF1
7 Dialog Test Perform dialog testing TSO prefix:
8 Dismissed - was LMF System ID : SYS1
9 Dismissed - was other IBM Products MVS acct. : SYS1
10 SCLM SW Configuration Library Manager Release . : ISPF 6.0
11 Workplace ISPF Object/Action Workplace
12 z/OS System z/OS system programmer applications
13 z/OS User z/OS user applications
14 z/OS System z/OS System Applications (Alternate)
15 z/OS User z/OS user applications (Alternate)
16 z/OS Other z/OS Other (Condensed) |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
follow on... but, on the other side
Code: |
address ispexec "SELECT PGM(ISPSTRT) PARM(TSO %isrepdf '"ds"' V)" |
works for me
|
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 220 Location: USA
|
|
|
|
Hi Enrico,
I have exactly copied and pasted ur code into my rexx pds and executed. the code is like below.
Code: |
EDIT TSUF0CU.A.REXX(DUMMY) - 01.05 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /* REXX */
000002 DS = "HLQ.A.COBOL"
000003
000004 ADDRESS ISPEXEC "SELECT PGM(ISPSTRT) PARM(VIEW '"DS"')"
000005
000006 /*ADDRESS ISPEXEC "SELECT PGM(ISPSTRT) PARM(VIEW)"*/
000007 EXIT
****** **************************** Bottom of Data ****************************
|
After I did EX just beside the member in my pds like the below.
then the next immediate action happened it has opened another logical screen like u said. But it went to ISPF option 2(view) like I said for all of my above cases.
Code: |
View Entry Panel
Command ===>
More: +
ISPF Library:
Project . . .
Group . . . . . . . . . . . . .
Type . . . .
Member . . . (Blank or pattern for member selection list)
Other Partitioned, Sequential or VSAM Data Set, or z/OS UNIX file:
Data Set Name . . +
Volume Serial . . (If not cataloged)
Workstation File:
File Name . .
Options
Initial Macro . . . . Confirm Cancel/Move/Replace
Profile Name . . . . . Browse Mode
Format Name . . . . . View on Workstation
Data Set Password . . / Warn on First Data Change
Record Length . . . . Mixed Mode
-DSLIST *VIEW |
I feel like some default settings I am missing. But couldn't find what is the problem?
But finally I achieved it using the below code.
Code: |
"ISPEXEC SELECT PGM(ISPSTRT) PARM(EPDF '"pgm_dsn"' V)" |
This has opened the member successfully in another session.
This command again I tried to enhance like this.
Code: |
"ISPEXEC SELECT PGM(ISPSTRT) PARM(EPDF '"pgm_dsn"' V) SCRNAME(AMAR)" |
But whole command executes successfully but the SCRNAME is not happening.
Regards
Amar |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
seems that somehow Your ISPF primary option menu was customized to accept VIEW as an alternate <spelling> for option 1 ( BROWSE/VIEW)
I checked on an unmodified ISR@PRIM and it behaves as I said
but if the panel is modified to add the VIEW option as per
Code: |
000316 1,'PGM(ISRBRO) PARM(ISRBRO01) SCRNAME(VIEW)'
000317 VIEW,'PGM(ISRBRO) PARM(ISRBRO01) SCRNAME(VIEW)' |
then it takes me to the view panel, but it will not take any additional parameters |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
as a further alternative VIEW could be defined as a command in the command table
I' ll test and let You know the exact format |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
yep the symptom shown is that of VIEW defined in the command table as
Code: |
ZCTVERB ZCTTRUNC ZCTACT
----+--- ----+--- ----+----1----+----2----+----3----+----4----+----5----+--
VIEW 0 SELECT PGM(ISRBRO) PARM(ISRBRO01) SCRNAME(VIEW)
|
for the interested here are two edit macros to manage command tables
Code: |
CTBSTO will store the command table in the member currently being edited
CTBADD will addt the content of the member currently being edited to the command table |
run CTBSTO to see the format of the command entry
since the commands might be pretty long it is safer to use a 256 vb dataset
and here is the whole shebang, hopethat You will enjoy it
Code: |
EDIT ENRICO.ISPF.EXEC(CTBSTO) - 01.02 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000002 /* */
000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000004 Trace "O"
000005
000006 Parse Source _sys _how _cmd .
000007
000008 If Sysvar(SYSISPF) \= "ACTIVE" Then Do
000009 Say left(_cmd,8)"- Ispf is not active. Command not executed"
000010 exit 4
000011 End
000012
000013 call $ispex "CONTROL ERRORS RETURN"
000014
000015 if 0 = $isred("MACRO (args) NOPROCESS ") then do
000016 _how = "M"
000017 end
000018 else do
000019 zedsmsg = "Invocation ERROR"
000020 zedlmsg = left(_cmd,8)"- Must invoked as a MACRO"
000021 call $ispex "SETMSG MSG(ISRZ001)"
000022 exit 4
000023 end
000024
000025 cmdtab = "ISPCMDS"
000026
000027 If 0 = $isred("PROCESS DEST") Then ,
000028 call $isred "(ZDEST) = LINENUM .ZDEST"
000029 else ,
000030 zdest = 0
000031
000032 _end = 1
000033 retc = $ispex("TBOPEN " cmdtab " NOWRITE")
000034 Select
000035 When retc = 0 Then ,
000036 nop
000037 When retc = 8 Then do
000038 zedsmsg = "Not Found"
000039 zedlmsg = "Table '"cmdtab"' does not exist"
000040 call $ispex "SETMSG MSG(ISRZ001) "
000041 Exit retc
000042 end
000043 When retc = 12 Then do
000044 retc = 0
000045 _end = 0
000046 end
000047 Otherwise do
000048 zedsmsg = "System Error"
000049 zedlmsg = "' Rc("retc") Opening cmdtab '"cmdtab
000050 call $ispex "SETMSG MSG(ISRZ001) "
000051 Exit retc
000052 end
000053 End
000054
000055 call $ispex "TBTOP "cmdtab
000056
000057 Do While $ispex("TBSKIP "cmdtab) = 0
000058 line = left(zctverb , 8," ") || ";" || ,
000059 right(zcttrunc, 2," ") || ";" || ,
000060 strip(zctact) || ";"
000061 /*
000062 zctdesc = strip(zctdesc)
000063 if zctdesc \= "" then ,
000064 line = line || zctdesc || ";"
000065 */
000066 call $isred "LINE_AFTER "zdest" = DATALINE (LINE)"
000067 zdest = zdest + 1
000068 End
000069
000070 if _end then ,
000071 call $ispex "TBEND "cmdtab
000072
000073 zedsmsg = left(_cmd,8)"- Ended"
000074 zedlmsg = "Execution of "left(_cmd,8)" ended "
000075 call $ispex "SETMSG MSG(ISRZ001)"
000076
000077 Exit 0
000078
000079 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000080 $ispex:
000081 isp_tr = trace("O")
000082 Address ISPEXEC arg(1)
000083 isp_rc = rc
000084 trace value(isp_tr)
000085 return isp_rc
000086 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000087 $isred:
000088 isr_tr = trace("O")
000089 Address ISREDIT arg(1)
000090 isr_rc = rc
000091 trace value(isr_tr)
000092 return isr_rc
****** **************************** Bottom of Data ****************************
|
Code: |
EDIT ENRICO.ISPF.EXEC(CTBADD) - 01.10 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000002 /* */
000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000004 Trace "O"
000005
000006 Parse Source _sys _how _cmd .
000007
000008 If Sysvar(SYSISPF) \= "ACTIVE" Then Do
000009 Say left(_cmd,8)"- Ispf is not active. Command not executed"
000010 exit 4
000011 End
000012
000013 call $ispex "CONTROL ERRORS RETURN"
000014
000015 if 0 = $isred("MACRO (ARGS) NOPROCESS ") then do
000016 _how = "M"
000017 end
000018 else do
000019 _how = ""
000020 parse arg args
000021 args = space(args)
000022 argc = words(args)
000023 if argc = 0 then,
000024 cmds = "'ENRICO.ISPF.PARMS(MYCMDS01)' "
000025 else ,
000026 cmds = "'ENRICO.ISPF.PARMS("args")' "
000027 end
000028 if _how = "M" then do
000029 call $isred "PROCESS RANGE S"
000030 if $isred("(ln1) = LINENUM .ZFRANGE") \= 0 then do
000031 call $ispex "SETMSG MSG(ISRE040) "
000032 exit 4
000033 end
000034 call $isred "(ln2) = LINENUM .ZLRANGE"
000035 end
000036 else do
000037 call $tsoex "ALLOC FI(COMMANDS) DA("cmds") SHR REUSE"
000038 call $tsoex "EXECIO * DISKR COMMANDS ( STEM LINE. FINIS"
000039 call $tsoex "FREE FI(COMMANDS)"
000040 ln1 = 1
000041 ln2 = line.0
000042 end
000043 Do l = ln1 to ln2
000044 if _how = "M" then ,
000045 call $isred("(buff) = LINE" l )
000046 else ,
000047 buff = line.l
000048
000049 buff = space(buff) || ";"
000050 zctverb = strip(substr(buff,1,pos(";",buff)-1))
000051 buff = strip(substr(buff,pos(";",buff)+1))
000052 zcttrunc = strip(substr(buff,1,pos(";",buff)-1))
000053 buff = strip(substr(buff,pos(";",buff)+1))
000054 zctact = strip(substr(buff,1,pos(";",buff)-1))
000055 buff = strip(substr(buff,pos(";",buff)+1))
000056 zctdesc = strip(buff,,";")
000057 cc = $ispex("TBTOP ISPCMDS" )
000058 retc = $ispex("TBSCAN ISPCMDS ARGLIST(ZCTVERB) NOREAD ")
000059
000060 Select
000061 When retc = 0 Then Do
000062 cc = $ispex("TBDELETE ISPCMDS ")
000063 cc = $ispex("TBADD ISPCMDS ")
000064 End
000065 When retc = 8 Then Do
000066 cc = $ispex("TBADD ISPCMDS ")
000067 End
000068 Otherwise do
000069 Say "Return code '"retc"' scanning table ISPCMDS "
000070 End
000071 End
000072
000073 End
000074
000075 zedsmsg = left(_cmd,8)"- Ended"
000076 zedlmsg = ln2-ln1+1 " Commands Merged with 'ISPCMDS'"
000077 call $ispex "SETMSG MSG(ISRZ001) "
000078
000079 Exit 0
000080
000081 /*%include $tsoex */
000082 $tsoex:
000083 tso_0tr = trace("O")
000084 Address TSO arg(1)
000085 tso_0rc = rc
000086 trace value(tso_0tr)
000087 return tso_0rc
000088
000089 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000090 $ispex:
000091 isp_tr = trace("O")
000092 Address ISPEXEC arg(1)
000093 isp_rc = rc
000094 trace value(isp_tr)
000095 return isp_rc
000096 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000097 $isred:
000098 isr_tr = trace("O")
000099 Address ISREDIT arg(1)
000100 isr_rc = rc
000101 trace value(isr_tr)
000102 return isr_rc
****** **************************** Bottom of Data ****************************
|
|
|
Back to top |
|
|
|