View previous topic :: View next topic |
Author |
Message |
dohellwithmf Beginner
Joined: 12 Jul 2007 Posts: 55 Topics: 23
|
Posted: Mon Oct 05, 2009 2:18 pm Post subject: how to pass parameters from JCL to REXX |
|
|
Hi All,
i have to pass parameters from JCL to REXX program. I want to pass value thru JCl which will pe PULLed by REXX.
I am using following step:
Code: |
//STEP1 EXEC PGM=IKJEFT01
//SYSPROC DD DSN=D172445.REXX.TEST(TEST),DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
MAYANK
/*
|
I also tried:
Code: |
//STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=999,PARM='IRIQ'
//SYSEXEC DD DSN=D172445.REXX.TEST(TEST),DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
|
but none of these is working. Can anyone tell me the correct syntax.
TIA, Mayank |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Mon Oct 05, 2009 2:30 pm Post subject: |
|
|
If you want to PULL the parameter(s), then your first option is the better choice. However, it's not coded correctly, since nowhere do you tell TSO what your REXX exec name is that you want to execute.
It should look more like this:
Code: |
//STEP1 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
EX 'D172445.REXX.TEST(TEST)'
MAYANK
/*
|
or as an alternative:
Code: |
//STEP1 EXEC PGM=IKJEFT01,PARM='TEST'
//SYSPROC DD DISP=SHR,DSN=D172445.REXX.TEST
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
MAYANK
/*
|
|
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Mon Oct 05, 2009 2:33 pm Post subject: |
|
|
rexx exec named test
Code: |
/* REXX */
PULL ARG
SAY 'THE PARM PASSED TO ME IS : ' ARG(1)
|
JCL to run and 'mayank' is the string we are passing
Code: |
//STEP0100 EXEC PGM=IKJEFT01,PARM='%TEST MAYANK'
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD DUMMY
//SYSEXEC DD DSN=D172445.REXX.TEST,DISP=SHR
//*
|
Check the SYSTSPRT after the execuetion of the job
Kolusu |
|
Back to top |
|
|
dohellwithmf Beginner
Joined: 12 Jul 2007 Posts: 55 Topics: 23
|
Posted: Sat Oct 10, 2009 9:58 pm Post subject: |
|
|
thank u all for the inputs....its working fine. |
|
Back to top |
|
|
|
|