Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Input from JCL to REXX
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Jun 09, 2009 1:17 pm    Post subject: Symbolic parameter in REXX
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 09, 2009 1:33 pm    Post subject:
Reply with quote

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
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Jun 09, 2009 1:43 pm    Post subject:
Reply with quote

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
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Jun 09, 2009 2:09 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 09, 2009 2:19 pm    Post subject:
Reply with quote

Is it a set date / time or the current date / time ?
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Jun 09, 2009 2:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Jun 09, 2009 2:26 pm    Post subject:
Reply with quote

well this is not a date i have just given example . It may be name
NAME=*****.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Jun 09, 2009 2:29 pm    Post subject:
Reply with quote

how are you running rexx from the jcl ? can you paste something here ? does above example not suit your purpose ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 09, 2009 2:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Jun 09, 2009 3:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Tue Jun 09, 2009 3:22 pm    Post subject:
Reply with quote

Don't shout!

Are you building your own job scheduler???
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Jun 09, 2009 3:39 pm    Post subject:
Reply with quote

Its nothing related to job scheduler . Its just passing data from JCl to REXX using symbolic parameter
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Tue Jun 09, 2009 3:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 09, 2009 3:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Jun 09, 2009 4:00 pm    Post subject:
Reply with quote

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
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 985
Location: Oostende, Belgium

PostPosted: Tue Jun 09, 2009 4:12 pm    Post subject:
Reply with quote

shr_amar wrote:
Return code of JOB2.


In other words, your own little job-scheduler! SIASD!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 09, 2009 4:17 pm    Post subject:
Reply with quote

And how do you propose to collect the return code of an external job ?
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 126
Location: UK

PostPosted: Tue Jun 09, 2009 4:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Tue Jun 09, 2009 4:34 pm    Post subject: Reply to: Input from JCL to REXX
Reply with quote

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
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Tue Jun 09, 2009 5:27 pm    Post subject:
Reply with quote

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.

icon_smile.gif 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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us