View previous topic :: View next topic |
Author |
Message |
coolguy Beginner
Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Thu Sep 15, 2005 8:55 am Post subject: Running Rexx Thru Jcl |
|
|
I want to Run the rexx program to Jcl
My Jcl
Code: |
//RexxabA JOB (T,JT,J9),CLASS=B,MSGCLASS=Z,
// NOTIFY=&SYSUID
//STEP EXEC PGM=IRXJCL,PARM='SASTEST'
//SYSPRINT DD SYSOUT=*
//SYSEXEC DD DSN=My.REXX.TEST,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//*
|
My rexx progarm
Code: |
/* REXX */
ADDRESS TSO
"ALLOC F(SYSEXEC) DA('my.REXX.TEST') SHR REUSE"
MAC = "TMAC1"
PDS = "my.REXX.TEST"
MEM = "TDATA"
ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("MEM")') MACRO ("MAC")"
EXIT
|
Macro is
Code: |
/* REXX */
ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "C ALL 'P###### -' 'REXX -)'"
ADDRESS ISREDIT "C ALL 'C###' 'XMMM '"
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"
EXIT
|
while running the Rexx in the command line it ran fine but trying to run thru Jcl which i posted
I am geting error
3 *-* "ALLOC F(SYSEXEC) DA(my.REXX.TEST') SHR REUSE"
+++ RC(-3) +++
7 *-* ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("MEM")') MACRO ("MAC")"
+++ RC(-3) +++
Can any one help me? and
I want to pass the parm for REXX and xmm how can we do it in rexx Pls help
Cool |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Sep 15, 2005 9:29 am Post subject: |
|
|
Coolguy,
This has already been discussed several times in this forum. You cannot invoke a REXX with ISPF service calls so easily thru' JCL. You need to allocate all ISPF libraries, ISPEXEC, ISPPLIB, ISPTLIB, ISPLLIB etc....before you run your exec.
Scan for BATCHPDF in TSO/ISPF. You will see couple of posts on running rexx thru' BATCH.
Thanks,
Phantom |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Sep 15, 2005 9:33 am Post subject: |
|
|
Just to reiterate, this is not a Rexx question per se, but an ISPF one. As Phantom mentioned you need an ISPF environment (properly allocated DD names). ISPF depends on TSO, so you also need a TSO environment (IKJEFT01 instead of IRXJCL). BATCHPDF does a reasonable job of creating JCL that mimics your online environment. |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Sep 15, 2005 9:34 am Post subject: |
|
|
Also, to use ISPF services, you must be running in a TSO address space (i.e. use program IKJEFT01 instead of IRXJCL). |
|
Back to top |
|
|
coolguy Beginner
Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Fri Sep 16, 2005 10:13 am Post subject: |
|
|
When i am using this Jcl it is working fine but i need to pass some parms to the Rexx from the Jcl can help in that
My JCL is
Code: |
//EDITMAC EXEC PGM=IKJEFT01
//SYSEXEC DD DSN=My.REXX.TEST,DISP=SHR
//ISPPROF DD DSN=&&ISPPROF,DISP=(,PASS),
// UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
// RECFM=FB,LRECL=80
//ISPPLIB DD DSN=SYS1.ISPPLIB,DISP=SHR
//ISPMLIB DD DSN=SYS1.ISPMLIB,DISP=SHR
//ISPSLIB DD DSN=SYS1.ISPSLIB,DISP=SHR
//ISPTLIB DD DSN=SYS1.ISPTLIB,DISP=SHR
//ISPLOG DD SYSOUT=*,DCB=(LRECL=125,RECFM=VBA)
//SYSTSPRT DD SYSOUT=*,DCB=LRECL=125
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
ISPSTART CMD(SASTEST)
/*
|
My rexx progarm
Code: |
/* REXX */
ADDRESS TSO
"ALLOC F(SYSEXEC) DA('my.REXX.TEST') SHR REUSE"
MAC = "TMAC1"
PDS = "my.REXX.TEST"
MEM = "TDATA"
ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("MEM")') MACRO ("MAC")"
EXIT
|
Macro is
Code: |
/* REXX */
ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "C ALL 'P###### -' 'REXX -)'"
ADDRESS ISREDIT "C ALL 'C###' 'XMMM '"
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"
|
The values to the Generic variables (ReXX and XMMM) should be passed as parameters to the program.
Thanks
Coolguy |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Fri Sep 16, 2005 4:17 pm Post subject: |
|
|
coolguy,
You can pass parameter as shown below. Use ARG in your rexx exec to receive them and PUSH them and use PULL in the Macro.
Code: |
//SYSTSIN DD *
%Rexx-pgm parm1 parm2
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri Sep 16, 2005 11:30 pm Post subject: |
|
|
Coolguy,
Kolusu posted
Code: |
//SYSTSIN DD *
%Rexx-pgm parm1 parm2
|
This SYSTSIN will work for regular macros but not for ones with ISPF services. Hence you have to use ISPSTART command.
Try this
Code: |
//SYSTSIN DD *
ISPSTART CMD(rexx) PARM(parm1, parm2)
|
Hope this helps,
Thanks,
Phantom |
|
Back to top |
|
|
coolguy Beginner
Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Mon Sep 19, 2005 5:55 am Post subject: |
|
|
Hi Phantom, Kolusu
I tried to pass the parms in given ways, But i am getting error
READY
ISPSTART CMD('SASTEST') PARM ('proc,pgm')
ISPD104 Invalid parameter given
'CMD('SASTEST') PARM ('proc,pgm')' invalid
READY
END
Can u please help me
Cool |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Mon Sep 19, 2005 6:17 am Post subject: |
|
|
I think PARM is only used when starting with a PGM.
Try this:
ISPSTART CMD(SASTEST PROC PGM)
Cheers,
Merv _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
coolguy Beginner
Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Mon Sep 19, 2005 6:53 am Post subject: |
|
|
still I am gettig the erroe
READY
ISPSTART CMD(SASTEST PROC PGM)
FILE SYSEXEC NOT UNALLOCATED, DATA SET IS OPEN
ISPP330 BDISPMAX exceeded -/-100 displays exceeded in batch mode on pane
READY
END
Pls help!!!!
Cool |
|
Back to top |
|
|
acevedo Beginner
Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Mon Sep 19, 2005 7:01 am Post subject: |
|
|
Mervyn wrote: | I think PARM is only used when starting with a PGM.
Try this:
ISPSTART CMD(SASTEST PROC PGM)
Cheers,
Merv |
I use it this way without problems.
If I'm not wrong the error you've shown has nothing to do with passing parameters... |
|
Back to top |
|
|
coolguy Beginner
Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Mon Sep 19, 2005 7:27 am Post subject: |
|
|
But while running thru Tso exec it ruuning fine but thru jcl ony it is giving prob
can u help in that
CoolGuy |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Mon Sep 19, 2005 7:34 am Post subject: |
|
|
Coolguy,
Quote: |
ISPP330 BDISPMAX exceeded -/-100 displays exceeded in batch mode on pane
|
This is not an error with Parms. This error occurs when you to Open any panel (Edit/View or any custom panels) from your rexx and that panel is not closed properly.
If you use EDIT/VIEW dataset using any MACRO then issue ISREDIT BUILTIN CANCEL or ISREDIT END at the last line of your macro.
Thanks,
Phantom |
|
Back to top |
|
|
acevedo Beginner
Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Mon Sep 19, 2005 7:52 am Post subject: |
|
|
/* REXX */
ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "C ALL 'P###### -' 'REXX -)'"
ADDRESS ISREDIT "C ALL 'C###' 'XMMM '"
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"
EXIT
but he's doing it already. |
|
Back to top |
|
|
coolguy Beginner
Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Mon Sep 19, 2005 8:01 am Post subject: |
|
|
any idea to slove this pls help me
Thanks
Ravi |
|
Back to top |
|
|
|
|