Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bad ISREDIT return code +++ RC(20) +++

Status
Not open for further replies.

tatoriver

Programmer
Mar 23, 2009
27
US
I am tryng to make this work, and i am receving rc 20. I dont know whts happenning. Plase help me.

/* REXX ISREDIT TEST */
DSN = "P25JGR.PRIVADA.LIBRERIA"
MEMB = "HOLA"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEMB")')"
ADDRESS ISPEXEC "ISREDIT MACRO"
ADDRESS ISPEXEC "ISREDIT FIND HOLA"
IF RC > 0 THEN SAY "NOT FOUND" RC
ELSE SAY "FOUND"
"END"
EXIT
 
Whenever rc>4, ZERRSM and ZERRLM are set. You should display those values when you get a serious error. It will help you understand what ISPF is complaining about.

Your macro commands should be in a separate member which should start
Code:
address ISREDIT
"MACRO"
...
It is both unnecessary and inefficient to address ISREDIT via ISPEXEC as you have done.

Once the macro commands are isolated, you can
Code:
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEMB")') macro(mihola)"


Frank Clarke
--America's source for adverse opinions since 1943.
 
thanks for your response i display the messages and theese are they

ZERRSM : Invalid length,
ZERRLM : Parameter 'MACRO' exceeds the allowable length.

What does it meant?

 

I'm unsure what it means.

Create your macro as a separate member and call it as I indicated.


Frank Clarke
--America's source for adverse opinions since 1943.
 
i did it, and the error is the same
Code:
/* REXX CBLK */
DSN  = "P1IXF2.PRIVADA.LIBRERIA"
MEMB = "HOLA"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEMB")')
    MACRO('P1IXF2.PRIVADA.LIBRERIA(CBLK)')"
ADDRESS ISREDIT
'MACRO'
'FIND HOLA'
SAY "ZERRSM : " ZERRSM
SAY "ZERRLM : " ZERRLM
IF RC > 0 THEN SAY "NOT FOUND" RC
ELSE SAY "FOUND"
EXIT
 
i release what was the problem with the parameter macro.
thsi MACRO('P1IXF2.PRIVADA.LIBRERIA(CBLK)')" was to long so i do this to fixed it

Code:
/* REXX CBLK */
DSN  = "P1IXF2.PRIVADA.LIBRERIA"
MEMB = "HOLA"
MAC = "P1IXF2.PRIVADA.LIBRERIA(CBLK)"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEMB")')
MACRO(MAC)"
ADDRESS ISREDIT
'MACRO'
'FIND HOLA'
SAY "ZERRSM : " ZERRSM
SAY "ZERRLM : " ZERRLM
IF RC > 0 THEN SAY "NOT FOUND" RC
ELSE SAY "FOUND"
EXIT

But now i am getting another error.

IKJ56500I COMMAND MAC NOT FOUND
***,
ZERRSM : Invalid command,
ZERRLM : Command 'MAC' not found or contains invalid syntax.
***,
 

You didn't do what I suggested.

Make the macro a separate member. That is, it must have a different name than the code you're running and not be embedded in the main routine.

Create member "mihola" and place the macro code there. The EDIT command can then be issued with the MACRO(mihola) as an operand.


Frank Clarke
--America's source for adverse opinions since 1943.
 
Thanks for prompt response,I tried what you told me.

RUNMAC
Code:
/* REXX */
DSN  = "P1IXF2.PRIVADA.LIBRERIA"
MEMB = "HOLA"
MAC  = "P1IXF2.PRIVADA.LIBRERIA(CBLK)"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEMB")') MACRO(MAC)"
EXIT

CBLK
Code:
/* REXX CBLK */
ADDRESS ISREDIT
'MACRO'
'FIND HOLA'
SAY "ZERRSM : " ZERRSM
SAY "ZERRLM : " ZERRLM
IF RC \== 0 THEN SAY "NOT FOUND" RC
ELSE SAY "FOUND"
EXIT

but i am still getting

IKJ56500I COMMAND MAC NOT FOUND
***,

what could be the problem?
 

Nononononononono. "CBLK" must be a member in SYSEXEC or SYSPROC where it can be addressed by its member name alone. Do not not not not try to put an entire datasetname+member as the operand for MACRO.

Code:
/* REXX */
DSN  = "P1IXF2.PRIVADA.LIBRERIA"
MEMB = "HOLA"
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC "EDIT DATASET('"DSN"("MEMB")') MACRO(CBLK)"
EXIT

Frank Clarke
--America's source for adverse opinions since 1943.
 
mmm i am really new on this i dont know hot to add me rexx to SYSEXEC or SYSPROC.
Please explain me
 
i did it :D. i keep search and foun altlib command. Many thanks for your help!!!!!
 
When i dc i lost the altlib configuration, howcan i fix this?
 

You do have your own dataset at the head of SYSEXEC, don't you? You can place the code there.

Or, if you have code in another library, you can simply install a 'driver' for it in your own library, like this:
Code:
/* REXX    Driver
*/ arg argline
address TSO
parse source . . exec_name .

"ALTLIB   ACT APPLICATION(EXEC)  DA('........') "
if rc > 4 then do
   say "ALTLIB failed, RC="rc
   exit
   end

(exec_name)  argline

"ALTLIB DEACT APPLICATION(EXEC)"

exit
(Obviously you have to name the library where it says ".....".)

If you don't have your own library at the head of SYSEXEC, I suspect you're a new employee or new to TSO. In either case, you should ask someone with 'local experience' to tell you the protocol for getting one installed.

I could tell you, but the document I have (called "How To Hack An MVS System") is rather long and involved. If you're new to TSO, most of it would be over your head in any case.


Frank Clarke
--America's source for adverse opinions since 1943.
 
where should be the sysexec or sysproc library? is there a tso command to check it?
 
LISTALC STATUS

Frank Clarke
--America's source for adverse opinions since 1943.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top