Page 1 of 2

Getting error while executing REXX through JCL

PostPosted: Tue Apr 23, 2013 6:13 pm
by debraj
Hi,

I am executing a REXX programe through JCL. But getting an error message as below:

RetCode=RXSUBCOM( 'ADD','DSNREXX', 'DSNREXX')
Error running FCHKPRIC, line 83: Routine not found


I am using below JCL:
//STEP01 EXEC PGM=IKJEFT01,REGION=0m,TIME=1440,PARM='FCHKPRIC'
//SYSEXEC DD DSN='rexx library containing rexx program FCHKPRIC',DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSIN DD DUMMY
/*

NOTE: No error is faced while executing the REXX program directly using EX command. But when executing it via JCL it gives the error message in bold.
I am adding the below TSO libraries before executing the REXX programs.
ALLOC FILE(REXX) DATASET('xxxA.SDSNLOAD','xxxA.SDSNEXIT') SHR REUSE
TSOLIB ACTIVATE FILE(REXX)

Re: Getting error while executing REXX through JCL

PostPosted: Tue Apr 23, 2013 6:28 pm
by Akatsukami
And why do you think that that ALLOCATE statement is of any value whatsoever?

Re: Getting error while executing REXX through JCL

PostPosted: Tue Apr 23, 2013 6:58 pm
by debraj
The REXX code gives error without adding the ALLOCATE statement.

Re: Getting error while executing REXX through JCL

PostPosted: Tue Apr 23, 2013 9:11 pm
by Pedro
You are correct that a 'routine not found' error is likely because of a missing allocation.

If you are missing some allocation in the JCL, and you know the names of the datasets, then the solution is to add the allocation of those datasets to the JCL.

Re: Getting error while executing REXX through JCL

PostPosted: Tue Apr 23, 2013 10:19 pm
by dick scherrer
Hello and welcome to the forum,

Suggest you change the TIME=1440 to something else. . .

1440 is unacceptable on well-managed systems.

Re: Getting error while executing REXX through JCL

PostPosted: Wed Apr 24, 2013 4:51 pm
by debraj
Hi Pedro,

I know the dataset name. Can you please tell how to allocate the dataset to JCL.



Hi dick scherrer,

I have also tried the same without the TIME parameter. But it shows the same error then.

Re: Getting error while executing REXX through JCL

PostPosted: Wed Apr 24, 2013 4:54 pm
by enrico-sorichetti
//....  EXEC ...
//STEPLIB DD ...
//        DD ...

Re: Getting error while executing REXX through JCL

PostPosted: Wed Apr 24, 2013 4:55 pm
by NicC
You allocate the dataset name same as any other:
//ddname DD DSN=....DISP=...etc

Do not allocate it within your program.

The TIME parameter has no connection with your problem - Dick is just saying that you should not use it as it may be meaningless within your organisation and, in my opinion, it is better on the jobcard rather than being hidden away on a step.

Re: Getting error while executing REXX through JCL

PostPosted: Wed Apr 24, 2013 5:26 pm
by debraj
Hi Enrico,

BIG Thanks! It worked! :)

Re: Getting error while executing REXX through JCL

PostPosted: Wed Apr 24, 2013 8:22 pm
by dick scherrer
Hello,

The TIME=1440 had Nothing to do with the error.

You should NOT use TIME=1440.