I noticed that you did: ADDRESS CONSOLE
on a line by itself. That means that all subsequent commands go to the CONSOLE interface. But you then to TSO commands such as ALLOCATE and EXECIO. Those are not being passed to the TSO command interface, but to the CONSOLE interface. ADDRESS CONSOLE "CONSOLE ACTIVATE NAME(A251)" "CONSPROF SOLDISPLAY(NO) UNSOLDISPLAY(NO) SOLNUM(300) UNSOLNUM(300)" "ALLOC DA('A251804.SPOOL(SIN)') F(ISFIN) SHR REU" Change this to: ADDRESS CONSOLE "CONSOLE ACTIVATE NAME(A251)" "CONSPROF SOLDISPLAY(NO) UNSOLDISPLAY(NO) SOLNUM(300) UNSOLNUM(300)" ADDRESS TSO "ALLOC DA('A251804.SPOOL(SIN)') F(ISFIN) SHR REU" -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets® 9151 Boulevard 26 . N. Richland Hills . TX 76010 (817) 255-3225 phone . john.mck...@healthmarkets.com . www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets® is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company®, Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM > -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of jagadishan perumal > Sent: Thursday, July 28, 2011 6:20 AM > To: IBM-MAIN@bama.ua.edu > Subject: REXX code on JES2 > > 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 lists...@bama.ua.edu 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html