Hello,

 Has anyone mentioned that you need to turn on the environment before you 
address SDSF and turn it back off when you are done?

i.e.

 RC=ISFCALLS('ON')
 
 ADDRESS SDSF "ISFEXEC SR"

 ...More Processing here...

 RC=ISFCALLS('OFF')
 EXIT

Thanks...Guy M. Gates Jr. 
TTI Z/OS Systems Programmer II 
Email: [email protected] 
                    "Mainframe-inspired reliability for optimal system uptime." 

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Cris Hernandez #9
Sent: Thursday, July 28, 2011 6:39 PM
To: [email protected]
Subject: Re: REXX code on JES2

First thing I would do is figure out which statement is causing the error.  
I use a simple 

lc = RC 

to capture the return code from all commands & calls (like ALLOC, EXECIO, FREE, 
etc.), then code:

IF lc <> 0 THEN DO 
 SAY 'Error performing xxxxxxxx.  last RC =' lc
 EXIT lc 
END

so the exec ends where it fails and issues an informative error message. 



--- On Thu, 7/28/11, jagadishan perumal <[email protected]> wrote:

> From: jagadishan perumal <[email protected]>
> Subject: REXX code on JES2
> To: [email protected]
> Date: Thursday, July 28, 2011, 7:19 AM
> Hi,
> 
> I have written a REXX to purge few jobs but I am getting an
> error as RC-3(
> 
> which means host command not found)
> 
> 
> 
> /*REXX*/
> 
> ADDRESS TSO
> 
> "ALLOC DA('A251804.SPOOL(SIN)') F(ISFIN) SHR REU"
> 
> "ALLOC DA('A251804.SPOOL(SOUT)') F(ISFOUT) SHR REU"
> 
> ADDRESS SDSF "ISFEXEC SR"
> 
> IF RC=0 THEN
> 
> DO
> 
> ADDRESS CONSOLE
> 
> "CONSOLE ACTIVATE NAME(A251)"
> 
> "CONSPROF SOLDISPLAY(NO) UNSOLDISPLAY(NO) SOLNUM(300)
> UNSOLNUM(300)"
> 
> "ALLOC DA('A251804.SPOOL(SIN)') F(ISFIN) SHR REU"
> 
> "ALLOC DA('A251804.SPOOL(SOUT)') F(ISFOUT) SHR REU"
> 
> "EXECIO * DISKR ISFOUT (STEM LINES. FINIS"
> 
> DO K = 1 TO LINES.0 IF (WORDPOS('SHORTAGE',LINES.K) ¬= 0)
> THEN
> 
> DO
> 
> ADDRESS CONSOLE
> 
> "$P JOBQ,HOURS>15"
> 
> SAY "THE COMMAND $P JOBQ,HOURS>15 EXECUTED"
> 
> ADDRESS TSO
> 
> "FREE F(SIN)"
> 
> "FREE F(SOUT)"
> 
> "CONSOLE DEACTIVATE"
> 
> EXIT
> 
> END
> 
> ND
> 
> SAY "NO RESOURCE SHORTAGE"
> 
> ADDRESS TSO
> 
> "FREE F(SIN)"
> 
> "FREE F(SOUT)"
> 
> "CONSOLE DEACTIVATE"
> 
> 
> 
> 
> 
> Could anyone please guide me or advise me regarding the
> above code
> 
> 
> 
> Regards,
> 
> Jags
> 
> ----------------------------------------------------------------------
> 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
> 

----------------------------------------------------------------------
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

----------------------------------------------------------------------
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