Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have answered some questions and have gotten answers for my questions. Anywhere you can do this on one page helps tremendously..."

Geography

Where in the world do Tek-Tips members come from?

calling a CLIST from a REXX

Wimver (IS/IT--Management)
25 Apr 12 13:10
When issuing Commands and Subcommands from REXX, I run into a problem, in that subcommands are never executed.  I can do it with CLIST, so I generate a CLIST from REXX and execute the CLIST.  The problem is I always get a 0 return code back from the CLIST... Any ideas.  

Here is a simplified version of the code

/************************** REXX *****************/
"DEL TMP.CLIST"
"ALLOC DA(TMP.CLIST) NEW SPACE(1,1) RECFM(F,B) LRECL(80),
BLKSIZE(27920) FI(OUTFILE)"
SAY 'GIVE ME AN ID'
PULL ID
QUEUE "ACF"
QUEUE "T TE"
QUEUE "L " ID
QUEUE "Q"
N1 = QUEUED()
"EXECIO" N1 "DISKW OUTFILE (FINIS"
"FREE FI(OUTFILE)"
EX TMP.CLIST
IF RC \= 0 THEN
SAY  ID " NOT FOUND"
ELSE
SAY ID " FOUND"

In this example, &MAXCC after the Q is 4 when not found, but RC is always 0
Wimver (IS/IT--Management)
25 Apr 12 14:47
Sorry folks.  I found my answer..

I needed to code and EXIT CODE(&MAXCC) at the end of the CLIST

 
rexxhead (Programmer)
10 May 12 11:19

Instead of writing a CLIST and executing that, why not just

QUEUE "T TE"
QUEUE "L " ID
QUEUE "Q"
"ACF"

That is: you put on the queue all the commands you want ACF2 to execute, then invoke ACF2. ACF2 will pick up the active queue and process each command in turn. Works like a charm. I've used this method for centuries (well... decades, anyway).

Frank Clarke
--America's source for adverse opinions since 1943.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close