View previous topic :: View next topic
|
Author |
Message |
Chessdude
New User
Joined: 28 Apr 2006 Posts: 6 Location: Netherlands
|
|
|
|
I'm calling REXX from COBOL with IRXEXEC which works fine.
I try to extract the member names from a PDS-file with LISTDS.
The relevant part of the REXX looks like this:
dsn = 'my.pds.filename'
x = OUTTRAP(listds.)
Address TSO "LISTDS '"dsn"' MEMBERS"
x = OUTTRAP('OFF')
r = ''
Do i = 7 to listds.0
member = STRIP(listds.i)
r = r','member
End
Return r
When I execute this REXX directly, r is filled with the member names I was looking for. The last line then gets an error "Invalid whole number" but that is another matter.
When called from COBOL I get an eror on LISTDS:
>O> "LISTDS 'my.pds.filename' MEMBERS"
+++ RC(-3) +++
and r will consist of ",LISTDS.7,LISTDS.8,......"
What am I missing here? Let me know if you need more information. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Since LISTDS is only available in a REXX exec running in a TSO/E address space, are you executing your program within a TSO/E address space? |
|
Back to top |
|
|
Chessdude
New User
Joined: 28 Apr 2006 Posts: 6 Location: Netherlands
|
|
|
|
I thought I covered that with "Address TSO"!
I submit the JCL to run the COBOL program under MVS in a TSO environment.
Anyway the following statements:
say 'ENVIRONMENT is' address()
parse SOURCE env type file
say 'parse SOURCE returned' env type file
put in front of "dsn=..." give me:
ENVIRONMENT is TSO
parse SOURCE returned TSO SUBROUTINE IFM458L SYSEXEC ? IFM458L TSO TSO/E ? |
|
Back to top |
|
|
Chessdude
New User
Joined: 28 Apr 2006 Posts: 6 Location: Netherlands
|
|
|
|
Another bit of information: in the cobol program I use IKJTSOEV to set up a TSO-environment for the REXX. Nevertheless no TSO-command or ISPF-command (after 'Address ISPF') will work.
Has anyone had any experience with this? |
|
Back to top |
|
|
|