View previous topic :: View next topic
|
Author |
Message |
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Hi i have to open a member in a PDS.
My aim is to give just 2 parameters in command prompt
Command ===> OPJCL ABCD
Where ABCD is the JCL member name.
OPJCL is an ISPF Edit macro program coded in REXX as below. This calls another macro "OPEN"
/* rexx */
ADDRESS ISREDIT "MACRO (P1) PROCESS"
ADDRESS ISREDIT "OPEN aaa.bbb.ccc" P1
Where aaa.bbb.ccc is library name and P1 will be ABCD which is a member in aaa.bbb.ccc.
OPEN is another rexx macro where the member is finally opened. as mentioned below.
/* rexx */
/* macro to get the member */
/*+++++++++++++++++++++++++++++++++++++++++++++/
ADDRESS ISREDIT "MACRO (P1,P2) PROCESS"
address isredit "(curline) = LINE .ZCSR"
address isredit "(cursl,cursc) = CURSOR"
/*+++++++++++++++++++++++++++++++++++++++++++++/
filename=strip("'"||p1||'('||p2||')'||"'")
SAY filename
address ISPEXEC
"ISPEXEC VIEW DATASET("filename")"
EXIT
END
end
exit
Here P1 will be aaa.bbb.ccc and P2 will be ABCD. Finally the member gets opened.
But for this is I have to open OPJCL rexx macro and then EXECUTE the below mentioned:
Command ===> OPJCL ABCD
Can any one tell me a way so that the macro works irrespective of where it is executed. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm a little confused. Why can't OPJCL just call the ISPF VIEW service directly? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
?=????? making things a little complicated.
the IO macro, what does it do?
why not write a REXX script that you invoke via:
TSO VCOPYE membername
VCOPYE:
Code: |
/* REXX */
ADDRESS ISPEXEC
ARG MEMBER
IF LENGTH(MEMBER) < 1 THEN
ADDRESS ISPEXEC "VIEW DATASET('PREV.ELG1.COPYBOOK')"
ELSE
ADDRESS ISPEXEC "VIEW DATASET('PREV.ELG1.COPYBOOK("MEMBER")'"
EXIT
|
the above will work from anycommandline, anywhere, for instance QMF. |
|
Back to top |
|
|
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Like opjcl i will have many other macro which will call the macro "OPEN".
like opprc for procs, opprg for programs. The library mentioned in each will be different.
opprc will have PDS which has all the procedures
opprg will have PDS which has all the programs.
Finally the member will be opned by the "OPEN" rexx macro.
Problem is that i have to open the OPJCL or OPPRC or OPPRG to execute the below command
Command ===> OPJCL JCLMEM
Command ===> OPPRC PRCMEM
Command ===> OPPRG PRGMEM
Now i want to open the member irrespective of my location OR SCREEN. I need not open any members. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you are making this much to difficult.
forget the edit macro.
generate a rexx script which will invoke either the member panel list or open the member directly.
I have 9 different environments in endevor .
V for view or B for browse (loadlibs)
copy/cobol/bcopy/jcl/proc/
a for environment a, b for b, etc.
thus I have a handful of rexx scripts that I invoke via TSO ......
VCOBOLP - view cobol in P environment
VCOPYA view copybooks in A environment.
BLOADA browse the batch load dataset generated for environment A
BCICSF browse the cics load dataset generated for environemnt F
all of these are essentially the same as the example I provided in my previous post, with the DSN changed in each. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
This makes it an edit macro so it must be executed in edit or view.
dbzTHEdinosauer method could be executed outside of edit because it would not be an edit macro. Take your pick or create both. |
|
Back to top |
|
|
|