Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Open members in a pds

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Open members in a pds
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

Moderator Team Head


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

PostPosted: Tue Dec 23, 2008 9:04 pm    Post subject: Reply to: Open members in a pds
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: 6967
Location: porcelain throne

PostPosted: Tue Dec 23, 2008 9:05 pm    Post subject:
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    Post subject: Reply to: Open members in a pds
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: 6967
Location: porcelain throne

PostPosted: Tue Dec 23, 2008 9:19 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
This topic is locked: you cannot edit posts or make replies. Secure Browse to open dataset sandip_mainframe TSO/ISPF 3 Tue Apr 26, 2016 11:18 am
This topic is locked: you cannot edit posts or make replies. BAE Systems - Recruitment Open Days -... Express Mainframe Jobs 0 Fri Apr 22, 2016 8:19 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us