Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COBOL calling REXX calling LISTDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Chessdude

New User


Joined: 28 Apr 2006
Posts: 6
Location: Netherlands

PostPosted: Mon May 01, 2006 2:32 pm    Post subject: COBOL calling REXX calling LISTDS
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Mon May 01, 2006 4:01 pm    Post subject: Re: COBOL calling REXX calling LISTDS
Reply with quote

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
View user's profile Send private message
Chessdude

New User


Joined: 28 Apr 2006
Posts: 6
Location: Netherlands

PostPosted: Mon May 01, 2006 5:03 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Chessdude

New User


Joined: 28 Apr 2006
Posts: 6
Location: Netherlands

PostPosted: Mon May 08, 2006 6:21 pm    Post subject: Re: COBOL calling REXX calling LISTDS
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us