View previous topic :: View next topic
|
Author |
Message |
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
Thanks for your reply Kevin, Is there a way we can find out this particular library? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
TSO ISRDDN - DD names usually SYSEXEC for REXX.
Talk to your site support people for comfirmation. |
|
Back to top |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Probably line 16 of your code then. |
|
Back to top |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
expat, Could you please explain what you mean by 'line 16' here......... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
I have allocated my PDS where my REXX code resides to SYSEXEC |
obviously, you have not. |
|
Back to top |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
I have allocated my PDS where my REXX code resides, even after this no improvements. It behaves the same way. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
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 |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
ISRDDN shows that my PDS is allocated to SYSEXEC, but system provided SYSEXEC allocations are gone once I allocate my PDS. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
Back to top |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
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 |
|
|
|