Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Need REXX Macro which should open a Member in View Mode ???

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM
Author Message
pnkumar
Warnings : 2

New User


Joined: 27 Oct 2005
Posts: 8

PostPosted: Tue Feb 14, 2006 8:47 pm    Post subject: Need REXX Macro which should open a Member in View Mode ???
Reply with quote

Hi ALL ,

Here is Very EXhaustive REXX Exercise i have ,Could any one help me in
in Design( how to do it ) and if possible Various REXX Utilites to Achive the following Task .

If i want to write a REXX Macro to view a Copybook Member inside a Cobol Program Member just by keeping Cursor on that Copybook??
Let us assume i have a Cobol Program(MYPGM) in one of My PDS TS.USER.PDS and in the Program MYPGM i have a copybook called AMBSRL ,so now if i put cursor on the Copybook(AMBSRL) in MYPGM and run the MACRO at Command line then it should open that Copybook in VIEW mode and after Pressing F3(BACK) ,we should return back to Program MYPGM.


Thanks in advance ,
Pallavi
Back to top
View user's profile Send private message
References
PostPosted: Tue Feb 14, 2006 8:47 pm    Post subject: Re: Need REXX Macro which should open a Member in View Mode ??? Reply with quote

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 3000
Location: Charlotte,NC USA

PostPosted: Tue Feb 14, 2006 9:03 pm    Post subject: Re: Need REXX Macro which should open a Member in View Mode
Reply with quote

You don't have to write it. It's called ZOOM and it's an ISPF EDIT Macro (I have no idea what a REXX macro is) written in REXX that does just what you want. Most shops already have it, but if you don't, you should be able to locate the source code with some Internet searching.
Back to top
View user's profile Send private message
mak_tcs

Active User


Joined: 23 Nov 2005
Posts: 76
Location: Minneapolis, MN USA

PostPosted: Tue Feb 14, 2006 9:13 pm    Post subject:
Reply with quote

Hi Pallavi,

The task is not that exhaustive. It hardly includes 5-10 lines of Rexx code.

There is macro command which will give the content of Cursor pointed line. Parse the line and get the coppybook name. then there is a single macro which opens a dataset in either browse/view/edit mode. So use it to view your copybook PDS member. Simple!!! icon_biggrin.gif

Note: You try it and in the worst case i can give the code.

Thanks,
Mani
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 192
Location: India

PostPosted: Wed Feb 15, 2006 12:57 pm    Post subject:
Reply with quote

Hi Pallavi,
I am sending you the sample code for your purpose. But the DSN where the copybook resides is hard-oded. Change it accordingly.

address ispexec "control errors return"
address ispexec
address isredit
"macro"

dsnname = AAAA.BBBB.CCCC.COPYLIB'
cpyname = ''
"(ros, cos) = cursor"
"(memline) = line .zcsr"

if(index(memline,'COPY') \= 0 & index(memline,'INCLUDE') \= 0) then
cpyname = word(memline,2)

if(substr(memline,1,4) = '-INC') then
cpyname = word(memline,2)

if(cpyname = '') then do
say 'S -> Cursor not in place...'
exit
end

address ispexec
"lminit dataid(dsid) dataset ('"dsnname"') enq(shr)"
"view dataid("dsid") member("cpyname")"
"lmclose dataid("dsid")"
"lmfree dataid("dsid")"
"end"
exit
Back to top
View user's profile Send private message
Reema Naik

New User


Joined: 24 Apr 2008
Posts: 5
Location: india

PostPosted: Wed Apr 30, 2008 12:59 pm    Post subject: Reply to: Need REXX Macro which should open a Member in View
Reply with quote

Hi Pallavi.

I am facing the same problem like yours. i want to create a REXX utility for opening a called program following CALL, its similar to what you wanted to create earlier for opening copybooks. In my case it is to open a Called Program.

eg:

CALL Prog2


Thanks in advance

Reema
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SMS & VSAM All times are GMT + 6 Hours
Page 1 of 1