In a recent note, Chase, John said:

> Date:         Tue, 18 Oct 2005 08:01:59 -0500
> 
> > -----Original Message-----
> > From: IBM Mainframe Discussion List On Behalf Of Didier Lamare
> >
> > I have written a REXX program that rename a file with the
> > ALTER function, it runs fine online, but in batch, under the
> > IKJEFT01program,  the ALTER function ends with a return code 12.
> > How can I use this function.
> 
> IDCAMS....
> 
Sure, but:

Shouldn't ALTER just execute IDCAMS, anyway?

The OP may have wanted a procedure that works equally online and
in batch, and not wanted the complexity of writing a temporary
SYSIN and allocating SYSPRINT in order to 'call *(IDCAMS)', etc.

I'm curious about the cause of the particular problem; I couldn't
reproduce it; perhaps the OP should have supplied a code excerpt
and SYSTSPRT excerpt.  The following works fine for me both online
and in IKJEFT01 batch:

    /* Rexx */  signal on novalue;  /*
    */
    trace R
    RC = BPXWDYN( 'alloc rtddn(FOODD) dsn('''userID()'.FOO'') mod catalog' )
    RC = BPXWDYN( 'free    dd('FOODD')' )

    address 'TSO'
    'alter '''userID()'.FOO'' newname('''userID()'.BAR'')'

    'delete                           '''userID()'.BAR'''
    exit( RC )

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to