View previous topic :: View next topic |
Author |
Message |
prasathn Beginner
Joined: 20 Oct 2005 Posts: 3 Topics: 1
|
Posted: Thu Oct 20, 2005 8:43 am Post subject: How to concatenate 2 loadlib in a COBOL call from REXX |
|
|
Hi,
I'm calling a COBOL program from a REXX routine after allocation all required DD names. But the called COBOL routine inturn calls an another program dynamically which is located in a different loadlib. I don't have access to move the loads to a single library. Is there any way to concatenate multiple loadlib in REXX during a COBOL program call ?
Thanks in advance for your time.
Prasath. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Oct 20, 2005 8:53 am Post subject: |
|
|
Prasath,
How are you excueting your REXX exec ? In match mode or interactively ?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
prasathn Beginner
Joined: 20 Oct 2005 Posts: 3 Topics: 1
|
Posted: Thu Oct 20, 2005 9:24 am Post subject: |
|
|
interactive mode |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Oct 20, 2005 9:49 am Post subject: |
|
|
prasathn,
try this
Code: |
/*** REXX ***/
"alloc fi(load dd name) da('"dataset 1"',
'"dataset 2"') shr"
|
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Oct 20, 2005 9:58 am Post subject: |
|
|
If you are calling it from ISPF, see the LIBDEF service with the LIBRARY command and call the program using ISPEXEC SELECT CMD(). That will set up a tasklib so that the LOAD macros used during the dynamic calls will search the tasklib for your 2nd module.
If you were making this call in assembler instead of letting ISPF do it, it would be an ATTACH with a DCB parameter to set up a tasklib. |
|
Back to top |
|
|
prasathn Beginner
Joined: 20 Oct 2005 Posts: 3 Topics: 1
|
Posted: Fri Oct 21, 2005 12:48 am Post subject: |
|
|
Thanks a lot for your help !
It worked with the following syntax
Code: | ADDRESS ISPEXEC
"LIBDEF ISPLLIB DATASET ID('LOADLIB1',
'LOADLIB2')"
"SELECT CMD(PGM)" |
Prasath. |
|
Back to top |
|
|
acevedo Beginner
Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Fri Oct 21, 2005 1:45 am Post subject: |
|
|
I've found in our library:
Quote: |
ADDRESS TSO "ALLOCATE FILE(STEPLIB) DA('yourloadlib') SHR REUSE"
push "TSOLIB ACTIVATE FILE(STEPLIB)"
|
I suppose it's fine as I try the rexx exec and it's working fine...is this really the same thing as LIBDEF? |
|
Back to top |
|
|
|
|