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

ISPF Edit Macro invocation


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 3:13 pm
Reply with quote

Hi I have a rexx code(COMPILE) which will compile cobol program. Now I want this code to be invoked when I enter COMPILE on ISPF command line while I am editing a cobol program. My code is working if both my REXX code and cobol programs are in same PDS. If these two programs are in different PDS, then I get an error 'command COMPILE not found'. Is it possible to resolve this? (Basically I want my REXX code to be invoked from any PDS)
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Jul 12, 2010 3:30 pm
Reply with quote

anju subrahmanian wrote:
Now I want this code to be invoked when I enter COMPILE on ISPF command line while I am editing a cobol program.


Then COMPILE has to be written as an ISPF Edit Macro, and stored in an appropriate (for your site) library.
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 3:45 pm
Reply with quote

Thanks for your reply Kevin, Is there a way we can find out this particular library?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 12, 2010 3:57 pm
Reply with quote

TSO ISRDDN - DD names usually SYSEXEC for REXX.

Talk to your site support people for comfirmation.
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 5:14 pm
Reply with quote

I have allocated my PDS where my REXX code resides to SYSEXEC. Alos used "ADDRESS ISREDIT 'MACRO'" in my REXX code. Even then REXX code is not geting invoked...........
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 12, 2010 5:16 pm
Reply with quote

Probably line 16 of your code then.
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 5:33 pm
Reply with quote

expat, Could you please explain what you mean by 'line 16' here.........
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 12, 2010 6:12 pm
Reply with quote

It was just a guess, because you have not posted anything of any use to try and find what the problem really is.

You say it doesn't work and that's it. No code, no messgaes, no nothing.
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 6:48 pm
Reply with quote

I think what I am trying to find out has nothing to do anything with the code. Please find below code(SAMPLE)

/***************REXX******************
ADDRESS ISREDIT 'MACRO'
SAY 'REXX IN EXECUTION.....'
RETURN

I want to execute 'SAMPLE' from edit mode of any dataset. Suppose my code is loacted in PDS 'xxx001.exec'. If I open any member in this PDS and enter 'SAMPLE' on ISPF command line, its working. But if go to any other PDS and do the same, i get message 'IKJ56500I COMMAND SAMPLE NOT FOUND'. Now I belive you will understand what I trying to achieve. Please let me know if you need any more clarification on this?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jul 12, 2010 6:51 pm
Reply with quote

Quote:
I have allocated my PDS where my REXX code resides to SYSEXEC


obviously, you have not.
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 6:56 pm
Reply with quote

I have allocated my PDS where my REXX code resides, even after this no improvements. It behaves the same way.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jul 12, 2010 7:00 pm
Reply with quote

in every shop that I have worked,
they provided either
  • a group pds for user clists/rexx scripts
  • an easy, site standard way to allocate your personal pds to sysexec

often accomplished by proper naming standards - llq .clist, .rexx or .exec

I realize that you may have to communicate with someone at your site
to determine how one accomplishes this,
since you have not found anything in your site's documentation
(after, i am sure, a very thorough search on your part)
that informs you of the proper procedure.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jul 12, 2010 7:01 pm
Reply with quote

Quote:
I have allocated my PDS where my REXX code resides


again, no you are wrong.

or, excuse me, I could be wrong,
in which case you should initiate a problem ticket with IBM,
since you have done everything correctly,
it must be the operating system.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jul 12, 2010 7:15 pm
Reply with quote

and before you start whinning about my not being nice,
you may wish to consider the amount of information that you have provided,
other than the 'I did this correctly, and I did that correctly'.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 12, 2010 7:22 pm
Reply with quote

And it also depends on how you allocated your PDS to SYSEXEC, how and where you enter the macro name from.

As said by both Dick and myself - you have told us absolutely nothing yet you expect answers from us.

So let's start with my question in this post.

How did you allocate your PDS to SYSEXEC.
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 7:31 pm
Reply with quote

Below is the code I use to allocate my pds to sysexec

"ALLOC FI(SYSEXEC) DA('XXXX01.DEL.REXX.EXEC',",
") SHR REUSE"
IF RC = 0 THEN
SAY 'SYSEXEC ALLOCATED'
ELSE
SAY 'SYSEXEC ALLOCATION FAILED'

When I do this my pds is getting allocated to SYSEXEC, but existing allocationa are gone.

Instead of this how can I allocate my pds to sysexec without losing existing allocations.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Jul 12, 2010 7:35 pm
Reply with quote

Quote:
If I open any member in this PDS and enter 'SAMPLE' on ISPF command line, its working.

This part does not make sense to me.
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 7:48 pm
Reply with quote

Below is sysexec allocation code (SETUP)

/***************REXX**************
"ALLOC FI(SYSEXEC) DA('XXXX01.DEL.REXX.EXEC',",
") SHR REUSE"
IF RC = 0 THEN
SAY 'SYSEXEC ALLOCATED'
ELSE
SAY 'SYSEXEC ALLOCATION FAILED'

Below is SAMPLE code

/***************REXX**************
ADDRESS ISREDIT 'MACRO PROCESS'
SAY 'REXX IN EXECUTION.....'
RETURN

Both these code are located in pds xxxx01.del.rexx.exc

First I executed SETUP code, then xxxx01.del.rexx.exc is allocated to SYSEXEC

Then in the same PDS I have a member TRIAL, I opened this menber TRIAL in view/edit mode and enterd SAMPLE on ISPF command line, then rexx code in member SAMPLE is executed and I am getting a display message 'REXX IN EXECUTION.....' which is from rexx code in SAMPLE.

Now if open a member dataset in any PDS other than xxxx01.del.rexx.exc
and enter SAMPLE in ISPF command line, I get a meesage 'IKJ56500I COMMAND SAMPLE NOT FOUND'

Here I have explained what all things I have done. I am not claiming that I have done everithing or I have done eerything correctly. Do I need to do anything other than what I have done so far, or is there anything wrong with what have done?

Anyway Thank you very much to expat and Dick Brenholtz
for all the information you provided so far.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 12, 2010 7:55 pm
Reply with quote

I suggest that you use TRACE I when you execute your SETUP exec just to double check. What does ISRDDN show when you invoke it after the SETUP.
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Mon Jul 12, 2010 7:59 pm
Reply with quote

ISRDDN shows that my PDS is allocated to SYSEXEC, but system provided SYSEXEC allocations are gone once I allocate my PDS.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Jul 12, 2010 8:21 pm
Reply with quote

that's the problem with ALLOC.

suggest you do a search in the forum for ALTLIB. The threads you will find provide other solutions, also. But I would suggest ALTLIB, since that does not destroy existing concatenations.
When you do ALLOC, you have to go to the trouble of determining those DS already allocated, and concatenate your to those existing (in a string) and then using ALLOC you don't lose any.

Before, I would spend some time finding a sysexec ds that allows you to add members, instead of modifying your allocations everytime you enter ISPF.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Tue Jul 13, 2010 1:50 am
Reply with quote

I agree with dbz about finding a library to add to.

However, here we had a situation, where we wanted to 'protect' code in a
dataset. We had many members in this dataset.

We chose to use ALLOC instead, I had more success in the past.

We also re-allocated SYSPROC instead of sysexec.

First do an ISRDDN to see what datasets are allocated to SYSPROC.

Here is a modified version of our code.

Code:

/* REXX EXEC TO ALLOCATE SYSPROC TO PICKUP MY.ISPCLIB  */

Q1 = "'"
QCQ = "','"

L.  = ''
L.1 = 'MY.ISPCLIB'
L.2 = 'SYSTEM1.ISPCLIB'
L.3 = 'SYSTEM2.ISPCLIB'
L.4 = 'SYSTEM3.ISPCLIB'
L.5 = 'SYSTEM4.ISPCLIB'

I = 1
WHICH_LIB = Q1||L.I
I = I + 1

DO UNTIL L.I = ''
  WHICH_LIB = WHICH_LIB||QCQ||L.I
  I = I + 1
END
WHICH_LIB = WHICH_LIB||Q1

"ALLOC FI(SYSPROC) DA("WHICH_LIB") SHR REUSE"

EXIT
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Jul 13, 2010 3:06 am
Reply with quote

Whoa, why didn't anyone suggest the use of the QBASELIB service?

Code:
***************************** Top of Data ******************************
    'QBASELIB' dd-name 'ID('id-var')'                                   
                                                                       
     dd-name      - Specifies DDNAME being queried.                     
     id-var       - Optional, name of the dialog variable which is to   
                    contain "ID" information.  It is set to the         
                    data set name(s) that are allocated to the         
                    DDNAME being queried.                               
                                                                       
   EXAMPLE:  ADDRESS ISPEXEC                                           
             'QBASELIB ISPPLIB ID(IDV)'                                 
                                                                       
  If rc ^= 0 Then  /* Return codes                                   */
    Do             /*  4  - Specified dd-name is not defined         */
    End            /*                                                */
  Else             /* 16  - Dialog variable translation or           */
                   /*       truncation error.                        */
                   /* 20 -  Severe error.                            */
**************************** Bottom of Data ****************************
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Jul 13, 2010 6:18 am
Reply with quote

Either use ALTLIB or BPXWDYN.

See the two line example of BPXWDYN that posted by Kevin, here:
ibmmainframes.com/viewtopic.php?t=49712&highlight=bpxwdyn
Back to top
View user's profile Send private message
anju subrahmanian

New User


Joined: 11 Jul 2010
Posts: 21
Location: Bangalore

PostPosted: Tue Jul 13, 2010 8:59 am
Reply with quote

Kevins code is working for me.

Earlier I have been allocating my REXX pds to SYSEXEC. With Kevins code I am allocating my REXX pds to SYSPROC and my PDS is getting concatenated to system provided allocations.

Also I noticed that by default system is not allocating any dataset to SYSEXEC. So I suspect ddname SYSEXEC is not setup with my OS installation, may be that is why things were not working for me even after allocating my PDS to SYSEXEC.
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts PRINTOUT macro PL/I & Assembler 0
Search our Forums:

Back to Top