Page 1 of 1

need help for execute a rexx load module,but got an error

PostPosted: Mon Jan 03, 2011 9:02 am
by good123
I'm trying to use the batch mode to compile a rexx program, and no error or warning
and use STUB=MVS or STUB=MULTI or STUB=CPPL or STUB=EFPL,and STUB=CPPLEFPL.

then i run the job
//STEP1   EXEC  PGM=IRXJCL,PARM='RXRPSTR'                   
//STEPLIB DD  DSN=TDDX.LOADLIB,DISP=SHR                     
//        DD  DSN=MVQ1.RX.LOADLIB,DISP=SHR                   
//SYSEXEC  DD  DSN=ATUY.USERA.PDS,DISP=SHR                   
//SYSTSPRT DD SYSOUT=*                                       
//SYSPRINT DD SYSOUT=*                                       
//SYSTSIN  DD *                                             
  AFK1.NPUDHE.IN    TAPE7                                   
  CYF1.NUUPDZ.OUT   TAPE8                                   
/*                                                           

I got the error message:
46 +++ IF SYSDSN(SRCPDS) /= "OK"
IRX0043I Error running RXRPSTR, line 46: Routine not found

in rexx program RXRPSTR,use an external functuin SYSDSN, rexx code:

IF SYSDSN(SRCPDS) /= "OK" THEN   
DO                                                                 
  CALL WTO_MSG "UNABLE TO FIND DATASET '"SRCPDS"'. PLEASE CHECK IT."
  EXIT  16                                                         
END


how to do,that vaoid the error,or any recommand?

Re: need help for execute a rexx load module,but got an error

PostPosted: Mon Jan 03, 2011 9:18 am
by MrSpock
First of all, the IRXJCL program is the REXX interpreter.

SYSDSN is a TSO/E External Function. Therefore, as the manual clearly states:

You can use the SYSDSN function only in REXX execs that run in the TSO/E address space.


You need to run your REXX exec in a TSO/E address space. To do so normally you'd use the TSO/E Terminal Monitor Program IKJEFT01.

Re: need help for execute a rexx load module,but got an error

PostPosted: Mon Jan 03, 2011 11:57 am
by good123
MrSpock,thanks for your reply.

i know it.yes, i have test it under IKJEFT01.It is A TSO/E environment,so SYSDSN can
be executed,but i have a question still,Is there no way to do? sometime we wish to compile
the rexx exec to a load module library,and then control by program verssion control system
,and can be compare(Although the source code can be compare in SYSEXEC library)

Re: need help for execute a rexx load module,but got an error

PostPosted: Mon Jan 03, 2011 12:43 pm
by harishcv
"but i have a question still,Is there no way to do? "

Do you want to compile REXX using a version control tool, create its load, and then execute the load using IRXJCL?.. and not using any other means of executing a load module?
Please make your requirement clear. May be the below link can help you.

http://publib.boulder.ibm.com/infocente ... dev_83.htm

Re: need help for execute a rexx load module,but got an error

PostPosted: Tue Jan 04, 2011 10:33 am
by Pedro
Your situation is not clear; you are discussing two separate topics.

But it looks like you want to build a load module and execute it. You need to call it like you would a load module. I suggest you use:
//SYSTSIN DD *
 CALL 'my.loadlib(myload'

rather than calling it like a regular rexx program.

Re: need help for execute a rexx load module,but got an error

PostPosted: Fri Jan 07, 2011 11:23 am
by good123
my request is simple, that rexx exec compile to be a load module,like cobol or assembler. for exaple:
//STEP1 EXEC PGM=IRXJCL,PARM='RXRPSTR' <---- it is a rexx exec,not load module
//STEPLIB DD DSN=TDDX.LOADLIB,DISP=SHR
// DD DSN=MVQ1.RX.LOADLIB,DISP=SHR
//SYSEXEC DD DSN=ATUY.USERA.PDS,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
AFK1.NPUDHE.IN TAPE7
CYF1.NUUPDZ.OUT TAPE8
/*
Change to this

//STEP1 EXEC PGM=RXRPSTR <-----it is a load module
//STEPLIB DD DSN=TDDX.LOADLIB,DISP=SHR
// DD DSN=MVQ1.RX.LOADLIB,DISP=SHR
//SYSEXEC DD DSN=ATUY.USERA.PDS,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
AFK1.NPUDHE.IN TAPE7
CYF1.NUUPDZ.OUT TAPE8
/*

The SYSDSN function in rexx program , when you compile it, which STUB is corect?
//RX$CMP1 JOB ,,CLASS=A,MSGLEVEL=(1,1),MSGCLASS=X,TIME=1440
//* REXX COMPILE PROCUDURE
//* ----------IMPORTANT ---------------------------------------------
//* PREDEFINED STUBS ARE PROVIDED: @PQ04021
//* YOU HAVE TO CHOICE A KIND OF STUBS:
//*
//* MVS PROGRAM WILL BE INVOKED AS AN MVS PROGRAM
//* CPPL PROGRAM WILL BE INVOKED AS A TSO/E COMMAND
//* CALLCMD PROGRAM WILL BE INVOKED BY THE TSO/E CALL COMMAND
//* EFPL PROGRAM WILL BE INVOKED AS A REXX EXTERNAL ROUTINE
//* CPPLEFPL PROGRAM WILL BE INVOKED AS EITHER A TSO/E COMMAND OR
//* A REXX EXTERNAL ROUTINE
//* MULTI PROGRAM SUPPORTS ALL ABOVE NAMED ENVIRONMENTS
//* EXCEPT LINKMVS AND ATTCHMVS. @PQ04021
//*
//* -----------------------------------------------------------------
//REXXCL PROC STUB=EFPL TYPE OF STUB
// OPTIONS='XREF OBJECT NOCEXEC', REXX COMPILER OPTIONS
// COMPDSN='ACX1.RX.SFANLMD', REXX COMPILER LOAD LIB
// LIBDSN='ACX1.RX.SEAGLMD', REXX LIBRARY LOAD LIB
// LIBXDSN='ACX1.RX.SEAGCMD' REXX LIBRARY EXEC LIB
//*-----------------------------------------------------------------
//*-----------------------------------------------------------------
//* COMPILE REXX PROGRAM.
//*-----------------------------------------------------------------
//*
//REXX EXEC PGM=REXXCOMP,PARM='&OPTIONS'
//*-----------------------------------------------------------------
//* THE REXXCOMP IS A LOAD MODULE ,AND IT USED FOR COMPILE REXX
//* EXEC SOURCE CODE,IT WILL PRODUCE OBJECT CODE FOR NEXT STEP TO
//* PREPARE LINK.
//*
//*-----------------------------------------------------------------
//STEPLIB DD DSN=&COMPDSN,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSPUNCH DD DSN=&&OBJECT,DISP=(MOD,PASS),UNIT=SYSDA,
// SPACE=(800,(800,100))
//SYSIN DD DSN=ATUY.USERA.SOURCE(RXRPSTR),DISP=SHR
//*
//*-----------------------------------------------------------------

which STUB type and OPTION,is to fit me ? when i use the SYSDSN in rexx program.

Re: need help for execute a rexx load module,but got an error

PostPosted: Fri Jan 07, 2011 2:29 pm
by NicC
Somewhere on this board, in this section, in the last week, someone, possibly yourself, posted a question regarding the use of SYSDSN in a compiled Rexx. In that topic I am sure there is a reference to the manual you require.