View previous topic :: View next topic
|
Author |
Message |
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: 1306 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: 2547 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 |
|
|
anju subrahmanian
New User
Joined: 11 Jul 2010 Posts: 21 Location: Bangalore
|
|
|
|
Thanks for all those who replied and provided information on my query |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You may also use CONCAT (look for it in CBT) to add your PDS to an existing ddname.
O. |
|
Back to top |
|
|
|