View previous topic :: View next topic
|
Author |
Message |
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
Hello All ,
I have one requirement to pass a value to REXX from JCL . I don't know if symbolic parameter works in REXX.
In my JCL i am executing a REXX . where i need to pass a value from JCL .
Can any one please tell me who to use symbolic parameters in JCL .
Thanks In advance |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Please do not start a new thread on the back of an existing one.
Have you searched the forum, because this topic has been discussed numerous times recently. |
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
one way could be:
first few lines of your rexx are like:
Code: |
/* rexx called MYREXX*/
parse arg parm1 parm2 parm3 ....
|
and jcl looks like:
Code: |
//STEP1 EXEC PGM=IKJEFT01
//SYSEXEC DD DSN=xx.xx.xx
//..
//SYSIN DD *
%MYREXX PARM1 PARM2 PARM3 ....
/*
|
|
|
Back to top |
|
|
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
Yes i have tried to search the forum . But it does not talk about symbolic.
I want to use symbolic parameter like
Date=*****
TIME=*****
And this value ****** i need to get in to the REXX.
This will help user to understand what parameter we are passing |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Is it a set date / time or the current date / time ? |
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
why would you want to pass current date and time from JCL when you can use DATE() and TIME() functions in rexx ? any specific requirement? |
|
Back to top |
|
|
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
well this is not a date i have just given example . It may be name
NAME=*****. |
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
how are you running rexx from the jcl ? can you paste something here ? does above example not suit your purpose ? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
shr_amar wrote: |
well this is not a date i have just given example . It may be name
NAME=*****. |
Well, perhaps if you talked about the actual requirement rather than a hypothetical requirement the responses given would be
(a) Helpfull
(b) Not wasting bandwidth on the forum |
|
Back to top |
|
|
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
I AM EXECUTING A JCL WHICH CALL A REXX PROGRAM TO SUBMIT MULTIPLE JOBS BASED ON THE RETURN CODE.
PGM=IKJEFT1B,DYNAMNBR=30,PARM=TRAMREGT
TRAMREGT IS THE REXX PROGRAM .
THE REQUIREMENT IS VERY SIMPLE AS WE USE TO PASS SYMBOLIC PARAMETER FROM JCL TO PROC , I WANT IT TO PASS FROM JCL TO REXX
E.G
JOB1 ==> MAIN JOB WHICH EXECUTE REXX PROGRAM TO SUBMIT OTHER JOB'S (JOB2,JOB3)
JOB2==> IS THE JOB WHICH HAVE SOME SYMBOLIC PARAMETER DEFINED .
I WANT TO PASS THIS PARAMETER FROM JOB1==>REXX==> JOB2.
I HOPE I AM CLEAR .
LET ME KNOW IF YOU ARE LOOKING FOR MORE INFO |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
Don't shout!
Are you building your own job scheduler??? |
|
Back to top |
|
|
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
Its nothing related to job scheduler . Its just passing data from JCl to REXX using symbolic parameter |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
shr_amar wrote: |
I AM EXECUTING A JCL WHICH CALL A REXX PROGRAM TO SUBMIT MULTIPLE JOBS BASED ON THE RETURN CODE. |
In other words, jour own little job-scheduler.
There are real products around that do this job! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
I AM EXECUTING A JCL WHICH CALL A REXX PROGRAM TO SUBMIT MULTIPLE JOBS BASED ON THE RETURN CODE. |
The return code of what ? |
|
Back to top |
|
|
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
Return code of JOB2.
But the requirement is not to make schedular .
I will try to make things more clear
E.g in my rexx i am using a variable "Var1" i want to pass value to this variable from JCL like
//REXXINS EXEC PGM=IKJEFT1B,DYNAMNBR=30,PARM=REXX
// Var1=XYZ
so when rexx is executed VAR1 should have XYZ in it |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1315 Location: Vilnius, Lithuania
|
|
|
|
shr_amar wrote: |
Return code of JOB2. |
In other words, your own little job-scheduler! SIASD! |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And how do you propose to collect the return code of an external job ? |
|
Back to top |
|
|
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
Hey Guys ,
Requirement is not to make schedular .
I will try to make things more clear
E.g in my rexx i am using a variable "Var1" i want to pass value to this variable from JCL like
//REXXINS EXEC PGM=IKJEFT1B,DYNAMNBR=30,PARM=REXX
// Var1=XYZ
so when rexx is executed VAR1 should have XYZ in it |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
maybe we inferred wrong, but it was You who had specified "BASED ON THE RETURN CODE"
anyway as a general point
Code: |
//procnm PROC
//IKJ EXEC PGM=IKJEFT01,PARM='rexxnm &PARM1 &PARM2'
//...
// PEND
//*
//g EXEC procnm,PARM1=aaaaaa,PARM2=bbbbbb
|
is equivalent to
Code: |
//IKJ EXEC PGM=IKJEFT01
//SYSTSIN DD *
rexxnm aaaaaa bbbbbb
//...
|
|
|
Back to top |
|
|
genesis786
Active User
Joined: 28 Sep 2005 Posts: 210 Location: St Katherine's Dock London
|
|
|
|
not related to this perhaps but in our shop.. some creative person developed a mini sequential scheduler using rexx. idea was something like this:
1. All the Jobs kept at one PDS
2. A dummy JCL step was built (a kind of skeleton), which would be appended to all the Jobs at the end.
3. A member in that PDS had the sequence of jobs to be run.
4. A Rexx routine which will read this schedule member and append the dummy step (#2) at the end of jcl and then submit it.
5. A dummy job to start the whole process.
not very elegant but saved a lot of time. since operations couldn't provide us a CA7 scheduler for Dev region, we used this instead. |
|
Back to top |
|
|
shr_amar Warnings : 2 Active User
Joined: 02 May 2005 Posts: 128 Location: UK
|
|
|
|
Thanks enrico,
This is working while passing data.But now i am facing one problem that while passing lowercase data it is failing as JCL error .
IEFC620I UNIDENTIFIABLE CHARACTER r ON THE EXEC STATEMENT
Code is like this
//WHRESET PROC
//REXXINS EXEC PGM=IKJEFT1B,DYNAMNBR=30,
// PARM='WAREREST &VER &WHN'
JCL
//REXX0SE EXEC WHRESET,
// VER=AS1,
// WHN=trm
if i pass WHN=TRM job executed sucessfully but with lowercase it is failing . |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Lowercase is invalid in JCL |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
I am not sure, but you might try enclosing in quotes:
Code: |
//REXX0SE EXEC WHRESET,
// VER=AS1,
// WHN='trm' |
You did not say what &WHN will be used for, but if it will also be JCL, then you will still get an error.
Why does it have to be in mixed case? |
|
Back to top |
|
|
|