View previous topic :: View next topic
|
Author |
Message |
deveshyahoo
New User
Joined: 28 Jan 2008 Posts: 10 Location: noida
|
|
|
|
Hi,
I am trying to execute a rexx code in Clist. i am new to clist. can you please help me with examples on :
1. calling rexx from Clist
2. recieving a string as result from rexx into CLIST.
i tried to find the same information on internet. i understand that we can use VGET and VPUT. but how?
please reply with eg. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I don't think you need to use CLIST at all? Everything you can do in CLIST you can do in rexx, much more clearly. If you are up for torture, stick with your approach. Otherwise try to mainly forget about CLIST. |
|
Back to top |
|
|
deveshyahoo
New User
Joined: 28 Jan 2008 Posts: 10 Location: noida
|
|
|
|
You are correct Bill.
I need to enhance an existing CLIST code. I am using REXX to achieve my target. But I don’t know how to call this REXX in CLIST and how to get a string of data back from the rexx to clist. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
deveshyahoo wrote: |
I need to enhance an existing CLIST code. I am using REXX to achieve my target. But I don’t know how to call this REXX in CLIST and how to get a string of data back from the rexx to clist. |
Rewrite the entire CLIST in Rexx. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
there was a good explanation (and links) provided in the COBOL forum recently about VGET/VPUT.
the syntax is similar thru-out programming languages.
there are many examples in the internet.
and I echo Bill's comment: unless you are a systems-programmer and have to use CLIST, don't. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You could just use a common temporary dataset. Write to it from the REXX exec, read from it in the CLIST. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Quote: |
I don't think you need to use CLIST at all? Everything you can do in CLIST you can do in rexx, |
Quote: |
unless you are a systems-programmer and have to use CLIST, don't. |
Pardon my ignorance, but could you please let me know why systems programmers only may need CLIST? Does it mean CLIST can do something that REXX cant?
Thanks in advance, |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
why systems programmers only may need CLIST |
i did not say that
Quote: |
Does it mean CLIST can do something that REXX cant? |
possibly, but I don't think so. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Akatsukami wrote:
Quote: |
Rewrite the entire CLIST in Rexx.
|
I had a boss tell me to do that once. In fact he had me rewrite every Clist I wrote into Rexx. It took several months.
He said CLIST is dead, Rexx is the future (maybe an overstatement).
That was in 1989. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
CLIST is as dead as Cobol.
I hated Rexx when I first saw it (too many damn quotes!) but I have come to prefer it over all other programming languages. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
daveporcelan wrote: |
Akatsukami wrote:
Quote: |
Rewrite the entire CLIST in Rexx.
|
I had a boss tell me to do that once. In fact he had me rewrite every Clist I wrote into Rexx. It took several months.
He said CLIST is dead, Rexx is the future (maybe an overstatement).
That was in 1989. |
I take your point. OTOH, suppose the TS had written:
Quote: |
I am trying to execute a C/370 subroutine from RPG II. i am new to RPG II. can you please help me with examples on :
1. calling C from RPG II
2. recieving a string as result from C into RPG II. |
My advice would be: "Rewrite this program in C". |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Akatsukami,
I think I did not make my point clearly.
I agreed with him, and since that time, I have written thousands of Rexx execs, and a very small handful of Clists.
While Clist is not dead, there is very little reason to use it. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
too many damn quotes
what about the gazillions of ampersands in a CLIST |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
enrico-sorichetti wrote: |
too many damn quotes
what about the gazillions of ampersands in a CLIST |
Yeah, I can barely stand to look at CLIST code anymore... makes me want to retch. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Don surely you mean amper retch |
|
Back to top |
|
|
|