IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Open members in a pds


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Tue Dec 23, 2008 8:40 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Dec 23, 2008 9:04 pm
Reply with quote

I'm a little confused. Why can't OPJCL just call the ISPF VIEW service directly?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Dec 23, 2008 9:05 pm
Reply with quote

?=????? 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
View user's profile Send private message
vpr_118
Warnings : 1

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Tue Dec 23, 2008 9:11 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Dec 23, 2008 9:19 pm
Reply with quote

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
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue Dec 23, 2008 9:20 pm
Reply with quote

Code:
ADDRESS ISREDIT


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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Open VSAM File in IMS DC Region - DFS... IMS DB/DC 0
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts REXX editmacro to compare two members... CLIST & REXX 7
Search our Forums:

Back to Top