IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to schedule jobs in rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Mon Jan 21, 2008 10:43 am
Reply with quote

I want to schedule 10 jobs using rexx . The job should be dependent on each other maxx cc . For example JOB1, JOB2 , JOB3 , JOB4 ........

JoB2 should run after sucessfull completion of JOB1 , JOB3 after job2 and so on .


Please write the rexx example (CODE)

Thanks in advance
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Jan 21, 2008 12:28 pm
Reply with quote

No problem, I can do the job for you.

My rate is $100 per hour + tax. You will get a tested code.

When do you want me to start?

O.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Jan 21, 2008 12:42 pm
Reply with quote

IMNHO... Rexx is not the proper 'utility' to schedule jobs but the worst thing, as ofer insinuate, is that you only want the CODE, remember this site has a SEARCH facility...and that you can get lot of examples here, there (other forums) and everywhere (google).
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Jan 21, 2008 3:27 pm
Reply with quote

Hi Ofer71 !

$100 per hour + tax ???

Please don't destroy the pricing for external support by agggressive dumping the fee per hour here in Europe.

Have a look at the exchange rate USD/EUR ;-)

Regards, UmeySan
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Jan 21, 2008 3:32 pm
Reply with quote

I jst wanted to make a point.... icon_biggrin.gif

O.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Mon Jan 21, 2008 4:03 pm
Reply with quote

Hello Ofer ,

Tell me your contact address i will send you the check.

Now i am looking to get Return code of completed JOB in rexx ? Can anyone help me here .

Regards
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Jan 21, 2008 4:34 pm
Reply with quote

You can get a return code of job by:
1. Batch SDSF command.
2. Navigating through MVS Data Areas.
3. Extracting Broadcast messages dataset.

O.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Mon Jan 21, 2008 4:38 pm
Reply with quote

Looking for some more input
Can we execute BATCH SDSF command in REXX ? If yes please gie me a example .
By exteacting Broadcast message dataset i assume you are talking about TSO output command which stored in the dataset , This will again involve searching of particular string.


Can you elaborate more .

Regards
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Jan 21, 2008 4:58 pm
Reply with quote

SDSF Batch commands were discussed a lot in this forum (yes, with examples). You might want to search the forum.

Also, the SDSF fine manual contains all the information you need(yes, with examples).

O.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Tue Jan 22, 2008 1:04 pm
Reply with quote

Thanks Ofer -


I have searched the Forum and tried one way. But the problem is no output is coming in the Dataset .

Given below is the code -----

/* REXX */
ADDRESS TSO
"ALLOC F(ISFIN) TRACKS SPACE(1) REU" /* USED BY SDSF */
"ALLOC F(ISFOUT) NEW DELETE REU " , /* USED BY SDSF */
"TRACKS SPACE(100,100) LRECL(133) RECFM(F,B,A) DSORG(PS)"
"ALLOC F(TEMPPRT) DA('BKGHDY.DEV.REPORT') SHR"
JOBNAME = "BLYGGGG1"
QUEUE "PRE *" /* SDSF COMMANDS IN BATCH*/
QUEUE "ST"
QUEUE "FILTER JOBID =" JOBFFF81
QUEUE "++S "
QUEUE "PRINT FILE "BKGHDY.DEV.REPORT" "
QUEUE "PRINT 1 999999"
QUEUE "PRINT CLOSE"
QUEUE "END"
QUEUE "EXIT"
SAY QUEUE
"EXECIO" QUEUED()" DISKW ISFIN (FINIS" /* INPUT TO SDSF BATCH */
ADDRESS ISPEXEC "SELECT PGM(ISFAFD) PARM('++25,80')"/* INVOKE SDSF */
EXIT


Please tellme if there is any other solution ....

Regards
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jan 22, 2008 1:21 pm
Reply with quote

You can look into ISFOUT to see SDSF messages.

O.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Tue Jan 22, 2008 1:42 pm
Reply with quote

I can see in the ISFOUT that all of the jobs present in spool is listed but output dataset does not contain that job.Is there any problem with the filter .
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jan 22, 2008 1:45 pm
Reply with quote

This is for you to tell...

O.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Jan 23, 2008 3:52 pm
Reply with quote

Hi !

You could simply shedule your separate jobs by adding a last Step in every job, where you submit your next job via internal reader. Make this step depending on the RC of the previous step. Then you have a little job-chain of sepatate jobs.

Regards, UmeySan
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jan 23, 2008 3:58 pm
Reply with quote

unless you are running under jes3 and You are authorized to use
the dependent job scheduling facility ( //*NET cards )
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Thu Jan 24, 2008 12:33 pm
Reply with quote

I'm submitting REXX by JCL to get the SDSF output in ISFOUT. But there is no data after job completion. If I'm running this REXX in the foreground Data is coming to out file.

Please guide if there any other way to submit REXX by JCL

I am using this JCL

Code:

//REXXINS  EXEC PGM=IKJEFT1B,DYNAMNBR=30
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DSN=my rexx pds,DISP=SHR
//ISPPROF DD UNIT=VIO,DISP=(NEW,DELETE),SPACE=(TRK,(1,5,5)),
// DCB=(LRECL=80,BLKSIZE=6160,DSORG=PO,RECFM=FB)
//ISPLOG DD SYSOUT=*,
// DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB)
//ISPMLIB DD DSN=my ispmlib,DISP=SHR
//ISPPLIB DD DSN=my ispplib,DISP=SHR
//ISPSLIB DD DSN=my ispslib,DISP=SHR
//ISPTLIB DD DSN=my isptlib,DISP=SHR
//SYSTSIN DD *
ISPSTART CMD(%CHECKREO)
/*


Given below is the REXX

Code:

/*REXX*/                                                         
INREC4.   = " "                                                   
INREC4.0  = '0'                                                   
RexxrepDSN      = 'IBM.REXX.REP'                         
"DROPBUF"                                                         
QUEUE 'JOBNAME' IBMAS1C1                                         
QUEUE 'ST'                                                       
QUEUE 'PRE *'                                                     
QUEUE 'FILTER JOBID = ' JOB05575                                 
QUEUE 'ARRANGE MAX-RC A C'                                       
QUEUE 'END'                                                       
QUEUE 'EXIT'                                                     
"ALLOC F(ISFIN) TRACKS SPACE(1) REU" /* USED BY SDSF */           
"ALLOC FI(ISFOUT) DSN('"RexxrepDSN"') SHR REUSE"                 
"EXECIO" QUEUED()" DISKW ISFIN (FINIS" /* INPUT TO SDSF BATCH */ 
"ISPEXEC SELECT PGM(SDSF) PARM('++32,255')"                       
"FREE FI(ISFIN ISFOUT)"                                           
"ALLOC F(PROF) DA('"RexxrepDSN"') SHR"   
"EXECIO * DISKR "PROF"(STEM INREC4."
"EXECIO 0 DISKR "PROF" (FINIS"       
"FREE FILE("PROF")"                 


* Moderator Note * Edited post to show all of the necessary DD statements for ISPF batch job
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jan 24, 2008 1:08 pm
Reply with quote

I don't have SDSF so I can't validate if your code will work or not. However, make sure you have the correct JCL as I've shown for using ISPF services in batch for the one line:

"ISPEXEC SELECT PGM(SDSF) PARM('++32,255')"

or, forget about using ISPF services and just call the program using a standard TSO CALL statement:

"CALL *(SDSF) '++32,255'"
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Thu Jan 24, 2008 2:39 pm
Reply with quote

Thanks Superk . This is working icon_smile.gif
Back to top
View user's profile Send private message
MB
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Fri Aug 08, 2008 12:02 am
Reply with quote

There is an urgent requirement to be deliverd. Can anyone give me source code with explanation on How to trigger a mainframe job using REXX?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Aug 08, 2008 12:18 am
Reply with quote

Quote:
There is an urgent requirement to be deliverd


if the requirement is urgent a forum is not the best place to get an answer
You did not show any hint of having done a bit of work Yourself,
if You had searched the forums You would have found lots of examples on the issue

a technically correct answer for Your requirement could be

Code:
/*REXX */
Address TSO "SUBMIT 'YOUR.JCL.PDS.DATASET(MEMBER)'"
exit


it' s up to You to search the REXX docs for an explanation
TSO/E bookshelf
ID ( information developers ) aka the people who write the manuals are much better at explaining things
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 08, 2008 12:02 pm
Reply with quote

MB wrote:
There is an urgent requirement to be deliverd. Can anyone give me source code with explanation on How to trigger a mainframe job using REXX?

Urgent no it isn't - well not for me anyway.

Usual rates apply 700 euro per day (or part thereof) for tested and documented code.
Back to top
View user's profile Send private message
MB
Warnings : 1

New User


Joined: 25 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Fri Aug 08, 2008 12:56 pm
Reply with quote

Hi Eric,

I apologize for that. Actually my requirement is that a mainframe file is being dumped through dataware house process. Once the mainframe file is available , a process should trigger a predecessor job to run successor jobs. Can any one tell me how this can be done using REXX?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 08, 2008 1:18 pm
Reply with quote

Do you not have a scheduling software package in house, one designed specifically for tasks such as this ?
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Aug 08, 2008 9:59 pm
Reply with quote

Quote:
a process should trigger a predecessor job


A 'predecessor job'? I do not think you can go back in time.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top