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



IBM's Command List programming language & Restructured Extended Executor

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

Postby good123 » Mon Jan 03, 2011 9:02 am

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?
good123
 
Posts: 8
Joined: Sun Jan 02, 2011 8:35 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby MrSpock » Mon Jan 03, 2011 9:18 am

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.
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

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

Postby good123 » Mon Jan 03, 2011 11:57 am

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)
good123
 
Posts: 8
Joined: Sun Jan 02, 2011 8:35 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby harishcv » Mon Jan 03, 2011 12:43 pm

"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
harishcv
 
Posts: 11
Joined: Wed Dec 29, 2010 1:09 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Pedro » Tue Jan 04, 2011 10:33 am

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.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

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

Postby good123 » Fri Jan 07, 2011 11:23 am

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.
good123
 
Posts: 8
Joined: Sun Jan 02, 2011 8:35 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Fri Jan 07, 2011 2:29 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post